openclaw-skills/factor-backtester/SKILL.md
Use when testing factor signals, running long-short spread backtests, checking hit rate and turnover, or sanity-checking whether a ranking signal survives basic transaction cost assumptions.
npx skillsauth add seaworld008/commonly-used-high-value-skills factor-backtesterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
在投入重金之前,先验证你的因子(Factor)是否真的具备“阿尔法”收益。本技能旨在提供一个轻量级的因子筛选层,帮助量化研究员和投资经理快速验证信号的有效性,并识别那些仅在“理想实验室”中存在的伪因子。
# 确保已安装量化回测与数学统计库
pip install pandas numpy matplotlib scipy pyfolio
# 准备回测数据
npx clawhub install factor-backtester
scripts/backtest_factor.py。{
"factor_name": "OperatingProfitMargin",
"periods": [
{ "date": "2025-01-31", "long_ret": 0.05, "short_ret": 0.02, "bench_ret": 0.03, "turnover": 0.12 },
{ "date": "2025-02-28", "long_ret": -0.01, "short_ret": -0.04, "bench_ret": -0.02, "turnover": 0.08 }
],
"transaction_cost": 0.0015
}
### 📊 [因子名] 回测报告摘要
**1. 核心表现 (Performance)**:
- **年化收益**: [XX%]
- **夏普比率**: [1.85] (显著性阈值: > 1.5)
- **最大回撤**: [-8.2%]
**2. 统计显著性 (Significance)**:
- **平均 IC**: [0.045]
- **IC IR**: [0.65]
**3. 换手与成本分析 (Cost Analysis)**:
- **月均换手率**: [25%]
- **预估成本侵蚀**: [年化约 4.5%]
- **净收益**: [依然为正,具备实盘价值]
**4. 最终结论 (Verdict)**:
> [✓] 建议进入深度研究阶段
> [!] 信号较弱,仅可作为次要辅助
> [X] 严重过拟合或成本无法覆盖收益,拒绝
# 针对特定数据文件运行回测脚本并输出 PDF 报告
python scripts/backtest_factor.py --input assets/factor_alpha_v1.json --plot --save report.pdf
factor-backtester 自动遍历不同的参数组合(如:3 个月均值 vs 6 个月均值),并绘制参数热力图。MEMORY.md,防止重复开发。development
Enumerating failure modes via pre-mortem analysis. Systematically identifies failure scenarios for plans, designs, and features, scoring them with RPN/AP. Does not write code.
testing
Orchestrating specialist AI agent teams as a meta-coordinator. Decomposes requests into minimum viable chains, spawns each as an independent session in AUTORUN modes, and drives to final output. Use when a task spans multiple specialist domains, requires parallel agent execution, or needs hub-and-spoke routing across the skill ecosystem.
development
Converting document formats (Markdown/Word/Excel/PDF/HTML). Converts specs from Scribe and reports from Harvest into distributable formats; generates reusable conversion scripts. Use when converting documents, building accessibility-compliant PDFs, or creating Pandoc/LibreOffice pipelines.
testing
Curating cross-agent knowledge and guarding institutional memory. Extracts patterns from agent journals into METAPATTERNS.md, detects knowledge decay, propagates best practices, prevents organizational forgetting. Use when consolidating cross-agent insights, curating memory, or auditing knowledge decay.