How many trades does your backtest need? A calculator and the math behind it
Rules of thumb like 30 or 100 trades don’t hold up. The number depends on the size of your edge, how much your trades vary, and how many versions you tried.
Key takeaways
- There’s no fixed number. A large, steady edge can stand out from luck in a few dozen trades. A thin one can take thousands.
- What matters is the average result per trade compared with how much single trades swing. Halve the edge, with the same swing, and you need about four times the trades.
- Every extra version you test raises the bar, so the number of tries belongs in the calculation.
- Treat the answer as a minimum. Trades that cluster, rare big wins or losses and changing markets all mean you need more.
There’s no single number. How many trades is enough for a backtest depends on three things: how big the average trade is, how much single trades swing around that average, and how many versions of the strategy you tried. A strategy with a clear edge can stand out from luck within a few dozen trades. A thin edge can need thousands. The calculator below does the math for your numbers.
Calculate your minimum number of trades
Enter your strategy's numbers. R is the amount you risk on each trade, so a win twice that size is 2R.
Share of trades that win
In R, after costs
In R, after costs
Every combination of settings and rules, kept or not
How rarely a strategy with no edge should pass
Optional: compare with what you have
- Edge per trade
- +0.25R
- Spread per trade
- 1.25R
- Bar to clear
- 1.64 standard errors
Your average has to sit this many standard errors above zero. If these were your true odds, clearing the bar reliably takes roughly two to three times as many trades.
A minimum under simple assumptions: independent trades, the same odds every time, and every win and every loss the same size. General statistics, not a Kwaant rule. Nothing you type leaves this page.
Try changing one input at a time. A high win rate doesn’t mean you need fewer trades, and every extra version you test pushes the number up.
Why 30, 100 or 500 trades isn’t the answer
Ask in any trading forum and the answers range from a few dozen trades to thousands. The popular round numbers have different origins, and none of them is about your strategy.
Thirty comes from a statistics rule of thumb for when an average starts to behave like a bell curve. It was never a test of whether an edge is real, and it’s known to fall short when results are lopsided, as trading results often are. Numbers like 100 or 500 are simply comfortable. They might be plenty for one strategy and nowhere near enough for another.
So the better question is: how many trades for this edge?
How to calculate how many trades you need
Statisticians call the number of trades your sample size, and the math behind the calculator is the standard way to judge one. Every backtest mixes two things: the edge, which is the average result per trade, and the noise, which is how far single trades swing around that average.
- Edge per trade is your expectancy: the win rate times the average win, minus the loss rate times the average loss. A strategy that wins half its trades, with wins of 1.5R and losses of 1R, averages +0.25R per trade.
- Spread per trade is how far a typical trade lands from that average, its standard deviation. For a strategy whose trades simply win or lose, it’s the distance from a typical loss to a typical win (1R + 1.5R = 2.5R) times the square root of the win rate times the loss rate (the square root of 0.5 × 0.5 is 0.5). In the same example that’s 1.25R.
Luck fades as trades add up, but slowly. The uncertainty around your average, called the standard error, is the spread divided by the square root of the number of trades. Four times the trades only halves it.
An edge becomes believable once it sits far enough above zero, measured in standard errors. How far depends on how strict you want to be. If a strategy with no edge should do this well less than 5% of the time, the common 95% level, the bar is about 1.64 standard errors. At the 99% level, it’s about 2.33. (It’s 1.64 rather than the 1.96 you may have seen, because only an edge above zero counts.) Clearing that bar is what traders mean when they ask whether a result is statistically significant. Put together:
Trades needed ≈ (bar × spread ÷ edge)²
For the example, that’s (1.64 × 1.25 ÷ 0.25)², about 68 trades. The square is the part that bites: halve the edge, keeping the spread the same, and you need about four times as many trades.
One subtlety. This is the point where a backtest with exactly these numbers would just clear the bar. If these were your strategy’s true odds, its measured average would wobble too, and a test that long would clear the bar only about half the time. Clearing it reliably takes roughly twice as many trades, or more.
Worked examples
Here’s how five made-up strategies compare at 95% confidence. The numbers show the math. They aren’t results from any real strategy.
| Strategy | Win rate | Avg win | Avg loss | Edge per trade | Trades needed | Best of 20 versions |
|---|---|---|---|---|---|---|
| Wins twice its risk | 50% | 2R | 1R | +0.50R | 25 | 71 |
| Few big winners | 35% | 3R | 1R | +0.40R | 62 | 180 |
| A bit better than a coin flip | 55% | 1R | 1R | +0.10R | 268 | 781 |
| High win rate, small wins | 80% | 0.3R | 1R | +0.04R | 458 | 1,332 |
| Thin edge | 40% | 1.6R | 1R | +0.04R | 2,744 | 7,990 |
Two things stand out. The high-win-rate strategy wins four trades out of five, yet needs hundreds of trades to prove anything, because its edge per trade is tiny. And the thin edge needs thousands, which is more trades than many strategies produce in years.
Why every version you test raises the bar
The calculator asks how many versions you tried because the more you try, the more likely one of them looks good by luck alone. Our guide to telling a real edge from luck explains why. The fix is to ask more of the winner. A simple, widely used adjustment, the Bonferroni correction, divides the chance of a fluke you’re willing to accept by the number of versions:
- 1 version: about 1.64 standard errors
- 20 versions: about 2.81
- 100 versions: about 3.29
- 1,000 versions: about 3.89
That’s why the first strategy in the table needs about 25 trades if it was your only idea, and about 71 if it was the best of 20. David Bailey, Jonathan Borwein, Marcos López de Prado and Qiji Zhu showed how quickly this gets out of hand: with five years of data, trying as few as about 45 independent versions is enough to almost guarantee that one looks impressive in the backtest by chance. Campbell Harvey and Yan Liu built a fuller framework for this kind of adjustment, and it’s harshest on results that only just look significant.
Bonferroni makes no allowance for versions being similar. Similar versions overlap, so it’s on the strict side, but it’s a sensible place to start. Kwaant counts every version tried in a research session, including earlier sessions on the same strategy, and raises the bar to match.
Why the answer is a minimum
The calculator assumes each trade is independent, has the same odds, and that every win and every loss is the same size. Real trading breaks those assumptions in ways that almost always mean you need more trades, not fewer.
- Trades that cluster. Wins and losses often come in streaks, such as several trades in one volatile week. Trades that move together carry less information than the count suggests. Andrew Lo showed that when results are correlated over time, the usual Sharpe ratio math can make a strategy look much better than it is.
- Lopsided results. Rare large wins, common in trend strategies, or rare large losses, common in strategies that sell options or fade moves, make an average slower to settle. The minimum track record length developed by David Bailey and Marcos López de Prado builds this in: returns with rare large losses and fat tails need a longer record. For high-win-rate strategies with small wins, the simple formula undercounts, especially when you’ve tried many versions.
- Changing markets. Five hundred trades from one calm year say little about a volatile one. The trades need to span different market conditions.
- Costs. Enter the average win and loss after commissions and slippage. Costs shrink the edge, and a smaller edge needs many more trades.
- Tuning. If the settings were chosen on the same trades, the edge you measured is inflated. The count only means something on trades the strategy wasn’t tuned on.
Trades or years?
Both. The number of trades tells you whether the average has settled. Time tells you whether it held up in different markets. A day-trading strategy can produce a thousand trades in a year that never saw a crash or a volatile stretch, while a swing strategy might need a decade to reach a few hundred. Look for enough trades and enough variety: several years, calm and volatile periods, and ideally both rising and falling markets.
What to do if you don’t have enough trades
- Use more history. More years add trades and, just as importantly, more kinds of market.
- Test the same rules on related markets. Unchanged rules on a similar market are a fresh check, as long as you don’t retune them. If you keep trying markets until one works, count each one as a version.
- Simplify. Fewer rules and settings mean fewer chances to fit noise, so the edge you see is more likely to be real.
- Forward test. Keep running the finished strategy on new data without changing it. It’s slow, but every trade is clean evidence.
- Accept “can’t tell yet”. Sometimes there isn’t enough evidence either way, and saying so is more useful than a confident guess.
It’s also one of the three verdicts Kwaant gives. When there aren’t enough trades, or enough different market conditions, to separate an edge from luck, the report says “Can’t tell yet” and explains what would change the answer.
Sources and further reading
- Bailey and López de Prado, The Sharpe Ratio Efficient Frontier (Journal of Risk, 2012): the minimum track record length
- Bailey, Borwein, López de Prado and Zhu, Pseudo-Mathematics and Financial Charlatanism (Notices of the AMS, 2014)
- Lo, The Statistics of Sharpe Ratios (Financial Analysts Journal, 2002)
- Harvey and Liu, Backtesting (Journal of Portfolio Management, 2015)
- Harvey, Liu and Zhu, ...and the Cross-Section of Expected Returns (Review of Financial Studies, 2016): why the bar for a new finding should be higher than usual
Questions people ask
Is 100 trades enough for a backtest?
It depends on the edge. For a strategy that averages half its risk per trade, 100 trades can be plenty. For a thin edge of a few hundredths of its risk per trade, it’s nowhere near enough. Put your own numbers in the calculator, and count how many versions you tried.
How many trades do I need for statistical significance?
Enough that your average result per trade sits about 1.64 standard errors above zero at the common 95% level for a single test, and more if you tested several versions. The standard error is the spread per trade divided by the square root of the number of trades.
Does a higher win rate mean I need fewer trades?
Not by itself. What matters is the edge per trade compared with the spread. A strategy that wins 80% of the time with small wins can need far more trades than one that wins 35% of the time with large wins.
How many trades should I backtest before trading a strategy live?
At least the minimum the calculator gives for your numbers, counted on trades the strategy wasn’t tuned on, and spread across several years and different market conditions. Then a forward test on new data, without changes, adds evidence a backtest can’t.
Should I count trades or years of data?
Both. Enough trades make the average settle, and enough years show whether it held up in different markets. A thousand trades from one quiet year is weaker evidence than a few hundred spread across calm and volatile periods.
General education about testing strategies, not investment advice. Figures are computer-drawn illustrations, not real market data.