# Overfitting

> Overfitting is the result of tuning a strategy until it describes the noise in a historical sample rather than any repeatable structure in the market. The tell is that performance collapses on data the parameters were not chosen from. It is not a rare failure mode but the default outcome of unconstrained optimisation: given enough parameters and enough attempts, any data set can be fitted perfectly.

Canonical HTML page: https://qanterion.com/glossary/overfitting
Updated: 2026-08-18
Also known as: curve fitting, data snooping

## How it is calculated

```
Symptoms of an overfitted strategy:
  · Performance collapses on data the parameters were not chosen from
  · Small parameter changes produce large performance changes
  · More rules and more conditions than the sample can support
  · An equity curve that is smooth in-sample and jagged out-of-sample
```

## Every backtest you run costs something

Testing a hundred variants and keeping the best one guarantees a good in-sample result even if none of the variants has an edge — the winner is selected on the noise. This is why the number of configurations tried has to be counted and discounted for, and why a strategy that survived one honest test is stronger evidence than one that won a thousand.

## Robustness looks boring

A strategy whose performance degrades smoothly as parameters move away from optimum is more likely to be describing something real than one with a sharp peak. If a five-period lookback is profitable and a six-period lookback is not, the strategy has found an artefact of the sample rather than a property of the market.

## How it gets misread

Out-of-sample testing is treated as a cure. It is only a test, and it stops working the moment its results are used to revise the strategy: once you have looked at the holdout and changed something, the holdout has become in-sample and the honest evidence is gone.

## Calculate it

- Risk of Ruin Calculator: https://qanterion.com/tools/risk-of-ruin-calculator
- Sharpe ratio calculator: https://qanterion.com/tools/sharpe-ratio-calculator

## See also

- Backtesting: https://qanterion.com/glossary/backtesting
- Paper trading: https://qanterion.com/glossary/paper-trading
- Expectancy: https://qanterion.com/glossary/expectancy

## Sources

- [Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance](https://www.ams.org/notices/201405/rnoti-p458.pdf) — Notices of the American Mathematical Society (Bailey, Borwein, López de Prado, Zhu)
- [… and the Cross-Section of Expected Returns](https://people.duke.edu/~charvey/Research/Published_Papers/P118_and_the_cross.pdf) — Campbell R. Harvey, Yan Liu, Heqing Zhu — Duke University (published in the Review of Financial Studies)
- [Data-Snooping Biases in Tests of Financial Asset Pricing Models](https://www.nber.org/papers/w3001) — National Bureau of Economic Research (Andrew W. Lo, A. Craig MacKinlay)

## Other languages

- 简体中文: https://qanterion.com/zh/glossary/overfitting
- 繁體中文（台灣）: https://qanterion.com/zh-TW/glossary/overfitting
- 繁體中文（香港）: https://qanterion.com/zh-HK/glossary/overfitting
- 日本語: https://qanterion.com/ja/glossary/overfitting
- 한국어: https://qanterion.com/ko/glossary/overfitting
- Português (Brasil): https://qanterion.com/pt-BR/glossary/overfitting
- Türkçe: https://qanterion.com/tr/glossary/overfitting
- Bahasa Indonesia: https://qanterion.com/id/glossary/overfitting
- العربية: https://qanterion.com/ar/glossary/overfitting

## Risk notice

Definitions are educational. Nothing here is investment advice, and no metric described on this page predicts future results.