Overfitting (or curve-fitting) occurs when a strategy's parameters are tuned so precisely to historical data that the strategy captures noise instead of genuine market structure. The backtest looks perfect. The live account bleeds.
Warning Signs of an Overfitted Strategy
Be very suspicious when you see: Sharpe ratio above 4 in backtesting, fewer than 50 total trades in the test period, parameters that are very specific (e.g., buy when RSI crosses 37.5 and close after exactly 13 bars), or no drawdown period longer than 2 weeks.
Walk-Forward Testing: The Gold Standard
In walk-forward testing, you divide your data into sequential windows. You optimize on window 1, then test on window 2 (out-of-sample), then optimize on windows 1+2, test on window 3, and so on. The out-of-sample periods are stitched together to create your real performance estimate.
A robust strategy's walk-forward results should be 60–80% as good as the in-sample results. If the out-of-sample is worse than 50% of in-sample, the strategy is likely overfit.
Parameter Sensitivity Analysis
Run your strategy at parameter values ±20% from your optimal. If performance degrades sharply when you change the RSI period from 14 to 12 or 16, your edge exists only at one specific value — which is a hallmark of overfitting. Robust edges survive parameter variation.
The simplest rules often work best. A 3-parameter strategy that's slightly less optimal but robust is better than an 8-parameter strategy that's theoretically perfect.
Monte Carlo Simulation
Monte Carlo analysis randomly shuffles the order of your trades thousands of times to generate a distribution of possible equity curves. This shows you the range of realistic outcomes and reveals how much of your backtest return was luck versus repeatable edge.
Ready to test this strategy?
BacktestHub lets you backtest on real Indian market data — free, no code needed.
Start Free Backtest