How many trades do you need for a backtest?
It depends on how big your edge is. Under 30 trades can only show a very large edge or an obvious failure. About 100 trades can confirm a strong edge, such as a 60% win rate with equal-size wins and losses. A modest 55% edge needs about 400 trades. Costs, and trying many settings, push the number higher.
Trades needed before a win rate stands out from break-even (equal-size wins and losses, no costs)
| If the real win rate is | Trades needed (approx.) | In plain words |
|---|---|---|
| 70% | About 25 | A very large edge shows up fast |
| 65% | About 45 | Still a large edge |
| 60% | About 100 | A strong edge needs about 100 trades |
| 55% | About 400 | A modest edge needs hundreds |
| 52% | About 2,500 | A small edge needs thousands |
You only see the measured win rate
The table starts from the real win rate, which nobody knows. What you have is the measured rate from your backtest, and it wobbles. A measured 55% on 30 trades could easily be a real 45% or 65%. Treat the table as a guide to how many trades you need before your measured number means much.
Work out your own number
Win rate alone can mislead, because wins and losses are rarely the same size. Use average profit per trade instead (traders call it expectancy):
- From your trade list, take the average profit per trade after costs, in %.
- Take the standard deviation of trade results - a measure of how much single trades swing around the average. Excel:
=STDEV.S(range). - Trades needed ≈ (2 × standard deviation ÷ average profit)².
Example: average +0.2% per trade, standard deviation 2.0%. (2 × 2.0 ÷ 0.2)² = 20² = 400 trades. With only 100 trades, this edge cannot be told apart from zero. If your average after costs is zero or negative, no number of trades helps.
Why 50% is not always break-even
The table assumes wins and losses are the same size and there are no costs. In real trading, break-even win rate = average loss ÷ (average win + average loss), after costs. If you win 1.5% and lose 1% on average, break-even is 1 ÷ 2.5 = 40%. Costs raise it a little.
Settings tried and market conditions
- Settings tried. A 'setting' is any number you tuned, such as a 20-day average or a 2% stop. Testing 50 combinations and keeping the best one finds luck as well as skill, so the formula above is a minimum. See probability of backtest overfitting.
- Market conditions. 200 trades all from one rising year is weaker evidence than the same number spread over calm and stormy periods.
- Rare traders. If a strategy trades only a few times a year, test the same rules on other markets - but markets that move together (for example several big tech shares) do not count as independent trades.
A practical routine
- Work out your own number with the formula above.
- Keep the most recent part of the history aside, test on it only once at the end (an out-of-sample test). It has fewer trades, so expect a noisier result - look for the same direction, not the same size.
- Write down how many settings you tried.
- Paper-trade before real money - not to prove the edge, but to catch missed fills and slippage.
Our backtest checklist lists the other checks.
Questions
- Is 30 trades enough for a backtest?
- Only to spot a very large edge or an obvious failure. For a measured 55% win rate, 30 trades gives a range of roughly 37% to 73%.
- Does a higher timeframe need fewer trades?
- No. The maths depends on the number of trades, not the timeframe. Higher timeframes simply take longer to collect them.
- What is profit factor?
- Total profit from winning trades divided by total loss from losing trades. Above 1 means the backtest made money; it still needs enough trades, as above, before you trust it.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods: confidence intervals for proportions
- Bailey et al. (2014), paper on backtest overfitting, SSRN 2326253
Run the Strategy Review (free beta)
Upload your trade list to see the sample size, costs and luck checks in plain words.