backtesting-frameworks
它能做什么
这个工具可以帮你搭建投资策略的测试系统。它能确保测试结果更可靠,避开常见错误,让你更准确地了解一个策略在历史上的表现。
适用场景
- ✓在测试新的投资想法时。
- ✓在为策略测试打基础时。
- ✓在验证一个策略是否真的好、表现是否稳定时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/backtesting-frameworks/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我为一个买股策略搭建回测系统:当股价向上突破 50 日移动平均线时买入。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要先确定要测试的内容(假设、数据和规则),再说明数据要如何做得更贴近现实(比如交易成本和交易时机),然后设定模拟的运行方式。工具会使用一些技术手段,确保结果可靠。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Backtesting Frameworks
Build robust, production-grade backtesting systems that avoid common pitfalls and produce reliable strategy performance estimates.
Use this skill when
- Developing trading strategy backtests
- Building backtesting infrastructure
- Validating strategy performance and robustness
- Avoiding common backtesting biases
- Implementing walk-forward analysis
Do not use this skill when
- You need live trading execution or investment advice
- Historical data quality is unknown or incomplete
- The task is only a quick performance summary
Instructions
- Define hypothesis, universe, timeframe, and evaluation criteria.
- Build point-in-time data pipelines and realistic cost models.
- Implement event-driven simulation and execution logic.
- Use train/validation/test splits and walk-forward testing.
- If detailed examples are required, open
resources/implementation-playbook.md.
Safety
- Do not present backtests as guarantees of future performance.
- Avoid providing financial or investment advice.
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题
投资回测中的“常见陷阱”是什么?
这些是会让回测结果看起来比实际更好的错误,比如使用了未来的数据,或者没有把交易成本算进去。
什么是“滚动前推分析”(walk-forward analysis)?
这是一种测试方法,用来模拟你在过去会如何操作。它把时间分成不同阶段,在每个阶段测试并调整策略,看看策略是否依然有效。
我能用它判断现在该不该投资吗?
不能。这个工具只用于在历史数据上测试策略,不提供投资建议,也不保证未来的结果。
详情
作者的原始描述
Build robust, production-grade backtesting systems that avoid common pitfalls and produce reliable strategy performance estimates.
热度
- GitHub 星标
- 48k
- 排名
- #4009
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。