Overfitting is fitting a strategy to the noise in past data instead of to a real, repeatable effect. An overfit strategy explains the past beautifully and predicts the future badly.
How it happens
- Too many parameters: each indicator setting, threshold and filter is a dial. Enough dials can fit almost any history.
- Too many tries: testing many variations and keeping the best. Researchers showed that with just 10 configurations, a backtest with an impressive-looking performance measure is expected even when no configuration has any real edge. With limited history, they recommend sharply limiting how many configurations are tried.
- Rule patching: adding a filter to remove the worst past losses, then another, then another.
Signs of an overfit strategy
- Many conditions and finely tuned numbers (a 17-period average, a 0.63 ATR threshold).
- Performance collapses with small parameter changes.
- Few trades relative to the number of rules.
- Excellent results in one period, poor in others.
- No clear reason why it should work.
Habits that limit it
- Few parameters, with round, reasoned values.
- Decide the versions to test in advance, and record them all.
- Look for broad stability: results should be similar across neighboring settings.
- Hold out data you never look at during development (next lessons).
- Prefer a reason: an effect with a plausible cause is less likely to be noise.
Example (hypothetical)
Version A: 2 rules, 3 parameters, 600 trades, modest results that change little when parameters move ±20%. Version B: 7 rules, 11 parameters, 90 trades, excellent results that fall apart when any parameter moves. Version B looks better and is far more likely to be overfit.
Takeaways
- Overfitting fits noise; it shows up as fragile, complex, low-trade-count strategies.
- Every extra parameter and every extra try raises the risk.
- Limit parameters and tries, check stability, and hold out data.
Common misconceptions
- "More rules make a strategy more precise." More rules make it fit the past more precisely, which is the problem.
- "If I test enough ideas, I'll find the real one." You'll find a convincing fake much sooner.