# 过拟合

> 过拟合是指把一个策略反复调参，直到它描述的是历史样本中的噪音，而不是市场中任何可重复的结构。它的特征是：一旦换到「参数不是从中挑出来的」数据上，表现就崩掉。这并不是一种罕见的失败模式，而是无约束优化的默认结局：只要参数够多、尝试次数够多，任何一份数据都能被完美拟合。

Canonical HTML page: https://qanterion.com/zh/glossary/overfitting
更新于: 2026-08-18
又称: 曲线拟合, 数据窥探

## 计算方式

```
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
```

## 你跑过的每一次回测都是有代价的

测试一百个变体然后留下最好的那个，即使这一百个里没有一个真有优势，你也一定会得到一份漂亮的样本内结果——因为胜出者是被噪音选出来的。这就是为什么「尝试过多少组配置」必须被记录并折价处理，也是为什么一个经受住一次诚实检验的策略，比一个从一千次里胜出的策略更有说服力。

## 稳健的策略看起来很无聊

当参数偏离最优点时，表现是平滑衰减而不是断崖式崩塌的策略，更有可能真的描述了某种现实存在的东西。如果回看 5 个周期赚钱、回看 6 个周期就不赚，那么这个策略找到的是样本的一个偶然产物，而不是市场的一个属性。

## 常见误读

样本外测试常被当作解药。但它只是一次检验，而且在你用它的结果去修改策略的那一刻就失效了：一旦你看过留出集并据此改了点什么，这份留出集就变成了样本内数据，那份诚实的证据也就没了。

## 动手算一算

- 破产概率计算器: https://qanterion.com/zh/tools/risk-of-ruin-calculator
- Sharpe ratio calculator: https://qanterion.com/zh/tools/sharpe-ratio-calculator

## 相关词条

- 回测: https://qanterion.com/zh/glossary/backtesting
- 模拟交易: https://qanterion.com/zh/glossary/paper-trading
- 期望值: https://qanterion.com/zh/glossary/expectancy

## 参考资料

- [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

- English: https://qanterion.com/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

本术语表用于教学。此处内容不构成投资建议，页面所述任何指标都不能预测未来结果。