Building in Horizon

Stress testing

A backtest tells you what happened once. The stress test tells you whether to believe it.

A single green backtest is easy to get, and easy to fool yourself with. The stress test in the Horizon platform attacks your strategy from eight directions and gives every check a straight PASS, WARN or FAIL. It then folds that evidence into the strategy's grade. Most strategies miss at least one check. That's the point: finding out here costs you nothing.

The verdict is computed against fixed thresholds, not argued by the AI: the assistant can't talk a failing strategy into a pass. Available on every plan.

How to run it

Three ways, all equivalent:

  1. Click the "Stress-test this strategy" chip under the chat; it appears once your strategy has a healthy backtest behind it.
  2. Open the Stress test tab (inside the Backtest panel, next to Overview, Report and Trades) and click Stress-test this strategy.
  3. Just ask: "stress-test it", "is this edge real?", "am I curve-fitting?" all work.

The run takes about 30 seconds and executes up to 30 backtests behind the scenes. A card in the chat tracks the run, and the full eight-check breakdown lands in the Stress test tab.

The eight checks

#CheckWhat it does
01Cost sensitivityRe-runs your whole backtest at 2× and 3× real-world spread and commission. If profit only exists at zero friction, it isn't profit.
02Look-ahead scanScans the code for anything that reads the future, the classic way a backtest gets impossibly good.
03Sample sizeCounts your trades and how concentrated the profit is. Thirty trades is the floor; one lucky trade carrying the P&L is a red flag.
04Monte CarloReshuffles your realised trades 1,000 times to see how much of the result is order luck, and how bad the drawdown could plausibly get.
05Market exposureChecks whether entry and exit timing added value beyond simply staying exposed to the market.
06Parameter sensitivityNudges every declared parameter by ±10% and ±20% and re-runs each variant. A real edge survives a nudge; a curve-fit one flips negative.
07Consistency over timeSplits history into five periods and tests each on its own. An edge that only existed in one stretch of the data probably wasn't an edge.
08Out-of-sample holdoutTests the recent bars kept out of the build-and-iterate loop to see whether the idea survives data it did not train against.

Each check carries its own evidence in the results: cost bars, a sample gauge, the Monte Carlo fan of 1,000 reorderings, parameter nudges, per-period bars and the unseen-data result.

Reading the verdict

  • "Held up under every check": trade-worthy candidate. Consider verifying the exported version on your platform's own tester as the final step.
  • "Held up, with a caveat": the flagged rows tell you exactly what to be careful of (often sample size or cost sensitivity).
  • "Didn't hold up, here's where": the results separate what tuning can fix from what it can't. A look-ahead bug is fixable; an edge that vanishes at realistic costs usually means retire the idea and build the next one.

That last case is normal. The whole Horizon workflow (build fast, test across markets, stress test, iterate) exists because most ideas die here, cheaply, instead of dying in your live account.

How stress testing changes the grade

The scorecard and letter answer related but different questions. PASS, WARN and FAIL describe individual robustness checks. The letter summarizes the backtest and stress evidence together.

  • Pass every check: the provisional grade can move up one step.
  • Miss one or two checks: the grade stays where it is.
  • Miss three or more checks: the grade moves down one step.
  • Fail look-ahead or the 2× realistic-cost test: the grade is capped at D.
  • D and F do not improve merely because the losses were consistent.

That is how an A becomes an S: it first earns A from the backtest, then passes every stress check. An S is always stress-tested.

Quant Mode runs this check for you automatically. Every alpha hunt stress-tests its own winner before you ever see it, and anything that fails is buried with a note on why, which the next hunt then reads.

Fine print

  • Strategies only: an indicator has nothing to simulate.
  • Available on every plan, and a FAIL never blocks anything: you can still iterate, re-run, or export. The verdict is information, not a gate.
  • The test uses the same window as your backtest: set custom dates on the Backtest tab (or in your message) and the stress test inherits them.
  • If a backtest looks too good to be true (triple-digit returns on a handful of trades, Sharpe above 3, 75%+ win rates), the assistant will offer a stress test on its own, once, and it won't nag.
  • It re-runs against the current code. If you edit the strategy after a run, the old scorecard is marked as describing an older version, so run it again.

Next

Portfolios: collect the strategies that pass into one balanced line-up →