strategies.ninja
strategies.ninja / guide 03 of 06

Guide 03

Overfitting: when a strategy memorises the past

Overfitting, also called curve fitting, is the most common reason a strategy that looked excellent in testing disappoints in live trading. It happens when the rules describe the noise in old data rather than a repeatable behaviour.

SAME DATA, TWO MODELS COMPLEX: EXPLAINS THE NOISE SIMPLE RULE: MISSES SOME, HOLDS UP AB EACH DOT IS ONE PAST OBSERVATION
FIG. 04: The wiggly curve touches every point and explains nothing. The simple line misses some points and is the one more likely to hold on new data.

01What curve fitting means

Any historical data contains two things: a possible repeatable pattern, and random noise that will never repeat in the same way. A strategy with enough adjustable settings can be tuned until it fits both. The result looks wonderful on that data because it has effectively memorised it.

The more parameters a strategy has, and the more combinations you try, the easier it is to find a combination that worked by luck alone. Trying thousands of settings and keeping the best one is guaranteed to produce an impressive backtest, even on random data.

02Warning signs

03Robustness checks you can run

Parameter stability

Change each setting a little in both directions and look at the surrounding results. A robust idea shows a broad plateau where many nearby settings are acceptable. A single isolated spike is a red flag. Choose settings from the middle of a plateau, not the top of a spike.

Different markets and periods

If the logic reflects real market behaviour, it often shows at least some life on related instruments or in other years, even if less strong. If it only works on one contract in one year, it is likely fitted.

Out-of-sample and walk-forward

The strict versions of the checks in the backtesting guide are the strongest defence, because they test on data that played no part in the design.

Monte Carlo, at a conceptual level

A Monte Carlo test reshuffles or resamples your list of trades many times to create alternative orderings. The path of a real equity curve depends partly on the order in which wins and losses happened. By seeing the range of drawdowns across many reshuffles, you get a feel for how bad a normal unlucky streak could be. It cannot add information that is not in the data, but it is a sobering reminder that your historical drawdown is one sample, not a ceiling.

Cost stress

Raise commissions and slippage and see whether the strategy survives. Fitted strategies are often fragile here.

04Prevention is simpler than diagnosis

Even with all of these, no check removes the risk. After the tests, the honest next stage is forward testing on live data you could not have fitted. Past performance does not guarantee future results.

Read thisEducational content only, not financial advice. Futures trading involves substantial risk of loss. Backtested and hypothetical results have inherent limitations, and past performance does not guarantee future results.

FAQFrequently asked questions

What is the difference between overfitting and curve fitting?

They mean the same thing in trading: tuning a strategy so closely to past data that it captures noise rather than a repeatable edge.

Is optimization always bad?

No. Optimization is useful for exploring how a strategy responds to its settings. The danger is choosing the single best result without checking that neighbouring settings and unseen data agree.

How many parameters is too many?

There is no fixed limit, but fewer is safer. Each added parameter increases the number of combinations that can fit by chance, so every one should have a clear reason to exist.

Can Monte Carlo prove a strategy is robust?

No. It shows how sensitive results are to trade order and gives a range of possible drawdowns, but it only resamples the trades you already have.