Strategy Pivot Designer

作者 tradermontyeab8d5cb97b9无许可证2.9K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库3天前更新

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

AI 生成的概览

检测回测迭代停滞,并为交易策略生成结构不同的策略转向方案。

功能
该技能分析累积的回测评估历史,以检测停滞触发因素,例如分数平台期、过拟合、成本侵蚀和尾部风险。当发现停滞时,它会通过假设反转、原型切换和目标重构来生成结构不同的策略转向方案。它会产出策略草稿 YAML 文件、人类可读的转向报告、清单以及诊断 JSON。方案按质量潜力和新颖性排序,可导出的草稿会附带用于候选代理流水线的工单 YAML。
适用场景
当回测分数在多次改进后仍停滞不前、策略出现过拟合迹象、交易成本侵蚀微弱优势,或回撤超出可接受阈值时,可使用该技能。它也适合针对同一市场假设探索根本不同的策略架构。
运行要求
Python 3.9+、PyYAML、回测评估的迭代历史 JSON,以及源策略草稿 YAML。它附带用于停滞检测和转向方案生成的可执行脚本。

Strategy 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.

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)

Output

  • pivot_drafts/research_only/*.yaml — strategy_draft compatible YAML proposals
  • pivot_drafts/exportable/*.yaml — export-ready drafts + ticket YAML for candidate-agent
  • pivot_report_*.md — human-readable pivot analysis
  • pivot_manifest_*.json — metadata for all generated files
  • pivot_diagnosis_*.json — stagnation detection results

Workflow

  1. Accumulate backtest evaluation results into an iteration history file using --append-eval.
  2. Run stagnation detection on the history to identify triggers (plateau, overfitting, cost defeat, tail risk).
  3. If stagnation detected, generate pivot proposals using three techniques: assumption inversion, archetype switch, objective reframe.
  4. Review ranked proposals (scored by quality potential + novelty).
  5. For exportable proposals, ticket YAML is ready for edge-candidate-agent pipeline.
  6. For research_only proposals, manual strategy design needed before pipeline integration.
  7. Feed the selected pivot draft back into backtest-expert for the next iteration cycle.

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/

Resources

  • 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

来源与署名

来源:tradermonty/claude-trading-skills位于skills/strategy-pivot-designer提交eab8d5c

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 tradermonty/claude-trading-skills 的技能

Weekly Performance Digest

tradermonty

将已平仓的交易论点汇总为每周绩效报告,包含指标、模式分解和经验教训。

包含脚本
Data & Analytics2.9K3天前更新

Trade Performance Coach

tradermonty

审查已记录的交易,评估流程遵守、风险纪律、执行质量与行为模式,并生成教练报告。

包含脚本
Business & Finance2.9K3天前更新

Skill Designer

tradermonty

Design new Claude skills from structured idea specifications. Use when the skill auto-generation pipeline needs to produce a Claude CLI prompt that creates a complete skill directory (SKILL.md, references, scripts, tests) following repository conventions.

包含脚本
待分类2.9K3天前更新

Residual Edge Analyzer

tradermonty

Separate a strategy return series into declared baseline exposure and residual edge with returns-based OLS attribution, HAC inference, rolling stability, alternate-baseline sensitivity, and regime breakdowns. Use when evaluating whether backtest, out-of-sample, or live returns contain independent alpha beyond market, equal-weight, momentum, sector, or user-supplied factor returns; when explaining whether a drawdown came from baseline exposure or strategy-specific behavior; or when a strategy needs an attribution quality gate after backtesting. Do not use for holdings-based Brinson attribution, feature-level Shapley explanations, or analysis from summary metrics without a dated return series.

包含脚本
待分类2.9K3天前更新

Pre Trade Discipline Gate

tradermonty

离线交易前检查清单闸门,批准、复核或阻止计划中的手动订单并记录决策。

包含脚本
Business & Finance2.9K3天前更新

Manifoldbt Backtester

tradermonty

Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores. Use when the user wants to execute a backtest, measure a rule they have described, obtain win rate / average win / average loss / max drawdown from real bars, or feed backtest-expert with measured numbers instead of estimates.

包含脚本
待分类2.9K3天前更新