# 過度擬合

> 過度擬合係指將一個策略反覆調參，直到佢描述嘅係歷史樣本中嘅噪音，而唔係市場中任何可重複嘅結構。佢嘅特徵係：一旦換到「參數唔係由入面揀出嚟」嘅數據上，表現就崩。呢個唔係一種罕見嘅失敗模式，而係無約束優化嘅預設結局：只要參數夠多、嘗試次數夠多，任何一份數據都可以被完美擬合。

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

## 相關詞條

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

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