# 過度擬合

> 過度擬合是指把一個策略反覆調參，直到它描述的是歷史樣本中的雜訊，而不是市場中任何可重複的結構。它的特徵是：一旦換到「參數不是從中挑出來的」資料上，表現就崩掉。這並不是一種罕見的失敗模式，而是無約束最佳化的預設結局：只要參數夠多、嘗試次數夠多，任何一份資料都能被完美擬合。

Canonical HTML page: https://qanterion.com/zh-TW/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-TW/tools/risk-of-ruin-calculator
- Sharpe ratio calculator: https://qanterion.com/zh-TW/tools/sharpe-ratio-calculator

## 相關詞條

- 回測: https://qanterion.com/zh-TW/glossary/backtesting
- 模擬交易: https://qanterion.com/zh-TW/glossary/paper-trading
- 期望值: https://qanterion.com/zh-TW/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/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

本術語表用於教學。此處內容不構成投資建議，頁面所述任何指標都無法預測未來結果。