Quant research guide

How I ran a quant experiment from idea to unseen data, and watched it fail

A real quant experiment, step by step: buy the S&P 500's biggest daily losers. The event log caught a bug, the fix beat SPY +158.5% to +114.7%, then it trailed SPY on dates it never saw.

As of 2026-11-15

First backtest, 2016-2022
-41.7%SPY +114.7%
After the log-found fix
+158.5%1,750 closed trades
Frozen, 2023 to Oct 2026
+67.9%SPY +106.0%
Explore more topics

TL;DR

A quant experiment is a hypothesis written as exact rules, tested on years you study, read through its event log, tuned, and then frozen and tested on years it never saw. I ran one end to end on November 15, 2026: buy the S&P 500 stocks that fell the most yesterday and hold them for a few days.

The first backtest lost 41.7% while SPY made +114.7% (2016 to 2022). The event log showed why: the rule ranked stocks by the overnight gap at the open, so it bought LUV on a day LUV had risen. Fixed, the same idea made +158.5%. On 2023 to October 2026, dates the search never touched, the frozen setting made +67.9% against SPY's +106.0%. The idea failed, and the experiment did its job.

Write the idea as rules, then backtest it on the years you may study

Value (%)

1-day losers, as first writtenSPYHistorical simulation
-50%
0%
50%
100%
150%
Growth of $10,000, first version vs SPY (%)
1-day losers, as first written 2022-12-30
-41.65%
SPY 2022-12-30
114.7%
2016-01-0820182019202020212022-12-30
Hypothesis
Stocks that fell the most yesterday bounce over the next few days.
Rule Aurora saved
From S&P 500 stocks, buy the 5 with the lowest price change from 1 trading day ago to now. Put the same amount in each. Rebalance whenever days since this rule last ran is at or above 5.

Aurora restates the rule in its own words before any backtest runs, which is the cheapest check in the experiment. Read it closely: the rule ranks the price change from one trading day ago to the moment it runs, which is not the same as yesterday's return. I kept 2023 onward locked away and studied 2016 through 2022 only. The first version lost 41.7% with a 76.9% drawdown over 1,721 trades while SPY made +114.7%.

Read the event log before you touch a setting

Event log, December 27, 2022
[2022-12-27 14:30:00] RebalanceSignal
  true [0]: 8 greaterThanOrEqual 5
  SelectTop inputCount=489 outputCount=5 passedAssets=[
    ["TSLA",-4.591959975013501],
    ["LUV",-4.100857677968733], ...]
[2022-12-27 14:30:00] Order  TSLA  Buy  Filled
  submitted: $117.50  filled: $117.69
[2022-12-27 20:58:00] NoSignal
  false [0]: 0.26944444444444443 greaterThanOrEqual 5

NexusTrade daily prices
date        TSLA open  close   LUV open  close
2022-12-22     136.00  125.35      36.57  35.46
2022-12-23     126.37  123.15      35.36  36.09
2022-12-27     117.50  109.10      34.61  33.94

The rule ranked TSLA at -4.59% and LUV at -4.10%. Those are the drops from Friday's close (123.15, 36.09) to Tuesday's open (117.50, 34.61). On Friday itself LUV rose from 35.46 to 36.09. The rule was buying overnight gaps, which is a different hypothesis from the one I wrote down.

Optimizing that version would have tuned the wrong idea. More on reading logs: how to analyze your trading log.

Fix the rule, then rerun the same test

Value (%)

1-day losers, fixedSPYHistorical simulation
0%
50%
100%
150%
Growth of $10,000, fixed version vs SPY (%)
1-day losers, fixed 2022-12-30
158.51%
SPY 2022-12-30
114.7%
2016-01-0820182019202020212022-12-30

The fix ranks by yesterday's close divided by the close before it, which is known before the market opens. TSLA's new rank value is 123.15 / 125.35 = 0.982, and LUV dropped off the list. Nothing else changed.

Measured correctly, the idea made +158.5% against SPY's +114.7%, with a 41.0% drawdown and $9,679 in fees on a $10,000 account.

Sweep the settings, and distrust the winner

Validation return for all 15 settings, April 2021 to 2022
1d3d5d10d20d
3 names-55.4%-53.7%+6%-5.2%+13.6%
5 names-65.5%-47.8%+19.8%-13%+35.8%
10 names-62.2%-41.1%+20.5%-14.6%+22.5%

3, 5 or 10 names, rebalanced every 1, 3, 5, 10 or 20 days. Trained on 2016 to March 2021. The outlined cell is the setting I froze.

The top scorer, 5 names every 20 days, made +35.8% on validation and +0.2% in training. A setting that only works on one window is a coin flip that landed well. I froze 10 names every 5 days, the setting that held up in both: +48.9% in training and +20.5% on validation.

Freeze it and test on years it never saw

Value (%)

10 losers, every 5 daysSPYHistorical simulation
0%
25%
50%
75%
100%
Growth of $10,000 on unseen dates vs SPY (%)
10 losers, every 5 days 2026-10-30
67.9%
SPY 2026-10-30
105.98%
2023-01-062024202520262026-10-30

Unchanged and run on January 2023 through October 2026, the frozen setting made +67.9% while SPY made +106.0%. It made money and still lost to holding the index.

Confirm with a walk-forward

Return in each walk-forward test window (%)

Feb 2024 to Jun 2025

  • 7.5%
    Strategy
  • 22.8%
    SPY

Jun 2025 to Oct 2026

  • 12.5%
    Strategy
  • 28.5%
    SPY

Two anchored folds, 14-day gap before each test window. SPY is measured over the same windows.

A walk-forward lets the search re-pick its setting on growing windows, then tests each pick on dates that come after it. Both test windows made money and both trailed SPY. The search also picked a different setting each time (5 days, then 10), which is one more sign that the edge is fragile.

What I would test next

The fixed rule made money on every unseen window and lost to SPY on every one. The next experiment I'd run keeps it and adds a market filter, such as only buying losers while SPY is above its 200-day average, then repeats the same steps on new locked-away dates.

If you prefer code, the same loop runs from Python: algorithmic trading research in Python.

How this was measured

Settings, ids and limits

Daily bars, $10,000 start, stock fees 0.1% of each fill, SPY as the comparison. The engine's statistics are the source for the strategy; SPY returns come from each backtest's own SPY curve. Drawdowns quoted from the engine include intraday ticks; on daily closes the fixed run's drawdown is 40.7%.

The rule replaces the whole basket each time it fires, so a 5-day setting means about 5 calendar days between trades. The day counter counts calendar days, which the log line 0.2694 >= 5 shows.

Continue exploring

Discussion

Sign in or create a free account to join the discussion.

No comments yet.

Aurora · AI research assistant

Try this in Aurora

Edit the request, then open it in Aurora. You choose when to send it.