Backtest sample size: how many trades is enough?
By Bec, futures trader and founder of Wildflower · Updated
There’s no single number of trades that’s enough. A small sample can look very different from a larger one just by chance, because a few lucky or unlucky trades swing the whole count. More trades, taken in different kinds of market, leave less room for luck, and how many is enough depends on the strategy and on how many versions you tried.
What sample size means in a backtest
A Running a strategy’s exact rules over past prices to see which trades they would have taken.More in the glossary runs your rules over past prices and lists every trade they would have taken. The number of trades in that list is the How many trades a test is based on. A small sample can look very different from a larger one just by chance.More in the glossary. Each trade is one small piece of evidence about the rules.
With a handful of trades, chance has a big say. One or two trades going the other way can turn the whole picture around. With many more, a few odd trades matter less, and the result is less likely to be luck.
The pictures on this page use the made-up rule from the overfitting page: buy when a candle closes above the highest high of the 3 candles before it, with a stop 2 points below the entry and a target 3 points above. It isn’t a strategy. It’s only here to make trades to count.
How a small sample misleads, step by step
1. After 3 trades
2 targets, 1 stop. Too early to say anything.
2. After 5 trades
4 targets, 1 stop. It looks very good.
3. After 8 trades
4 targets, 4 stops. The next three were all stops.
4. After 12 trades
5 targets, 7 stops. A different picture from step 2.
Nothing about the rule changed between step 2 and step 4. Only the number of trades did. The first five all came from a steady rise, which suited this rule. The choppy stretch that followed didn’t.
Why small samples swing so much
The same rule, three groups of four trades in a row. One group has three targets. The other two have one each. Judge the rule on any one group and you’d come away with a very different idea.
A coin shows the same thing without any trading. Toss a fair coin 10 times, and 7 or more heads comes up 176 times in every 1,024, more than one time in six. Toss it 100 times, and the chance of 70 or more heads is less than 1 in 25,000. The coin is the same. With more tosses, chance has less room to push the count around. This is sometimes called the The more times something random is repeated, the closer the overall result tends to get to its true average.More in the glossary.
The room for chance shrinks slowly, though. It shrinks with the square root of the number of trades, so four times as many trades only halves it.
Why people quote different numbers of trades
Ask around and you’ll hear 30 trades, 100, a few hundred, even 1,000. None of them is a rule. They differ because they answer different questions:
- 30 comes from statistics classes, where it’s taught as the number of results after which an average starts to behave in a predictable way. It assumes each result is independent and not too lopsided, which trades often aren’t.
- How spread out the results are. If most trades end at the stop or the target, fewer trades tell you more. If a few rare, large trades make up most of the result, you need many more to see them fairly.
- How small a difference you care about. Telling two very different versions apart takes fewer trades than telling two close ones apart.
- How many versions you tried. Every change you test is another chance for one version to look good by luck. Read about overfitting.
- How often the rules trade. 100 trades might be two months of history for one strategy and ten years for another.
So the number that’s enough is yours to decide, and it depends on what you’re trying to learn.
What makes a sample more telling, and what doesn’t
Count trades, not candles or days. A long history can hold very few trades. What matters is how many times the rules actually traded.
Different kinds of market. Trades taken only in a steady rise say little about a choppy or falling market. Many traders look for trades spread across rises, falls and quiet stretches. Read about market regimes.
Trades that aren’t linked. Ten trades in one afternoon’s move are closer to one piece of evidence than ten. Trades spread over many days count more like separate ones.
Trades the rules never saw. Trades on history kept back while you built the rules, the History kept back while a strategy’s rules are built, then used once to test the finished rules unchanged. The part used to build them is in-sample.More in the glossary part, tell you more than trades on the history you adjusted them on. Read about in-sample and out-of-sample.
How traders read a small sample
A small sample isn’t useless. It can show that the rules do what you meant, that entries and exits land where you expect, and that nothing is broken. What it can’t do is show whether a result is more than luck.
Many traders add more history before they trust any count, or keep going on new prices with forward testing. Some also split history into windows and test each one in turn. Read about walk-forward testing.
A bigger sample doesn’t make a result right, either. Twelve hundred trades with a mistake in the rules, or with no fees and The difference between the price you expected and the price your order filled at.More in the glossary, are still wrong. Read about slippage and commissions in a backtest.
Often confused with
Length of history. Years of candles aren’t the same as many trades. A rule that trades rarely can take years to build a sample.
Overfitting. Tuning rules until they fit past prices. A small sample makes it easier, but a simple rule with few trades isn’t overfit, only untested. Read about overfitting.
Statistical significance. A formal test of how likely a result is to be chance. It uses the sample size, but it’s a separate calculation with its own assumptions.
Counting your own trades in Wildflower
See every trade your rules take
Wildflower’s Backtest runs your own rules over the dates you pick and draws every trade on the chart, so you can count them and see what kind of market each one came from. Run the same version, unchanged, on more dates or on dates you kept back. Each result is saved with its version and its dates in My backtests, and Compare two runs shows what changed between two versions of your rules. Nothing is marked or ranked. What you make of it is up to you.

Free on a practice chart
Common questions
How many trades do you need for a backtest?
There’s no single number. More trades, across different kinds of market, leave less room for luck. More above.
Is 30 trades enough?
The number 30 comes from statistics classes, and it assumes results are independent and not too lopsided. Trades often aren’t, so many traders want more. It’s your call.
Is 100 trades enough?
It depends on how spread out the results are, how many versions you tried, and what kinds of market the trades came from.
Why do small samples mislead?
A few lucky or unlucky trades can swing the whole count. With more trades, each one matters less.
Does more history mean a bigger sample?
Only if the rules trade in it. Count trades, not candles or years.
Does a bigger sample make a backtest right?
No. A mistake in the rules, or missing fees and slippage, stays wrong at any size.
What’s the law of large numbers?
The more times something random is repeated, the closer the overall result tends to get to its true average.
How does sample size relate to overfitting?
Every version you try is another chance to look good by luck, so testing many versions on a small sample makes overfitting easier.
Learn it step by step in Wildflower Trading School, starting with the lesson “Sample size: how many trades is enough”.