Learn · Guide · 5 min read
How many trades does a backtest need?
Thirty trades can't tell a real edge from luck. How far a win rate and expectancy can swing by chance alone, at 30, 100, 200 and 400 trades.
A backtest with 30 trades and a 50% win rate looks like a discovery. It might be one. It might also be a 35% strategy that had a good run. With few trades, luck is a big part of every number in the report, and the only cure is more trades.
How much a win rate can move by chance
Take a strategy whose true win rate is 40%. Test it on a sample of trades, and the win rate you see will land somewhere around 40%, but not on it. About ninety-five times in a hundred it lands within this range:
| Trades | Win rate you might see |
|---|---|
| 30 | 22% to 58% |
| 100 | 30% to 50% |
| 200 | 33% to 47% |
| 400 | 35% to 45% |
At 30 trades, the same strategy can look hopeless or brilliant. Even at 100, a 30% win rate and a 50% one are both ordinary outcomes of one 40% strategy.
Expectancy is harder still
Expectancy, what an average trade earns in units of risk, is the number that says whether you have an edge (the guide to expectancy explains it). It swings even more, because the size of each win varies as well as how often you win.
Take the same 40% strategy, with winners twice the size of losers. Its true expectancy is +0.2R a trade. Here is the range a backtest of it could show, ninety-five times in a hundred:
| Trades | Expectancy you might see |
|---|---|
| 30 | −0.33R to +0.73R |
| 100 | −0.09R to +0.49R |
| 200 | 0.00R to +0.40R |
| 400 | +0.06R to +0.34R |
Below about 200 trades, the test cannot tell this real edge apart from no edge at all. Strategies with a smaller edge, or a few huge winners and many small losers, need more.
More than the trade count
Spread across years. 200 trades in one strong year test one market. The same 200 across a crash, a sideways stretch and a rally test the rules.
Fewer settings, fewer trades needed. Each setting you tune lets the test fit the past a little more. A strategy with eight tuned settings and 150 trades is far weaker than one with two settings and 150 trades.
A held-back period. Keep some history you never tune on, and test on it once at the end. If the edge survives there, it is more likely real.
What to do with a small sample
If your rules don't trade often, test them on more stocks or a longer history, rather than loosening them to make more trades. And size them small until the record is long enough: the strategy odds simulator shows how wide the range of outcomes is for your numbers, and the backtest checklist covers the other ways a test can flatter a strategy.
Keep reading
This is general education about trading methods. It is not advice to buy or sell any security.