Quant Memo
Core

Warning Signs of an Overfit ML Strategy

An overfit ML strategy usually announces itself before it goes live — through a suspiciously perfect backtest, a feature list that only makes sense in hindsight, or performance that depends on a handful of trades.

Prerequisites: Ranking vs Regression Objectives for Alpha, Turning a Model Prediction Into a Position

Every ML strategy backtest looks good on the day it's finished — that's what a backtest optimized against historical data is supposed to do. The question that matters is whether the good performance came from a real, repeatable pattern in markets, or from the model quietly memorizing noise that happened to line up with returns in the sample it was trained and tested on.

Overfitting rarely shows up as an obvious bug. It shows up as a handful of specific, checkable warning signs in the backtest itself, before a single dollar goes live.

An overfit model isn't wrong on its training data — it's too right, in ways that can't survive the training sample ending. The tell is usually in how the good performance is built, not in the final Sharpe ratio.

The checklist

  • Performance concentrated in a few trades. If removing the best 5 trades out of 500 turns a Sharpe ratio of 2.0 into 0.3, the model found a small number of lucky matches, not a repeatable edge.
  • Feature list grew with every backtest iteration. A researcher who kept adding features until the backtest improved has, almost by construction, built a model that fits the noise in that specific historical sample.
  • In-sample and out-of-sample performance diverge sharply. A modest gap is normal; a Sharpe ratio of 3 in-sample collapsing to 0.2 out-of-sample means the model learned the training set's idiosyncrasies rather than a general pattern.
  • The model needs an implausible number of parameters for the amount of data. A model with more free parameters than independent return observations has room to memorize rather than generalize.
  • Performance depends on a narrow date range. A strategy that only works from 2015-2019 and does nothing before or after should be treated as a fit to that period's specific conditions until proven otherwise.
training window out-of-sample
A smooth, ever-improving equity curve inside the training window followed by a flat or declining line out of sample is the single clearest overfitting signature.

Worked example

A researcher builds a model with 80 features to predict 5-day returns using three years of daily data across 500 stocks, roughly 375,000 rows. The in-sample Sharpe ratio is 4.1. Splitting off the last six months as a genuine holdout the model never touched during feature selection, the Sharpe ratio drops to 0.4 — and of that 0.4, half the gain comes from three trades around a single volatility spike. Both signs point the same way: the 80 features gave the model enough flexibility to fit noise specific to the training window, and what looked like a signal was mostly the training process finding coincidental patterns.

What this means in practice

Hold out data the model and the researcher never see until the model is finalized, not just during training but during feature selection and hyperparameter tuning too — peeking at the holdout while iterating turns it into another training set. Report performance with and without the best few trades removed, and be suspicious of any result that depends heavily on a narrow window of history.

The most dangerous overfitting isn't in the model — it's in the researcher. Trying dozens of feature combinations and reporting only the one that backtested best is a form of overfitting even if each individual model is simple, because the selection process itself searched over enough variations to find noise that looked like signal.

Related concepts

Practice in interviews

Further reading

  • Bailey & Lopez de Prado, 'The Deflated Sharpe Ratio'
ShareTwitterLinkedIn