Backtesting Without Fooling Yourself: Overfitting Explained
Updated 2026-11-17 · Quant Trading Pro
A backtest replays a strategy’s rules over past prices. It is the fastest way to throw away bad ideas, and the easiest way to fool yourself into trusting a good-looking one.
What overfitting looks like
When you test thousands of parameter combinations, some will look excellent by chance. If you pick the single best one, you are often picking noise: settings that fit the past but describe nothing that repeats. Warning signs:
- The best result sits on a sharp peak: neighbouring settings perform much worse.
- Very few trades carry most of the result.
- It works on one symbol and one timeframe only.
Habits that help
- Hold data back. Optimize on one period, then test the chosen settings on a later period you never optimized on (out of sample).
- Prefer plateaus. Choose settings whose neighbours also hold up, not the single top row.
- Check other markets and timeframes. A real edge usually survives on related instruments.
- Include costs. Commission and slippage turn many marginal strategies negative.
- Paper trade before risking money. Markets change; a strategy that worked can stop working.
The Strategy Optimizer runs the combinations and keeps every result, so you can look at the whole surface, not just the top row.
Educational content only, not financial advice. Past performance does not guarantee future results.