# 回測

> 回測係指將一套交易策略放到歷史行情數據上運行，以估計佢當時嘅表現。佢俾出嘅係「喺已經發生過嘅條件下嘅行為估計」，而唔係預測。回測嘅價值幾乎完全取決於佢建模咗咩：一個忽略手續費、滑點同資金費嘅回測，並唔係對實盤結果嘅保守估計——佢測嘅根本係另一個策略。

Canonical HTML page: https://qanterion.com/zh-HK/glossary/backtesting
更新於: 2026-08-18
又稱: 歷史模擬, 策略回測

## 計算方式

```
A backtest is credible only when every one of these is modelled:
  · Fees, both sides, at the tier actually paid
  · Slippage, scaled to order size and market depth
  · Funding, for every interval a perpetual position was open
  · Fill realism — no filling at the close, the mid, or the signal price
  · Out-of-sample data the parameters were never fitted on
```

## 一份可信嘅回測必須包含咩

按實際支付級距計算嘅交易手續費、隨訂單規模縮放嘅滑點、永續倉位持有期間每一個結算週期嘅資金費，以及尊重實際可用流動性嘅成交邏輯——而唔係直接按收市價或中間價成交。上述每一項遺漏，都會將結果推向同一個方向：更好睇。呢個就係點解一份唔含摩擦成本嘅回測唔止係唔精確，而係系統性咁錯。

## 樣本內嘅結果唔構成證據

透過觀察一份數據集揀出嚟嘅參數，描述嘅就係嗰份數據集本身。一個策略必須喺佢從未擬合過嘅時間段上接受檢驗，佢嘅數字先開始有意義；而即使咁樣，樣本裡面亦只包含啱啱發生過嗰啲市場狀態，呢個集合遠比未來可能出現嘅要窄。

## 常見誤讀

回測經常被讀成預測。佢只係對一份樣本中一條路徑嘅描述：同樣嘅規則、唔同嘅數據，就會得到唔同嘅結果。佢報告嘅最大回撤係嗰份樣本內嘅最壞情況，因此係未來風險嘅下界，而唔係上界。

## 親手計一計

- Sharpe ratio calculator: https://qanterion.com/zh-HK/tools/sharpe-ratio-calculator
- 破產機率計算機: https://qanterion.com/zh-HK/tools/risk-of-ruin-calculator

## 相關詞條

- 過度擬合: https://qanterion.com/zh-HK/glossary/overfitting
- 模擬交易: https://qanterion.com/zh-HK/glossary/paper-trading
- 滑點: https://qanterion.com/zh-HK/glossary/slippage

## 參考資料

- [Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance](https://www.ams.org/notices/201405/rnoti-p458.pdf) — American Mathematical Society (Notices of the AMS, Vol. 61 No. 5, 2014)
- [Interpretive Notice 9025 — Compliance Rule 2-29: Use of Promotional Material Containing Hypothetical Performance Results](https://www.nfa.futures.org/rulebooksql/rules.aspx?RuleID=9025&Section=9) — National Futures Association
- [The probability of backtest overfitting](https://doi.org/10.21314/JCF.2016.322) — Journal of Computational Finance (Risk Journals)

## Other languages

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

## Risk notice

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