100% Win Rate on 2 Trades: How Many Trades a Backtest Needs
Part of the guide: Overfitting and luck
In short
By pure chance, a strategy that wins half its trades shows 2 wins in 2 trades 1 time in 4. Treat metrics from under 30 closed trades as a first impression and 30 to 100 trades as a first estimate; above about 100, they start to mean something. A measured 60% over 20 trades is plausibly 39% to 78%.
You have seen results like this: 100% win rate, profit factor 99, maximum drawdown 0%. It looks like the perfect strategy. Then you look at the trade count: 2 trades. At that point every one of those numbers means almost nothing. This post shows why, and how many trades a backtest needs before its numbers start to say something.
Why two trades produce perfect numbers
- Win rate 100%: two winners out of two trades. A strategy that wins by pure chance half of the time does this in 1 of 4 cases (0.5 × 0.5 = 25%).
- Profit factor 99: the profit factor is gross profit divided by gross loss. With no losing trade the loss is zero, the ratio has no upper limit, and many tools simply show a capped value such as 99.
- Drawdown 0%: with no losing trade, the account measured on closed trades never falls below a previous high. That is not safety. It is a lack of data.
None of these numbers is wrong. They describe two trades correctly. They just do not tell you what the next twenty trades will do.
How sure can a win rate be? A quick table
A win rate measured over a handful of trades is a rough estimate. The table shows the range in which the real win rate plausibly lies (a 95% confidence interval, Wilson method), for the same measured win rate over more and more trades:
| Trades in the backtest | Measured win rate | Plausible range of the real win rate |
|---|---|---|
| 2 | 100% (2 of 2) | 34% – 100% |
| 20 | 60% (12 of 20) | 39% – 78% |
| 30 | 60% (18 of 30) | 42% – 75% |
| 100 | 60% (60 of 100) | 50% – 69% |
| 500 | 60% (300 of 500) | 56% – 64% |
With 2 trades, a real win rate of 34% is still plausible. With 20 trades, a measured 60% could still be a coin flip. Only around 100 trades does the range shrink to something you can plan with, and even then it is a range, not a promise.
The number of trades matters even more when you test many settings
Parameter sweeps make this worse. Say every setting you test has no edge at all, a 50/50 coin flip per trade, and each takes 10 trades. One such setting wins 9 or 10 of its 10 trades about 1% of the time. Test 100 settings, and the chance that at least one of them shows 9 or 10 winners is about 66%. The "best" setting then looks excellent, and it was picked from luck.
This is the same selection bias that makes the best result of a parameter sweep look better than it is (more on overfitting in parameter sweeps). Few trades and many settings together are a common way to fool yourself with a backtest.
How many trades are enough?
There is no magic number, but there are useful rules of thumb:
- Under 30 closed trades: treat every metric as a first impression. One or two trades can decide the result.
- 30 to 100 trades: a first estimate. Check it on another period or market before you trust it.
- Over 100 trades: the numbers start to mean something, as long as the trades come from different market phases, not one long trend.
- Always: look at the trade count before you look at the win rate, the profit factor or the drawdown.
How to get more trades out of a backtest
- Test a longer period. More history means more trades and more market phases (rising, falling, sideways).
- Test a second market. If the same settings hold on another coin, that is far more convincing than a better number on one.
- Be careful with a lower timeframe. It gives more trades, but also more fees and more noise (fees and slippage in backtests).
- Check the trades that carry the result. If removing the single best trade turns a profit into a loss, the strategy depends on luck.
How PineTester handles small samples
With the full evaluation – included in your first own backtest, with pay as you go and on the plans – PineTester rates the best setting only when it has at least 5 closed positions; below that the result stays "not rateable yet", and under 30 closed positions it warns that there are too few to tell skill from luck reliably. A results page with few closed trades also notes that one or two of them can decide the result, and when the market has more history, one click creates a copy with the longest period it allows. The checks for selection bias (hold-out, walk-forward, Monte Carlo) are explained on how we judge results.
Checklist
- Read the number of closed trades first.
- Distrust any perfect number (100% wins, no drawdown, a capped profit factor) from fewer than 30 trades.
- Ask how many settings were tried before this one was picked.
- Re-test on a longer period and a second market.
- Check whether one or two trades carry the whole result.
PineTester backtests the input ranges of your Pine Script v6 strategy on crypto spot data – up to your plan’s limit per backtest, a larger grid as a random sample – and every verdict on the results page names the documented method it rests on. Results can differ from TradingView’s Strategy Tester.
Test your strategy – one free backtestSimulated results on historical market data. Past performance is not indicative of future results. Not investment advice.