3.4 Overfitting: the biggest trap
Overfitting means that the strategy is fitted to the historical data so closely that it captures random noise instead of real patterns.
Why AI makes the problem bigger
With AI you can test thousands of combinations of indicators and settings in seconds. Test enough variants and some will look fantastic – purely by chance. This is called data snooping.
The coin-toss strategy
Imagine 1,000 people each toss a coin ten times. Around one of them gets ten heads in a row. Does that person have a talent for tossing coins? No – there were simply many attempts. The same thing happens when you test a thousand strategies and pick the best one.
How to expose overfitting
- Few rules and few settings. Every extra parameter increases the danger.
- Logic first. Can you explain why the strategy should work?
- Robustness: Change the settings slightly. If the result collapses, the strategy is fragile.
- Out-of-sample test: Test on data you have not seen.
- Walk-forward: Optimise on one period, test on the next, move forward and repeat.
- Count your attempts. If you have tested 200 variants, the result has to be much better to be credible.
Ask the AI to play devil’s advocate
“Here is my backtest result. What signs of overfitting do you see, and how can I test whether the result is real?”
Key takeaways
- Overfitting means the strategy has learned random noise, not real patterns.
- With AI you can test thousands of variants – some will look good by chance.
- Use few rules, test robustness and test on data you have not seen.
65% of retail investor accounts lose money when trading CFDs with this provider.