Skip to main content

Glossary · Backtesting & Analytics

Overfitting

Last updated:

Overfitting is tuning a trading strategy so closely to historical data that it captures the random noise of that particular period rather than a genuine, repeatable edge — producing a spectacular backtest and disappointing live results. It is also called curve-fitting: with enough parameters and enough tries, any dataset will confess to a “profitable” pattern that never existed.

The classic symptoms: many finely tuned parameters (why an 87-period average and not 90?), performance that collapses when a parameter shifts slightly, few trades supporting the statistics, and rules added specifically to dodge individual losing trades in the test period.

Example

A trader optimizes an intraday BANKNIFTY strategy across five parameters — entry EMA, exit EMA, stop, target and a time filter — testing 4,000 combinations on 2023–2024 data. The best combination shows 71% winners and ₹3,10,000 profit on one lot. But the tenth-best combination, with nearly identical parameters, makes only ₹40,000. That cliff is the tell: the “best” settings won a lottery in past noise. Traded live in 2025, the strategy loses money while the backtest period stays green. Figures are hypothetical.

Why it matters

Overfitting is the single most common way systematic traders fool themselves, because the deceived and the deceiver are the same person. The defences are procedural: fewer parameters, hundreds of trades, out-of-sample validation via walk-forward optimization or forward testing, and suspicion of any backtest that looks too smooth.

In INDfolio AI, the workflow pushes strategies from backtest into forward testing precisely so curve-fit strategies get caught before they trade real money.

← All glossary terms

See the concept in a real backtest.

Build a strategy in plain English and watch every metric on this page come to life — free, on NSE data.

Free · No card

Create your account

By continuing you agree to our Terms and Privacy Policy.