Skip to main content
skill CX Codex

strategy-pivot-designer — Claude Code skill: how to install

Detects stagnation in backtest iteration loops and generates structurally different strategy proposals when parameter tuning hits a local optimum.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tradermonty/claude-trading-skills --skill strategy-pivot-designer -a claude-code
Open on GitHub

What strategy-pivot-designer does

The skill acts as an architectural feedback loop within the Edge pipeline. When parameter optimization hits a wall, detect_stagnation.py inspects the backtest evaluation history. It detects metric plateaus, overfitting, or cases where transaction fees erase the edge.

Once stagnation is confirmed, generate_pivots.py creates alternative strategy structures using assumption inversion, archetype switching, and objective reframing. The workflow writes human-readable markdown reports, metadata manifests, and YAML proposals ready for candidate-agent.

Running the scripts requires Python 3.9+, PyYAML, an iteration history JSON file, and a base strategy draft YAML. When the diagnostic output marks a run as review_required, the tool halts proposal generation. This forces you to fix distorted metrics or division errors before trying another architecture.

What it helps with

  • Detect backtest iteration plateaus and model overfitting
  • Restructure the strategy skeleton when transaction costs defeat thin edges
  • Generate alternative strategy drafts for the same market hypothesis
  • Exports validated YAML proposals and tickets directly to candidate-agent

Example prompts for the agent

  • Inspect backtest history for stagnation using scripts/detect_stagnation.py
  • Run generate_pivots.py on the current strategy draft to propose new architectures
  • Append the latest backtest evaluation to iteration_history.json with notes on parameter changes

How to install strategy-pivot-designer

1Skills CLI (Vercel)

npx skills add tradermonty/claude-trading-skills --skill strategy-pivot-designer -a claude-code

2Manually: put the files in place

~/.claude/skills/strategy-pivot-designer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/strategy-pivot-designer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about strategy-pivot-designer

How to install strategy-pivot-designer in Claude Code?

Run npx skills add tradermonty/claude-trading-skills --skill strategy-pivot-designer -a claude-code. The skill will be installed to ~/.claude/skills/strategy-pivot-designer/SKILL.md.

What does strategy-pivot-designer do?

It breaks trading strategies out of local optima during backtest iteration loops. Instead of tweaking parameters, it diagnoses stagnation and generates structurally different strategy proposals.

What happens if stagnation diagnosis returns review_required?

Proposal generation is stopped automatically. You must first review and fix the underlying backtest metrics or overflow errors before running pivot generation.

Source text

SKILL.md · MIT
---
name: strategy-pivot-designer
description: Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.
---

# 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, insufficient profit factor, tail risk). A no-loss profit factor is not cost defeat; an undefined or overflowed ratio requires review.
3. If the diagnosis says `review_required`, repair or re-evaluate the underlying metrics first; do not generate pivots. If stagnation is confirmed, 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 · MIT · tradermonty/claude-trading-skills

Similar skills

Everything for Finance and business →

From the same set73

pead-screener Screens gap-up stocks after earnings for PEAD follow-through, reading weekly candles for red-candle pullbacks and breakouts. Handy for post-report drift setups. CX Codex +1 3,300installs kanchi-dividend-us-tax-accounting Classifies US dividend streams for stocks, REITs, and BDCs while evaluating holding periods and placement across taxable and retirement accounts. CX Codex +1 3,300installs edge-candidate-agent Turns US equity EOD observations into research tickets and exports validated candidates for trade-strategy-pipeline Phase I. CX Codex +1 3,300installs ftd-detector Detects Follow-Through Day signals using William O'Neil's methodology and scores whether it's time to increase exposure after a correction. CX Codex +1 3,300installs data-quality-checker A skill that checks market analysis documents before publication: price scale, tickers, dates, allocation totals, units. Findings come back as warnings for human review. CX Codex +1 3,300installs dividend-growth-pullback-screener Finds dividend growers with 12%+ annual payout growth that have slipped to RSI 40 or below. Useful for entering quality names during short-term weakness. CX Codex +1 3,300installs theme-detector Identifies trending cross-sector market themes and evaluates their lifecycle stage using FINVIZ data. Useful when tracking sector rotation and bullish or bearish narratives. CX Codex +1 3,300installs edge-signal-aggregator Merges output from several edge-finding skills into a single ranked shortlist with weights, deduplication and flagged contradictions. CX Codex +1 3,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor