Start freeSign in
Strategy validation

How much data does a backtest need?

Two quantities decide whether a backtest means anything: how many independent trades it contains, and how many different market conditions it spans. Years of data are a means to those two ends, not the goal itself.

Trades first, years second

Statistical confidence comes from independent observations, and in a backtest the observation is the trade. Thirty trades tell you almost nothing: the error bars around a win rate or an expectancy estimated from thirty samples are wide enough to contain both a real edge and pure luck. A few hundred trades begin to narrow the bars; the more the estimate's precision matters, the more trades it takes. This is why a strategy's trading frequency sets its own evidence requirement: a system taking three trades a week accumulates meaningful evidence in a year or two, while one taking three trades a quarter may need a decade of history to be judged at all.

Regimes are the second axis

A thousand trades collected inside one market mood are still one observation of the thing that matters most: regime. Markets trend, range, and panic, and most strategies are secretly a bet on one of those states. A test window has to be long enough for the market to change its mind several times. A four-year window, the standard on Sonar Sciences, is the practical floor for intraday-to-daily strategies: long enough to contain trends, dead ranges, and at least one genuine shock, while recent enough that the market microstructure still resembles today's.

The arithmetic worth doing

Before trusting any backtest metric, make three quick estimates. Trades per regime: divide the trade count by the number of distinct market phases in the window; if any phase contributed only a handful of trades, conclusions about that phase are decoration. Effective independence: overlapping positions and correlated instruments shrink the true sample; fifty simultaneous EURUSD and GBPUSD trades are not one hundred observations. And significance against zero: with few trades and high variance, even a flattering average return is statistically indistinguishable from no edge, which is exactly the trap that catches strategies validated on one good year.

More history is not automatically better

Old data eventually stops describing the market you will trade. Spreads, liquidity, session behavior, and participants change; a backtest across twenty years is partly a test against markets that no longer exist, and it can happily average a dead edge from one era with a real one from another until the result means nothing. The honest window is recent enough to be structurally relevant and long enough to satisfy the trade and regime arithmetic above. Length is a trade-off, not a virtue.

What this means in practice

Match the claim to the evidence. A backtest with 400 trades across four years and several regimes supports a measured claim; the same curve built from 60 trades in one bull run supports a hypothesis, and pretending otherwise is how accounts get hurt. Sonar Sciences's metric framework reports trade counts and window composition alongside every result so the reader can do this arithmetic instantly, and the Studio's out-of-sample gate refuses to let a thin sample masquerade as proof.

Frequently asked questions

How many trades does a backtest need to be statistically valid?

There is no single magic number, but the direction is unforgiving: tens of trades prove nothing, a few hundred begin to mean something, and precision grows slowly with the square root of the count. Overlapping and correlated positions count for less than their raw number. Judge every backtest metric alongside its trade count.

How many years of data should I backtest on?

Enough to span several distinct market regimes at your trading frequency, and recent enough that market structure still resembles the present. For intraday-to-daily strategies, roughly four years is a practical floor: it typically contains trends, ranges, and at least one shock, without averaging in markets that no longer exist.

Is 20 years of backtest data better than 4?

Not automatically. Very long histories test against dead market structures and can blend a vanished edge with a current one until the average is meaningless. More useful than raw length is composition: how many regimes the window spans and how many independent trades it produces for your specific strategy.

Put it to work

Bring one strategy you already trust. The Studio validates it against four years of real data, costs included, for free.

Start building