SuperAPI AI 工具集

strategy-pivot-designer

数据与分析

查看项目

更新于 10-16 07:21

技能介绍

用途:检测策略回测迭代循环是否停滞,并提出结构不同的策略架构方案。它作为 Edge 流水线(hint-extractor -> concept-synthesizer -> strategy-designer -> candidate-agent)的反馈环节,通过重新设计策略骨架而非调整参数来突破局部最优。

适用时机:回测分数在多次改进迭代后趋于平台期;策略出现过拟合迹象(样本内高、稳健性低);交易成本抵消了策略的微薄优势;尾部风险或回撤超过可接受阈值;希望针对同一市场假设探索根本不同的策略架构。

前置条件:Python 3.9+、PyYAML、迭代历史 JSON(累积的 backtest-expert 评估)、源策略草稿 YAML(来自 edge-strategy-designer)。

输出:pivot_drafts/research_only/.yaml(兼容 strategy_draft 的 YAML 提案)、pivot_drafts/exportable/.yaml(可导出的草稿及供 candidate-agent 使用的 ticket YAML)、pivot_report_.md(可读的转向分析)、pivot_manifest_.json(所有生成文件的元数据)、pivot_diagnosis_*.json(停滞检测结果)。

工作流:用 --append-eval 将回测评估结果累积到迭代历史文件;对历史运行停滞检测以识别触发条件(平台期、过拟合、成本抵消、利润因子不足、尾部风险),无亏损利润因子不算成本抵消,未定义或溢出的比率需要复核;若诊断为 review_required,先修复或重新评估底层指标,不要生成转向方案;确认停滞则用三种技术生成转向提案:假设反转、原型切换、目标重构;审阅按质量潜力与新颖度排序的提案;可导出提案的 ticket YAML 可直接进入 edge-candidate-agent 流水线;research_only 提案需人工设计后才能集成;将选定的转向草稿反馈给 backtest-expert 进入下一轮迭代。

快速命令: 追加回测评估到历史(若为新则创建历史): python3 skills/strategy-pivot-designer/scripts/detect_stagnation.py
--append-eval reports/backtest_eval_2026-02-10_120000.json
--history reports/iteration_history.json
--strategy-id draft_edge_concept_breakout_behavior_riskon_core
--changes "Widened stop_loss from 5% to 7%"

检测停滞: python3 skills/strategy-pivot-designer/scripts/detect_stagnation.py
--history reports/iteration_history.json
--output-dir reports/

生成转向提案: python3 skills/strategy-pivot-designer/scripts/generate_pivots.py
--diagnosis reports/pivot_diagnosis_.json
--strategy reports/edge_strategy_drafts/draft_
.yaml
--max-pivots 3
--output-dir reports/

资源:skills/strategy-pivot-designer/scripts/detect_stagnation.py、skills/strategy-pivot-designer/scripts/generate_pivots.py、references/stagnation_triggers.md、references/strategy_archetypes.md、references/pivot_techniques.md、references/pivot_proposal_schema.md、skills/backtest-expert/scripts/evaluate_backtest.py、skills/edge-strategy-designer/scripts/design_strategy_drafts.py。

限制:资料未提供具体收费、平台支持范围或效果保证;需依赖既有迭代历史与策略草稿文件,且部分提案需人工设计后才能集成。