Skip to main content
Trading12 min read

构建不欺骗你的回测引擎

大多数回测引擎产生的结果看起来很棒,但在实盘交易中却不堪一击。以下是我如何构建QuantumTrader的回测引擎以诚实反映性能。

Part ofFintech & Trading Systems->
By Jason TeixeiraMarch 28, 2026
PythonBacktestingTradingQuantitativeRisk Management
Share:
On this page

每个量化交易者都有过这样的经历:回测显示年化收益200%,实盘交易却显示-15%。

问题几乎从来不在策略本身,而在于回测。大多数回测引擎通过过于乐观的假设在说谎。

回测最常见的5个谎言

谎言1:完美成交

大多数引擎假设你的订单会以你看到的价格精确成交。现实中:

  • 市价单以卖一价(买入)或买一价(卖出)成交,而非中间价
  • 大额订单会推动市场变化(滑点)
  • 波动期间,成交价可能比预期差5-10个tick

我的引擎这样建模: \

Reader route

article -> proof -> offer

ReadClusterProofScope

cluster

Fintech & Trading Systems

intent

Trading

route

next step

What to do with this

Turn the note into a build path.

If this topic maps to a real business problem, keep reading the cluster, study the academy path, or route the work into a scoped engagement.

Jason Teixeira
Written by
Jason Teixeira
Founder, Sage Ideas Studio · Principal Engineer
livebuild 81e8c8e2026-07-28 06:02Z
// solo studio// no analytics resold// every commit human-reviewed