Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
tradermonty avatar

Market Breadth Analyzer

  • 936 installs
  • 2.5k repo stars
  • Updated July 26, 2026
  • tradermonty/claude-trading-skills

market-breadth-analyzer is an agent skill that quantifies real-time stock market participation and health across six breadth dimensions using TraderMonty's dataset to produce a 0–100 composite score.

About

market-breadth-analyzer is a TraderMonty Claude trading skill that measures how broadly S&P 500 stocks participate in market moves. A healthy advance shows wide participation while narrowing leadership often precedes corrections. The methodology uses TraderMonty's breadth dataset across six dimensions—including the proportion of stocks above their 200-day moving average and an 8-day exponential moving average derivative—to output a composite health score from 0 (critical) to 100 (maximum health). Developers and quant engineers reach for market-breadth-analyzer before trading decisions or fintech product scoping when they need an objective read on market internals rather than index price alone.

  • Quantifies market health across 6 dimensions using TraderMonty's breadth dataset
  • Produces composite score from 0 (critical) to 100 (maximum health)
  • Tracks Breadth Index with Raw, 8-day EMA, and 200-day EMA values
  • Applies 6 key EMA thresholds from >0.70 (very strong) to <0.20 (extreme weakness)
  • Delivers structured signals for rally confirmation or correction warnings

Market Breadth Analyzer by the numbers

  • 936 all-time installs (skills.sh)
  • +49 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #307 of 2,066 Data Science & ML skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/tradermonty/claude-trading-skills --skill market-breadth-analyzer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs936
repo stars2.5k
Security audit2 / 3 scanners passed
Last updatedJuly 26, 2026
Repositorytradermonty/claude-trading-skills

How do you measure stock market breadth health?

Quantify real-time stock market participation and health before making trading or fintech product decisions.

Who is it for?

Quant developers and fintech engineers who need a structured breadth read on S&P 500 participation before trades or product logic.

Skip if: Single-stock fundamental analysis or developers with no access to breadth index data and no trading context.

When should I use this skill?

A developer asks to assess market health, breadth participation, or whether an advance is broad or narrow before trading or building fintech signals.

What you get

A composite market breadth score from 0 to 100 with six dimension breakdowns from the TraderMonty breadth dataset.

  • composite breadth score
  • six-dimension breadth breakdown

By the numbers

  • Produces a composite score from 0 (critical) to 100 (maximum health)
  • Analyzes market breadth across 6 dimensions
  • Tracks S&P 500 stocks above the 200-day moving average with 8-day EMA derivatives

Files

SKILL.mdMarkdownGitHub ↗

Market Breadth Analyzer Skill

Purpose

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.

When to Use This Skill

English:

  • User asks "Is the market rally broad-based?" or "How healthy is market breadth?"
  • User wants to assess market participation rate
  • User asks about advance-decline indicators or breadth thrust
  • User wants to know if the market is narrowing (fewer stocks participating)
  • User asks about equity exposure levels based on breadth conditions

Japanese:

  • 「マーケットブレッドスはどうですか?」「市場の参加率は?」
  • 「上昇は広がっている?」「一部の銘柄だけの上昇?」
  • ブレッドス指標に基づくエクスポージャー判断
  • 市場の健康度をデータで確認したい

Prerequisites

  • Python 3.9+ with requests library (for fetching CSV data)
  • Internet access to reach GitHub Pages URLs
  • No API keys required - uses freely available public CSV data

Difference from Breadth Chart Analyst

AspectMarket Breadth AnalyzerBreadth Chart Analyst
Data SourceCSV (automated)Chart images (manual)
API RequiredNoneNone
OutputQuantitative 0-100 scoreQualitative chart analysis
Components6 scored dimensionsVisual pattern recognition
RepeatabilityFully reproducibleAnalyst-dependent

---

Execution Workflow

Phase 1: Execute Python Script

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

Phase 2: Present Results

Present the generated Markdown report to the user, highlighting:

  • Composite score and health zone
  • Strongest and weakest components
  • Recommended equity exposure level
  • Key breadth levels to watch
  • Any data freshness warnings

---

6-Component Scoring System

#ComponentWeightKey Signal
1Breadth Level & Trend25%Current 8MA level + 200MA trend direction + 8MA direction modifier
28MA vs 200MA Crossover20%Momentum via MA gap and direction
3Peak/Trough Cycle20%Position in breadth cycle
4Bearish Signal15%Backtested bearish signal flag
5Historical Percentile10%Current vs full history distribution
6S&P 500 Divergence10%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.

Health Zone Mapping (100 = Healthy)

ScoreZoneEquity ExposureAction
80-100Strong90-100%Full position, growth/momentum favored
60-79Healthy75-90%Normal operations
40-59Neutral60-75%Selective positioning, tighten stops
20-39Weakening40-60%Profit-taking, raise cash
0-19Critical25-40%Capital preservation, watch for trough

---

Data Sources

Detail CSV: market_breadth_data.csv

  • ~2,500 rows from 2016-02 to present
  • Columns: Date, S&P500_Price, Breadth_Index_Raw, Breadth_Index_200MA, Breadth_Index_8MA, Breadth_200MA_Trend, Bearish_Signal, Is_Peak, Is_Trough, Is_Trough_8MA_Below_04

Summary CSV: market_breadth_summary.csv

  • 8 aggregate metrics (average peaks, average troughs, counts, analysis period)

Both are publicly hosted on GitHub Pages - no authentication required.

Output Files

  • JSON: market_breadth_YYYY-MM-DD_HHMMSS.json
  • Markdown: market_breadth_YYYY-MM-DD_HHMMSS.md
  • History: market_breadth_history.json (persists across runs, max 20 entries)

Reference Documents

references/breadth_analysis_methodology.md

  • Full methodology with component scoring details
  • Threshold explanations and zone definitions
  • Historical context and interpretation guide

When to Load References

  • First use: Load methodology reference for framework understanding
  • Regular execution: References not needed - script handles scoring

Related skills

FAQ

What score range does market-breadth-analyzer produce?

market-breadth-analyzer produces a composite market health score from 0 (critical) to 100 (maximum health) by aggregating six breadth dimensions from the TraderMonty dataset.

What does the breadth index measure?

The breadth index measures the proportion of S&P 500 stocks trading above their 200-day moving average, with raw daily values and 8-day exponential moving average derivatives for trend context.

Is Market Breadth Analyzer safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Data Science & MLresearchautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.