
Market Breadth Analyzer
Quantify S&P 500 participation and composite market health before sizing risk or timing entries.
Overview
Market Breadth Analyzer is an agent skill most often used in Idea (also Operate, Validate) that scores S&P 500 participation across six dimensions into a 0–100 composite health reading.
Install
npx skills add https://github.com/tradermonty/claude-trading-skills --skill market-breadth-analyzerWhat is this skill?
- Composite health score from 0 (critical) to 100 (maximum health)
- Six breadth dimensions with TraderMonty dataset conventions
- Breadth index vs 8-day and 200-day EMA (not SMA) on % above 200DMA
- Threshold table for 8MA bands from extreme weakness to very strong breadth
- Flags narrowing rallies where fewer stocks lead—a common pre-correction signal
- Composite score 0–100 across 6 breadth dimensions
- 8MA and 200MA use EMA (ewm span) not SMA
Adoption & trust: 563 installs on skills.sh; 1.8k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You see index highs but cannot tell whether the move is broad participation or a fragile rally led by a handful of names.
Who is it for?
Swing or position traders and builder-operators who already use breadth data and want agents to apply fixed EMA rules and scoring.
Skip if: Intraday scalpers needing tick data, crypto-only books without equivalent breadth feeds, or users wanting trade signals without understanding the methodology.
When should I use this skill?
When evaluating rally quality, regime shifts, or risk around index highs using S&P 500 breadth above 200DMA.
What do I get? / Deliverables
You get a threshold-backed breadth narrative and composite score so risk and timing decisions align with market structure, not headline price alone.
- Structured breadth report with composite score and threshold interpretation
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Breadth research belongs on the Idea shelf as macro context traders gather before committing capital or strategy changes. Research subphase covers market structure and dataset interpretation—not live execution or ops monitoring alone.
Where it fits
Score weekly breadth before deciding whether to add exposure into an index-led grind higher.
Check if 8MA sits in a weakening band before paper-trading a new sector rotation idea.
Re-run the six-dimension composite during a correction to see if extreme weakness hints at trough formation.
Draft a newsletter section explaining participation using the published threshold table.
How it compares
Methodology skill for interpreting breadth series—not a broker integration or automated order router.
Common Questions / FAQ
Who is market-breadth-analyzer for?
Solo traders and small teams analyzing U.S. large-cap breadth who want Claude or Cursor to apply TraderMonty's six-dimension framework consistently.
When should I use market-breadth-analyzer?
During Idea-phase macro research, before Validate-style sizing a new strategy, and in Operate when reviewing whether ongoing rallies still have broad participation.
Is market-breadth-analyzer safe to install?
It is analytical prose only; confirm data sources and licensing separately and review the Security Audits panel on this page.
SKILL.md
READMESKILL.md - Market Breadth Analyzer
# Market Breadth Analysis Methodology ## Overview Market breadth measures the degree of participation in a market move. A healthy advance is characterized by broad participation (many stocks rising), while a narrowing market (fewer stocks leading) often precedes corrections. This methodology uses TraderMonty's breadth dataset to quantify market health across 6 dimensions, producing a composite score from 0 (critical) to 100 (maximum health). --- ## Data Description ### Breadth Index The breadth index (0-1) measures the proportion of S&P 500 stocks trading above their 200-day moving average. Key derivatives: - **Raw:** Daily breadth value (percentage of stocks above 200DMA) - **8-day EMA (8MA):** Short-term exponentially weighted moving average (fast signal) - **200-day EMA (200MA):** Long-term exponentially weighted moving average (trend filter) **Important:** Both moving averages use **EMA** (Exponential Moving Average), not SMA. The source repository calculates them as `ewm(span=N, adjust=False)`. EMA gives more weight to recent data points, making it more responsive to changes than SMA. ### Key Thresholds | Level | Interpretation | |-------|---------------| | 8MA > 0.70 | Very strong breadth - broad rally | | 8MA > 0.60 | Healthy breadth - above average participation | | 8MA > 0.50 | Neutral - about half of stocks participating | | 8MA > 0.40 | Weakening - below average participation | | 8MA < 0.40 | Extreme weakness - potential trough formation | | 8MA < 0.20 | Crisis levels - rare, precedes major bottoms | ### Signal Flags - **Breadth_200MA_Trend:** 1 = 200MA rising (bullish regime), -1 = 200MA falling (bearish regime). Uses hysteresis with threshold=0.001 to prevent whipsaw signals. - **Bearish_Signal:** Backtested signal combining trend and momentum deterioration - **Is_Peak / Is_Trough:** Cyclical turning points detected using `scipy.signal.find_peaks` with `distance=50, prominence=0.015` on the 200MA. This ensures at least 50 trading days (~10 weeks) between consecutive peaks/troughs and a minimum prominence of 0.015. - **Is_Trough_8MA_Below_04:** Extreme trough marker detected with `prominence=0.02` on inverted 8MA values below 0.4. ### Pink Zone (Bearish Region) The source repository's charts use a pink background to highlight the most dangerous market condition: ``` Pink Zone = (Breadth_200MA_Trend == -1) AND (8MA < 200MA) ``` This means the long-term trend is declining AND the short-term breadth has fallen below the long-term average. Historically, markets in the Pink Zone experience elevated volatility and downside risk. The Pink Zone is distinct from the Bearish_Signal flag - it is a structural condition that can persist for weeks or months. --- ## Component Details ### C1: Current Breadth Level & Trend (25%) **Rationale:** The most direct measure of current market health. Higher 8MA means more stocks participating; uptrend in 200MA means the long-term structure is supportive. **Weighting within component:** - 8MA Level: 70% - immediate health snapshot - 200MA Trend: 30% - longer-term regime confirmation **8MA Direction Modifier:** A 5-day lookback on the 8MA itself adjusts the score based on the short-term direction of breadth. This ensures C1 considers not just the level, but whether breadth is accelerating or decelerating: | Condition | Modifier | Rationale | |-----------|----------|-----------| | 8MA falling & level > 0.60 | -10 | Deceleration from a high level — early warning of potential peak | | 8MA falling & level < 0.40 | +5 | Near-bottom with limited further downside — less penalty | | 8MA rising & level < 0.60 | +5 | Early recovery bonus — breadth improving from a weak base | | Otherwise | 0 | No adjustment needed | **Key insight:** An 8MA of 0.65 in an uptrend (score ~80) is healthier than 0.65 in a downtrend (score ~62), because the downtrend context suggests the level may be transient. The direction modifier further differentiates: a falling 8MA at 0.65 signals emerging weakness