Skip to content
TradingTune
Sample size Intermediate

How many trades is enough?

Every metric in a backtest is an estimate, and estimates from small samples are mostly noise. Before you trust a win rate or a profit factor, ask how many trades produced it. Trade count is the sample size behind every other number on the page.

Trade count gates every other metric

A 70 percent win rate from 10 trades and a 70 percent win rate from 300 trades are not the same claim. The first is seven good trades, easily produced by luck; the second is a pattern. When you optimize, the search will happily hand you the combination with the prettiest metrics, and on a small sample that is usually the luckiest one, not the best one. Filtering by a minimum trade count is how you stop the optimizer from rewarding noise.

As trade count grows, the confidence band around the true win rate narrows. Small samples sit anywhere inside a wide band.

The noise floor, in one formula

The uncertainty in an observed win rate shrinks with the square root of the number of trades. The standard error below shows why small samples are so unreliable: at 25 trades a 60 percent win rate carries roughly a 10 point swing in either direction; at 400 trades that swing is about 2.5 points. Four times the trades, half the uncertainty.

Standard error of a win rate

Python

How much an observed win rate can wobble purely from sample size. Bigger N narrows the band; small N is almost meaningless.

from math import sqrt

# Standard error of an observed win rate p over n trades.
def win_rate_se(p, n):
    return sqrt(p * (1 - p) / n)

win_rate_se(0.60, 25)   # 0.098  -> about +/- 10 points
win_rate_se(0.60, 100)  # 0.049
win_rate_se(0.60, 400)  # 0.024  -> about +/- 2.5 points

Working rules of thumb

There is no magic number, but practical thresholds help you avoid the worst mistakes:

  • Under 30 trades: treat every metric as anecdote, not evidence.
  • 30 to 100 trades: a rough read; fine for discarding obviously bad settings, weak for ranking the good ones.
  • 100 to 200 trades: a reasonable sample for most swing strategies.
  • 200 or more trades: enough that metric differences start to be real rather than noise.

Tip

Set the filter, then optimize

TradingTune lets you set a minimum trade count so undersampled combinations are discarded before ranking. Set it before the run and the optimizer cannot reward a 12-trade fluke.

How to raise the trade count

If a strategy simply does not trade much, you have three honest levers, in order of preference: extend the date range so it sees more history; test on a lower timeframe where signals fire more often, accepting higher relative costs; or broaden the entry condition so it triggers more, at the risk of diluting the edge. What you must not do is keep the tiny sample and pretend the metrics are solid.

Read the closed-trade count in Pine (v5)

Pine v5

strategy.closedtrades is the sample size behind your metrics. Surface it so you never optimize a result you cannot count.

//@version=5
strategy("Trade Count Aware", overlay=true)

// ... entries and exits ...

// Show the running count of closed trades on the chart.
var label tag = na
if barstate.islast
    label.delete(tag)
    tag := label.new(bar_index, high,
         text = "Closed trades: " + str.tostring(strategy.closedtrades),
         style = label.style_label_down)

Key takeaways

  • Trade count is the sample size behind every metric; read it first.
  • Win-rate uncertainty falls with the square root of trade count.
  • Under 30 trades is anecdote; aim for 100 to 200 or more.
  • Set a minimum-trade filter before optimizing so luck is discarded.

Frequently asked questions

What is the minimum number of trades for a reliable backtest?

There is no exact cutoff, but under 30 trades the metrics are mostly noise. 100 to 200 trades is a reasonable sample for most swing strategies, and 200 or more is where differences between settings start to be real rather than luck.

Why does a high win rate from few trades mean so little?

The uncertainty in a win rate shrinks only with the square root of the number of trades. At 25 trades a 60 percent win rate can easily be 50 or 70 percent in truth; the small sample simply cannot distinguish skill from luck.

How do I get more trades without overfitting?

Extend the date range, drop to a lower timeframe where signals fire more often, or broaden the entry rule. Extending history is safest; lowering the timeframe raises relative costs; broadening entries can dilute the edge, so check the metrics after.

Share this guide
X LinkedIn Email

All guides

Put it into practice

Install TradingTune and optimize any TradingView strategy right in your browser. Free tier, no API keys. A free account is required to run.

Add to Chrome, it's free