Skip to content

Backtest overfitting: seven warning signs that a strategy was fitted to the past

A backtest can only describe the past. An overfitted backtest describes the past too well: it has learned the noise of one historical sample rather than a repeatable pattern, so it tends to disappoint once it meets new data. These seven signs do not prove a strategy is overfitted, but each one is a reason to test further before trusting the result.

1. Many parameters, few trades

Every adjustable parameter gives the optimiser another way to bend the rules around past data. When the number of parameters is large relative to the number of independent trades, a good result is easy to produce and hard to trust.

2. Results collapse when a parameter moves slightly

A robust idea usually works across a neighbourhood of settings. If a moving average of 20 works but 19 and 21 do not, you have probably found a fitted spike, not an edge. Look for broad plateaus rather than sharp peaks.

3. It only works on one instrument or one period

If the logic is general, similar markets and other time spans should show a similar character, even if smaller. A strategy that works only on one pair in one stretch of years deserves suspicion.

4. The equity curve looks too good

Very smooth curves, very high win rates and very small drawdowns are rarer in real trading than in curve-fitted tests. Unusually clean results are a reason to look for look-ahead bias, unrealistic fills or an optimiser that has searched too long.

5. The rules look tailored to specific past events

Filters that exist only to avoid one particular crash, or entry conditions that are oddly specific, often encode knowledge of what happened next.

6. Costs and slippage are missing or optimistic

Spreads, commissions, financing and slippage can turn a thin edge negative, especially for frequent trading. A backtest that ignores them, or uses the best quoted spread, overstates what live trading would deliver.

7. The best of many trials was kept

If you test hundreds of variations and keep the best, the winner is partly selected by luck. The more trials you ran, the less the best result means. Count your trials and treat the headline result accordingly.

What to do about it

  • Hold back data the optimiser never saw (out-of-sample testing) and judge the strategy on that.
  • Use walk-forward analysis, which repeats the optimise-then-test cycle across time.
  • Prefer simple rules with few parameters, and check how results change across a range of settings.
  • Include realistic spreads, commissions, financing and slippage.
  • Test other instruments and other periods without re-tuning.
  • Record how many variations you tried.

Where TradeCC fits

When you bring a strategy idea to CC, it asks about what is missing, and the draft states the date range, time zone, out-of-sample split, spread or cost and fill assumptions before anything runs. A backtest starts only after you confirm it in the conversation, and the report shows the out-of-sample result next to pass criteria that were set before the run. You can also describe your own strategy and results to CC and ask it to look for these warning signs, including look-ahead bias, cost assumptions and out-of-sample gaps. It is a research aid, not a guarantee about future performance, and not investment advice.

Frequently asked questions

How many trades does a backtest need?

There is no universal number. More independent trades make results more reliable, and strategies with many parameters need more trades. A small number of trades should be treated as anecdotal.

Can overfitting be eliminated completely?

No. It can be reduced by out-of-sample testing, simpler rules and honest accounting of trials, but any strategy chosen from past data carries some risk that it will not repeat.

Is a high Sharpe ratio in a backtest good news?

Not by itself. Very high values in a backtest are a reason to check for look-ahead bias, unrealistic costs and the number of variations that were tried.

Related guides

Research reference only — For research reference only; not investment advice and not an offer or solicitation to trade. Data may be delayed, incomplete or revised, and some content is compiled by AI from third-party sources. Check important facts against original sources before you rely on them.