backtest-expert
Expert guidance for systematic backtesting of trading strategies. Use when developing,…
Quantifies market breadth health using TraderMonty's public CSV data. Generates a 0-100 composite score across 6 components (100 = healthy). No API key required. Use when user asks about market breadth, participation rate, advance-decline health, whether the rally is
$ npx -y skills add tradermonty/claude-trading-skills --skill market-breadth-analyzer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/market-breadth-analyzerContext preview
The summary Claude sees to decide when to auto-load this skill.
Quantifies market breadth health using TraderMonty's public CSV data. Generates a 0-100 composite score across 6 components (100 = healthy). No API key required. Use when user asks about market breadth, participation rate, advance-decline health, whether the rally is
name: market-breadth-analyzer description: Quantifies market breadth health using TraderMonty's public CSV data. Generates a 0-100 composite score across 6 components (100 = healthy). No API key required. Use when user asks about market breadth, participation rate, advance-decline health, whether the rally is broad-based, or general market health assessment.
Quantify market breadth health using a data-driven 6-component scoring system (0-100). Uses TraderMonty's publicly available CSV data to measure how broadly the market is participating in a rally or decline.
**Score direction:** 100 = Maximum health (broad participation), 0 = Critical weakness.
**No API key required** - uses freely available CSV data from GitHub Pages.
**English:**
**Japanese:**
| Aspect | Market Breadth Analyzer | Breadth Chart Analyst | |--------|------------------------|----------------------| | Data Source | CSV (automated) | Chart images (manual) | | API Required | None | None | | Output | Quantitative 0-100 score | Qualitative chart analysis | | Components | 6 scored dimensions | Visual pattern recognition | | Repeatability | Fully reproducible | Analyst-dependent |
---
Run the analysis script. If using a nested or date-stamped `--output-dir` in cron runs, create it first; the history writer expects the directory to already exist.
mkdir -p reports/<routine-or-date> python3 skills/market-breadth-analyzer/scripts/market_breadth_analyzer.py \ --detail-url "https://tradermonty.github.io/market-breadth-analysis/market_breadth_data.csv" \ --summary-url "https://tradermonty.github.io/market-breadth-analysis/market_breadth_summary.csv" \ --output-dir reports/<routine-or-date>
For a simple ad-hoc run, omit `--output-dir` or use an existing directory. In scheduled cron runs from the repository root, prefer a repo-relative output directory such as `reports/after-close-YYYY-MM-DD` rather than an absolute path. If an absolute nested `--output-dir` unexpectedly fails at the history-writing step despite the directory existing, rerun once with the equivalent repo-relative path before treating the breadth analysis as unavailable.
The script will: 1. Fetch detail CSV (~2,500 rows, 2016-present) and summary CSV (8 metrics) 2. Validate data freshness (warn if > 5 days old) 3. Calculate all 6 component scores (with automatic weight redistribution if any component lacks data) 4. Generate composite score with zone classification 5. Track score history and compute trend (improving/deteriorating/stable) 6. Output JSON and Markdown reports
Present the generated Markdown report to the user, highlighting:
---
| # | Component | Weight | Key Signal | |---|-----------|--------|------------| | 1 | Breadth Level & Trend | **25%** | Current 8MA level + 200MA trend direction + 8MA direction modifier | | 2 | 8MA vs 200MA Crossover | **20%** | Momentum via MA gap and direction | | 3 | Peak/Trough Cycle | **20%** | Position in breadth cycle | | 4 | Bearish Signal | **15%** | Backtested bearish signal flag | | 5 | Historical Percentile | **10%** | Current vs full history distribution | | 6 | S&P 500 Divergence | **10%** | Multi-window (20d + 60d) price vs breadth divergence |
**Weight Redistribution:** If any component lacks sufficient data (e.g., no peak/trough markers detected), it is excluded and its weight is proportionally redistributed among the remaining components. The report shows both original and effective weights.
**Score History:** Composite scores are persisted across runs (keyed by data date). The report includes a trend summary (improving/deteriorating/stable) when multiple observations are available.
| Score | Zone | Equity Exposure | Action | |-------|------|-----------------|--------| | 80-100 | Strong | 90-100% | Full position, growth/momentum favored | | 60-79 | Healthy | 75-90% | Normal operations | | 40-59 | Neutral | 60-75% | Selective positioning, tighten stops | | 20-39 | Weakening | 40-60% | Profit-taking, raise cash | | 0-19 | Critical | 25-40% | Capital preservation, watch for trough |
---
**Detail CSV:** `market_breadth_data.csv`
**Summary CSV:** `market_breadth_summary.csv`
Both are publicly hosted on GitHub Pages - no authentication required.
Claude Trading Skills started as a personal project to use AI to improve my own trading process. Claude Trading Skills is a Claude Skills-based trading workflow toolkit for time-constrained individual investors.
Expert guidance for systematic backtesting of trading strategies. Use when developing,…
This skill should be used when analyzing market breadth charts, specifically the S&P 500…
Generate Minervini-style breakout trade plans from VCP screener output with worst-case risk…
Screen US stocks using William O'Neil's CANSLIM growth stock methodology. Use when user…
Synthesize the three Jason Shapiro contrarian-pipeline verdicts (COT crowding, news-reaction…
Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find…