Skip to content
Menu
Finabase Learn

Glossary

Overfitting

Shaping a trading rule so closely to past data that it captures that history’s accidents, giving a strong backtest and a weak future.

On this page
  1. The arithmetic of many tries
  2. Signs of a sturdier rule
  3. Related terms

Overfitting is shaping a trading rule so closely to past data that it learns the accidents of that history, not anything that will repeat. An overfitted strategy has an excellent backtest and no future. It needs no dishonesty: it is enough to try many versions and keep the best one. Halbert White's 2000 "reality check" and the 2014 paper by David Bailey, Marcos López de Prado and colleagues both show how quickly a search over many rules produces a winner by chance.

The arithmetic of many tries

A 1-in-20 fluke test passes 5% of rules that have no edge. With 20 independent tries, the chance that at least one passes is 1 − 0.95²⁰, about 64%. The number of versions tried is part of any backtest result.

Signs of a sturdier rule

  • A reason for it to work, decided before testing.
  • Few settings, with round values rather than "17 days" or "RSI below 23.5".
  • Similar results for neighboring settings: a plateau, not a lone peak.
  • A good result on data held back from the choice, as in Walk-forward analysis.

Overfitting is one of a family of backtest flaws, alongside Look-ahead bias and Survivorship bias. None of the fixes removes it; each makes it smaller or easier to see.

Sources and further reading

  1. David H. Bailey, Jonathan M. Borwein, Marcos López de Prado and Qiji Jim Zhu, “Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance,” Notices of the American Mathematical Society 61(5), 2014
  2. Halbert White, “A Reality Check for Data Snooping,” Econometrica 68(5), 2000
  3. Finabase chart data — SPY monthly bars, January 1995 to October 2026; rules and results computed by Finabase