Forge Fate
Quant & Data Research

A Safe Way to Do Quant Research with LLMs: From Questions to Verification and Research Records

4 min read

Review a research draft by tracing its claims to data and calculations, not by how plausible its prose sounds. “Past returns were positive” and “trading that signal made money” are different claims. A citation may not support the full conclusion attached to it.

This synthetic case follows:

text
Fix the question and inputs→ write a review request→ separate the response into claims→ compare with inputs and calculations→ record accepted content and remaining questions

Prices and rules are illustrative. The flawed response was deliberately written for review practice, not collected from a model evaluation. The Python calculations and tests below are the part actually executed.

1. Narrow the question and label the evidence

The question is:

Can we distinguish a positive five-trading-day signal return from the return earned after entering once that signal is known?

This is not a search for profitability or an evaluation of predictive accuracy. Divide the evidence into three groups.

R1. Synthetic prices

Assume D1 through D8 are consecutive trading observations, without actual dates or an exchange calendar.

ObservationSYN_A openSYN_A close
D1100100
D2101101
D3102102
D4103103
D5104104
D6104105
D7110100
D899101

R2. Calculation rules

text
Signal becomes known after observing D6 close.Five-trading-day return = D6 close / D1 close - 1.Select if the signal is strictly positive.Enter at D7 open; exit at D8 open.Holding-period return = D8 open / D7 open - 1.Assume zero costs in this small calculation.

D1 through D6 contain six observations and five trading-day intervals. D6 close determines the signal; D7 open determines entry. They are not interchangeable.

R3. Missing evidence

text
Actual ETF dataOther tradesComparator-strategy resultsReal fills and costsModel prediction recordsTask time and errors with and without LLM assistance

Listing missing evidence makes unsupported conclusions visible.

2. Specify both response format and judgment boundaries

A request accompanying these inputs could be:

text
Draft a research memo using only R1 prices and R2 rules.Separate:1. Facts directly stated in the inputs.2. Calculated values and their formulas.3. Claims that cannot yet be established.Calculate signal return and post-entry holding return separately.Identify the observation and price column used in each calculation.Do not change R2's entry timing.If a value is missing, identify it and defer the calculation.Without the additional evidence listed in R3, do not concludepredictive accuracy, real strategy superiority, or realistic net performance.End with items for human verification.Do not imply that source labels alone complete verification.

This format supports review; it does not guarantee correctness. Preserve the accompanying inputs as well as the prompt. Identical wording with different prices or rules asks a different question.

3. Split a flawed response into individual claims

The following is deliberately incorrect review-practice material:

D6's five-day return is 5%, so the signal strategy earned 5%. Entering at D6 close 105 and exiting at D8 open 99 gives about -5.71%. The positive signal confirms a correct upward prediction. This calculation establishes no future-information leakage and validity after costs.

Assess claims separately rather than labeling the whole paragraph correct or incorrect.

ClaimComparison with evidenceDecision
D6 five-day return is 5%105 / 100 - 1 = 5%, consistent with R1/R2Accept
Strategy earned 5%Substitutes signal-history return for post-entry performanceCorrect
Entry at D6 close 105R2 specifies D7 openReject
Holding return about -5.71%Correct arithmetic, wrong entry inputCorrect input basis
Upward prediction was correctConfuses positive signal with prediction successReject
No future-information leakageFull data/code flow was not validatedWithhold conclusion
Valid after costsCosts assumed zero; no comparison evidenceWithhold conclusion

A calculator alone misses the central error:

text
99 / 105 - 1 ≈ -5.71%

The arithmetic is correct, but entry price 105 violates the research rule. Check both arithmetic and input selection.

4. Check the fixed rules with a small calculation

text
Historical return used for the signal:105 / 100 - 1 = +5%Return after entry:99 / 110 - 1 = -10%

A positive past signal and a subsequent loss can coexist. One example does not establish general strategy failure either; the question is whether signal and holding intervals are distinguished.

The following uses only the standard library:

python
from fractions import Fraction as Frows = [    {"day": f"D{i}", "open": F(o), "close": F(c)}    for i, (o, c) in enumerate([        (100, 100),        (101, 101),        (102, 102),        (103, 103),        (104, 104),        (104, 105),        (110, 100),        (99, 101),    ], 1)]def signal(data, t):    if t < 5 or t >= len(data):        raise ValueError("SIGNAL_WINDOW_UNAVAILABLE")    return data[t]["close"] / data[t - 5]["close"] - 1def inspect_trade(data, t):    past_return = signal(data, t)    if t + 2 >= len(data):        raise ValueError("EXIT_PRICE_UNAVAILABLE")    entry = data[t + 1]    exit_row = data[t + 2]    holding_return = (        exit_row["open"] / entry["open"] - 1    )    return {        "signal_return": past_return,        "selected": past_return > 0,        "entry_day": entry["day"],        "exit_day": exit_row["day"],        "holding_return": holding_return,    }result = inspect_trade(rows, 5)assert result == {    "signal_return": F(1, 20),    "selected": True,    "entry_day": "D7",    "exit_day": "D8",    "holding_return": F(-1, 10),}print("signal:", f'{float(result["signal_return"]):.2%}')print("holding:", f'{float(result["holding_return"]):.2%}')print("trade:", result["entry_day"], "->", result["exit_day"])

Output:

text
signal: 5.00%holding: -10.00%trade: D7 -> D8

holding_return calculates a return over specified entry/exit prices; it is not a multi-asset engine updating quantities, cash, and costs. Inputs are assumed chronologically ordered and valid. No real trading calendar or price-quality checks are implemented.

Does the known signal survive changes to future rows?

First calculate it using data only through D6:

python
assert signal(rows[:6], 5) == F(1, 20)

Then change D7 and later values:

python
changed = [dict(row) for row in rows]changed[6]["close"] = F(999)changed[7]["open"] = F(777)assert signal(changed, 5) == F(1, 20)

This establishes that this function's signal on these inputs is unchanged by the tested future-row edits. It does not prove that an entire research system is free of every leakage type.

Are wrong entry prices and missing exit prices distinguished?

python
wrong_return = (    rows[7]["open"] / rows[5]["close"] - 1)assert wrong_return == F(-2, 35)assert wrong_return != result["holding_return"]try:    inspect_trade(rows[:7], 5)except ValueError as error:    assert str(error) == "EXIT_PRICE_UNAVAILABLE"    print(error)else:    raise AssertionError("missing exit was accepted")

Output:

text
EXIT_PRICE_UNAVAILABLE

Do not substitute the last available price or zero return when the required exit price is missing.

These calculations and checks passed with Python 3.14.5 while preparing the revision on 2026-10-24. This is synthetic code verification, not measurement of model-answer accuracy.

5. Turn review results into a research memo

Retain what was checked and which claims were withdrawn, rather than only writing “review complete.” The inputs and execution above support this memo:

text
Title: Separating a five-day signal from post-entry returnRecorded: 2026-10-24Inputs:Eight synthetic SYN_A rows in R1 and the R2 rules.Not actual ETF data.Question:Can the historical signal at D6 be distinguished fromreturns after entry at D7 open?Established:- D6 close / D1 close gives a +5% signal.- The strictly positive selection rule is satisfied.- Specified entry is D7 open 110.- Exit is D8 open 99.- Holding-period return is -10%.Corrections:- Do not call the signal's +5% a strategy return.- Exclude the calculation using D6 close as entry.- Do not accept claims of prediction success, strategy superiority,  or validity after realistic costs.Execution checks:- Python 3.14.5, standard library.- Signal, entry/exit dates, and holding return matched expectations.- Data through D6 produces the same signal.- Future-row changes leave that signal unchanged.- Missing exit price stops calculation.Unverified:Real-data quality and trading-date mapping; actual fills/costs;performance across trades; superiority over a comparator;LLM productivity and error-detection effects.Response provenance:The flawed response was written for review education,not collected from a separate model evaluation.Conclusion:Signal and holding intervals were calculated separately for thesesynthetic inputs. No conclusion about real performance or LLM utility.

Preserving inputs, program versions, processing steps, and intermediate results follows basic reproducible-computation principles. This memo format is not an official quant-research standard. Sandve et al., Ten Simple Rules for Reproducible Computational Research

Store referenced inputs and code with a real research memo. Environment details alone cannot reconstruct the exact program and data.

6. What to retain after an actual LLM call

Unlike the constructed response here, a real model invocation needs input/output records.

RecordPurpose
Interface and available model identifierIdentify the tool/model
Request time and exposed settingsTrace execution conditions
Full prompt and supplied materialEstablish what the model received
Original responseSeparate output from later editing
Tool calls and returned evidenceTrace what was actually inspected
Accepted, revised, and rejected claimsSeparate human review from model output
Retries and changes to prompts/materialPreserve the route to the final answer

Do not invent hidden version identifiers or settings. Keep edited responses separate from originals. Recording a run does not guarantee the identical response can be regenerated. First establish whether this result can be explained from its inputs and process.

7. Separate implementation fixes from changes to research rules

ChangeRecord
Code implements D6 entry instead of specified D7Bug fix; preserve earlier code/results and distinguish rerun
Decide to change entry to D6 after seeing resultsResearch-rule change, reason, separate comparison
Acquire new pricesInput version and differences
Edit response wordingOriginal and edited output
Retry for a better responseAttempt count and prompt/input changes

Changing entry after observing a loss changes the original question. Do not present the new result as validation of the original rule.

LLMs can draft comparison tables, test candidates, and records. Acceptance should rest on agreement with evidence, rules, and execution, not confidence or response length.

This case ends with a memo and synthetic calculations; no order system was built or connected. It also does not establish time savings or better error detection. Those require comparative conditions, task durations, and records of detected and missed errors. The quant-AI series review connects current evidence with remaining questions.

Report an error or share feedback

Open a draft with this article’s title and URL. Review the message and recipient before sending.

To: [email protected]

Open email draft

If no email app opens, copy these details into your usual email service.

Contact information