bt 组合回测

bt 组合回测:使用 bt 框架构建和回测多策略投资组合,支持风险平价、等风险贡献、逆波动率加权等组合构建方法,以及政府债券滚动交易的模拟回测。 含 25 条反模式约束。

✓ 0 人报告成功·v0.1.0·

晶体简介

使用 bt 框架构建和回测多策略投资组合,支持风险平价、等风险贡献、逆波动率加权等组合构建方法,以及政府债券滚动交易的模拟回测。 本 skill 基于开源项目构建并集成 25 条 anti-pattern 约束。访问 doramagic.ai/r/bt-portfolio-backtest 查看中英双语完整文档和触发场景。适用于 Doramagic 生态(Claude Code / Cursor / openclaw / ChatGPT / Gemini 等)。

Blueprint Source

finance-bp-125

zvtvz/zvt6360a632 source files

Constraints

59total
34fatal
34 must-not-violate

Evidence Quality

Confidence88%

Medium confidence — review before critical use

34 条不可违反的约束

FATALdomain_rulefinance-C-001

WHENWhen implementing data input for backtesting

ACTIONverify the price DataFrame index is a DateTimeIndex for time-series alignment

CONSEQUENCEWithout a DateTimeIndex, pandas datetime operations like shift() and offset calculations will fail or produce incorrect results, corrupting backtest calculations

FATALdomain_rulefinance-C-002

WHENWhen passing price data with duplicate column names

ACTIONallow duplicate column names in the price DataFrame

CONSEQUENCEDuplicate columns cause ambiguous column access and can lead to incorrect signal generation or position sizing based on wrong securities

FATALresource_boundaryfinance-C-006

WHENWhen providing price data to Backtest

ACTIONuse a datetime-indexed pandas DataFrame or Series as the data source

CONSEQUENCENon-datetime indexed data causes pandas datetime operations to fail, preventing proper time-series alignment and offset calculations

常见问题

讨论 (0)

暂无讨论,成为第一个发言的人吧!

更新历史

v0.1.02026-04-23·贡献者: tangweigang-jpg

v0.1.0: 首次发布到 Doramagic.ai。基于 zvtvz/zvt 的自动化 batch-v1 元数据 + 自动生成 FAQ。