strategy-pivot-designer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStrategy Pivot Designer
策略转向设计器
Overview
概述
Detect when a strategy's backtest iteration loop has stalled and propose structurally different strategy architectures. This skill acts as the feedback loop for the Edge pipeline (hint-extractor -> concept-synthesizer -> strategy-designer -> candidate-agent), breaking out of local optima by redesigning the strategy's skeleton rather than tweaking parameters.
检测策略回测迭代循环何时陷入停滞,并提出结构不同的策略架构。该技能作为Edge流水线(hint-extractor -> concept-synthesizer -> strategy-designer -> candidate-agent)的反馈环节,通过重新设计策略框架而非调整参数来跳出局部最优困境。
When to Use
适用场景
- Backtest scores have plateaued despite multiple refinement iterations.
- A strategy shows signs of overfitting (high in-sample, low robustness).
- Transaction costs defeat the strategy's thin edge.
- Tail risk or drawdown exceeds acceptable thresholds.
- You want to explore fundamentally different strategy architectures for the same market hypothesis.
- 尽管经过多次优化迭代,回测得分仍进入平台期。
- 策略出现过拟合迹象(样本内表现优异,鲁棒性差)。
- 交易成本抵消了策略的微薄优势。
- 尾部风险或回撤超过可接受阈值。
- 你希望针对同一市场假设探索本质不同的策略架构。
Prerequisites
前置条件
- Python 3.9+
PyYAML- Iteration history JSON (accumulated backtest-expert evaluations)
- Source strategy draft YAML (from edge-strategy-designer)
- Python 3.9+
PyYAML- 迭代历史JSON文件(累积的backtest-expert评估结果)
- 源策略草稿YAML文件(来自edge-strategy-designer)
Output
输出结果
- — strategy_draft compatible YAML proposals
pivot_drafts/research_only/*.yaml - — export-ready drafts + ticket YAML for candidate-agent
pivot_drafts/exportable/*.yaml - — human-readable pivot analysis
pivot_report_*.md - — metadata for all generated files
pivot_manifest_*.json - — stagnation detection results
pivot_diagnosis_*.json
- — 与strategy_draft兼容的YAML方案
pivot_drafts/research_only/*.yaml - — 可导出的草稿 + 用于candidate-agent的工单YAML
pivot_drafts/exportable/*.yaml - — 人类可读的转向分析报告
pivot_report_*.md - — 所有生成文件的元数据
pivot_manifest_*.json - — 停滞检测结果
pivot_diagnosis_*.json
Workflow
工作流程
- Accumulate backtest evaluation results into an iteration history file using .
--append-eval - Run stagnation detection on the history to identify triggers (plateau, overfitting, cost defeat, tail risk).
- If stagnation detected, generate pivot proposals using three techniques: assumption inversion, archetype switch, objective reframe.
- Review ranked proposals (scored by quality potential + novelty).
- For exportable proposals, ticket YAML is ready for edge-candidate-agent pipeline.
- For research_only proposals, manual strategy design needed before pipeline integration.
- Feed the selected pivot draft back into backtest-expert for the next iteration cycle.
- 使用参数将回测评估结果累积到迭代历史文件中。
--append-eval - 对历史数据运行停滞检测,识别触发因素(平台期、过拟合、成本抵消、尾部风险)。
- 如果检测到停滞,使用三种技术生成转向方案:假设反转、原型切换、目标重构。
- 查看排名后的方案(按质量潜力+新颖性评分)。
- 对于可导出的方案,工单YAML已准备好用于edge-candidate-agent流水线。
- 对于research_only方案,在集成到流水线前需要手动设计策略。
- 将选定的转向草稿反馈回backtest-expert,进入下一个迭代周期。
Quick Commands
快速命令
Append a backtest evaluation to history (creates history if new):
bash
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%"Detect stagnation:
bash
python3 skills/strategy-pivot-designer/scripts/detect_stagnation.py \
--history reports/iteration_history.json \
--output-dir reports/Generate pivot proposals:
bash
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/将回测评估结果追加到历史文件中(若历史文件不存在则创建):
bash
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%"检测停滞情况:
bash
python3 skills/strategy-pivot-designer/scripts/detect_stagnation.py \
--history reports/iteration_history.json \
--output-dir reports/生成转向方案:
bash
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/Resources
相关资源
skills/strategy-pivot-designer/scripts/detect_stagnation.pyskills/strategy-pivot-designer/scripts/generate_pivots.pyreferences/stagnation_triggers.mdreferences/strategy_archetypes.mdreferences/pivot_techniques.mdreferences/pivot_proposal_schema.mdskills/backtest-expert/scripts/evaluate_backtest.pyskills/edge-strategy-designer/scripts/design_strategy_drafts.py
skills/strategy-pivot-designer/scripts/detect_stagnation.pyskills/strategy-pivot-designer/scripts/generate_pivots.pyreferences/stagnation_triggers.mdreferences/strategy_archetypes.mdreferences/pivot_techniques.mdreferences/pivot_proposal_schema.mdskills/backtest-expert/scripts/evaluate_backtest.pyskills/edge-strategy-designer/scripts/design_strategy_drafts.py