Overfitting: how to lie to yourself with style — and how not to

Overfitting is this: mistaking memory for understanding. An optimized backtest has memorized the past — including its noise — and the smooth equity curve it shows you is not a prediction: it's a recollection. The future market has no obligation to resemble the past's noise, and indeed it doesn't.

The reason overfitting is the number one cause of death for retail systems isn't ignorance: it's the incentive. Every hour of "optimization" produces a prettier curve, immediate dopamine, a sense of progress. Honest verification almost always delivers the opposite news. The platforms' visual testers, with their parameter grids and result rankings, are overfitting machines sold as research tools. You need structural defenses, not good will.

The five doors of self-deception

1 · Parameter grid search

With 6 parameters and 10 values each you have a million combinations: some will be spectacular by pure chance, guaranteed by combinatorics. The test: if the next-door neighbor of your optimal combination halves the profit, you haven't found an edge — you've found a noise spike. Real edges live on parameter plateaus, not on spires.

2 · Silent multiple testing

A hundred ideas tested, one "works" at 99% significance? Over a hundred tests, one 1% false positive is the expected outcome. The number of attempts is part of the result, and no backtest report shows it. Keep count of your dead ideas: it's data.

3 · Look-ahead

Using, even in passing, information that didn't exist at decision time: the unclosed candle, the day's high, badly resampled data. The most insidious error, because it produces marvelous backtests — the future is an excellent predictor of itself — and live systems that die on day one. The defense is structural, in the pipeline: every feature constrained by construction to the closed bar.

4 · Setup survivorship

You test the strategy on the asset where you "know it works" — which is the asset where you saw it work, i.e. a sample already selected by its outcome.

5 · Courtesy costs

Optimistic fixed spread, zero slippage, zero swap. On a 1.18 profit factor, the mere difference between average spread and real spread in thin hours can decide the system's sign.

The case at home: overfitting without optimization

There's a more insidious variant that doesn't even require optimization: baking into the system the conditions of the world you built it in. It's my most instructive mistake, and I tell it against my own interest.

My gold EA, Kimera, used absolute thresholds — chosen when gold traded at $1,600–2,000. At those levels, a 475-point move was a rare, significant impulse: 12–61 trades a year, high selectivity. Then gold climbed to $4,500. At equal relative volatility, the average excursion in points nearly tripled — and my threshold, sitting still, went from selecting exceptional events to ringing for daily noise: 170 trades in 2025, 251 in 2026. The system I had validated no longer existed; in its place ran a hyperactive namesake, never tested by anyone. The worst drawdown of its history arrived precisely in the period of maximum frequency.

The nature of the error: no grid search, no tricks. Just the wrong units of measurement. The cure applies to every parameter of every system: thresholds must be expressed in units that move with the market — ATR multiples, price percentages, quantiles of the recent distribution — never absolute points, pips or dollars. And a monitoring corollary: a system that changes rhythm is a system changing nature, even if the equity doesn't show it yet.

The minimum defense protocol

Single-vote in-sample / out-of-sample

Develop and optimize only on the first part of the data; the last part (my standard: the final 6 months) stays sealed and is used once, at the end, as the verdict. Using it ten times "to check" turns it into in-sample with ceremony. Reading criterion: I don't demand OOS equals IS; I demand it doesn't change the verdict.

Robustness instead of the optimum

After every optimization, perturb: every parameter ±10–20%, worsened spread, execution delayed by one bar. If the system holds up decently, you have a plateau; if it collapses, you have a spire of noise with your name on it.

Walk-forward

Optimize on a rolling window, validate on the next one, advance, repeat. It measures the only thing that matters in production: does the recalibration procedure hold over time?

The three structural defenses (from serious quant literature)

  1. Derive parameters from a model of the process instead of exhaustive search, where possible: a computed parameter cannot be overfitted by the grid.
  2. Triple barrier: label outcomes with stop, target and max time in ATR units rather than fixed horizons.
  3. Validate on synthetic scenarios — block bootstrap, resampling, generated data — because your history is a single trajectory, and the system must survive the family of possible worlds, not the single observed one.

The final question

All the defenses in this article are different forms of the same question: "why should this keep working?". Overfitting, ultimately, is the wrong answer: "because it worked". A system deserves real money only if the answer is an identifiable edge source — structural, behavioral, risk-premium — plus a verification process that seriously tried to kill it and failed.

What happens when both halves are missing, on a system with dreamy public numbers: Anatomy of a deception: my +641%.