/quant-skills:breadth-chart-analystfrom quant-skills
Analyzes S&P 500 Breadth Index and US Stock Market Uptrend Stock Ratio charts for market health assessment, signal identification, and positioning recommendations. Works with chart images or fetches CSV data from public sources.
Ships in quant-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill enables specialized analysis of two complementary market breadth charts that provide strategic (medium to long-term) and tactical (short-term) market perspectives. Analyze breadth chart images to assess market health, identify trading signals based on backtested strategies, and develop positioning recommendations. All thinking and output are conducted exclusively in English.
Use this skill when:
Do NOT use this skill when:
us-stock-analysis skill instead)sector-analyst skill instead)market-news-analyst skill instead)This skill generates markdown analysis reports saved to the reports/ directory:
breadth_200ma_analysis_[YYYY-MM-DD].mduptrend_ratio_analysis_[YYYY-MM-DD].mdbreadth_combined_analysis_[YYYY-MM-DD].mdReports include executive summaries, current readings, signal identification, scenario analysis with probabilities, and actionable positioning recommendations for different trader types.
Purpose: Medium to long-term strategic market positioning
Key Elements:
Backtested Strategy:
Purpose: Short-term tactical timing and swing trading
Key Elements:
Swing Trading Strategy:
CRITICAL: CSV data is the PRIMARY source for all Breadth values. This step MUST be executed BEFORE any image analysis.
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py
Why CSV is PRIMARY:
Data Sources:
tradermonty.github.io/market-breadth-analysis/market_breadth_data.csv
tradermonty/uptrend-dashboard/data/uptrend_ratio_timeseries.csv
tradermonty/uptrend-dashboard/data/sector_summary.csv
Data Source Priority:
| Priority | Source | Use For | Reliability |
|---|---|---|---|
| 1 (PRIMARY) | CSV Data | All numerical values, dead cross status, color | HIGH |
| 2 (SUPPLEMENTARY) | Chart Image | Visual trend context, pattern confirmation | MEDIUM |
| 3 (DEPRECATED) | UNRELIABLE | ||
| 4 (LAST RESORT) | LOW |
Expected Output:
============================================================
Breadth Data (CSV) - 2026-02-13
============================================================
--- Market Breadth (S&P 500) ---
200-Day MA: 62.26% (healthy (>=60%))
8-Day MA: 67.56% (healthy_bullish (60-73%))
8MA vs 200MA: +5.30pt (8MA ABOVE -- NO dead cross)
Trend: UPTREND
--- Uptrend Ratio (All Markets) ---
Current: 33.03% GREEN (neutral_bullish)
10MA: 32.65%, Slope: +0.0055, Trend: UP
--- Sector Summary ---
...
============================================================
Validation: After running CSV fetch, verify:
When the user provides breadth chart images for analysis:
If NO chart images are provided: Skip Steps 1, 1.5, and image-based analysis. Use CSV data from Step 0 as the sole data source and proceed directly to the analysis and report generation steps.
Language Note: All subsequent thinking, analysis, and output will be in English.
CRITICAL: Use a two-stage analysis approach to prevent misreading historical data as current values.
First, analyze the FULL chart image to understand:
Then, extract and analyze the rightmost 25% of the chart to accurately determine CURRENT values.
Execute the Python script to extract the right edge:
python3 skills/breadth-chart-analyst/scripts/extract_chart_right_edge.py <image_path> --percent 25
| Stage | Purpose | What to Extract |
|---|---|---|
| Stage 1 (Full) | Historical context, trend cycles | Overall patterns, past troughs/peaks |
| Stage 2 (Right Edge) | Current values (CRITICAL) | 8MA value, 200MA value, current color, current slope |
Common Error This Prevents:
Before beginning analysis, read the comprehensive breadth chart methodology:
Read: references/breadth_chart_methodology.md
This reference contains detailed guidance on:
To understand the chart format and visual elements, review the sample charts included in this skill:
View: skills/breadth-chart-analyst/assets/SP500_Breadth_Index_200MA_8MA.jpeg
View: skills/breadth-chart-analyst/assets/US_Stock_Market_Uptrend_Ratio.jpeg
These samples demonstrate:
If Chart 1 is provided, conduct systematic analysis:
From the chart image, identify:
This step is MANDATORY to avoid misreading recent trend changes.
CRITICAL WARNING: Charts can be deceptive. The MAJORITY of analysis errors occur because the analyst:
BEFORE analyzing trend direction, FIRST confirm line colors:
Focus intensively on the rightmost 3-5 data points of the chart (most recent weeks):
For 8MA (Orange Line) - Analyze the very latest trajectory:
Critical Questions to Answer:
For 200MA (Green Line) - Analyze the very latest trajectory:
Failed Reversal Detection (CRITICAL): If an 8MA trough (purple ▼) was recently identified:
Example Analysis Format:
Latest 8MA Data Points (rightmost to left):
- Current (Week 0): 48%
- 1 week ago: 52%
- 2 weeks ago: 55%
- 3 weeks ago: 50%
Analysis: 8MA is FALLING. It rose from 50% to 55% (weeks 3-2), but has since declined to 48%.
This shows a failed reversal pattern - bounce was temporary, downtrend has resumed.
SLOPE: Falling (not rising!)
MANDATORY CROSS-CHECK (to catch misreadings): After determining the trend, ask yourself:
Look for and document:
Based on readings and patterns, classify the current market as:
Support the classification with specific evidence from the chart.
Apply the backtested strategy rules with STRICT confirmation requirements:
Check for BUY signal (ALL criteria must be met):
BUY Signal Status:
Check for SELL signal:
Current position determination:
Create 2-3 scenarios with probability estimates:
If Chart 2 is provided, conduct systematic analysis:
NOTE (Issue #7): This OpenCV detection step is DEPRECATED. Use CSV data from Step 0 as the PRIMARY source. The OpenCV script may be run for supplementary validation only, but CSV values take precedence in all cases.
python3 skills/breadth-chart-analyst/scripts/detect_uptrend_ratio.py <image_path> [--debug]
From the chart image, identify:
Look for and document:
Based on current ratio and color, classify as:
Support the classification with specific evidence from the chart.
Apply the swing trading strategy rules:
Check for ENTER LONG signal:
Check for EXIT LONG signal:
Current position: Long, Flat, Preparing to Enter, or Preparing to Exit
Create 2-3 scenarios with probability estimates:
If both charts are provided, integrate the strategic and tactical perspectives:
Create a positioning matrix:
Determine which of the four scenarios applies:
Scenario 1: Both Bullish
Scenario 2: Strategic Bullish, Tactical Bearish
Scenario 3: Strategic Bearish, Tactical Bullish
Scenario 4: Both Bearish
Provide integrated positioning guidance for:
Address any conflicts between charts and explain resolution.
Create a comprehensive markdown report using the template structure:
Read and use as template: skills/breadth-chart-analyst/assets/breadth_analysis_template.md
IMPORTANT: All analysis and output must be in English.
The report structure varies based on which chart(s) are analyzed:
If Chart 1 only:
If Chart 2 only:
If Both Charts:
File Naming Convention: Save each analysis as:
breadth_200ma_analysis_[YYYY-MM-DD].mduptrend_ratio_analysis_[YYYY-MM-DD].mdbreadth_combined_analysis_[YYYY-MM-DD].mdBefore finalizing the report, verify:
FINAL SANITY CHECK:
Symptom: Report claims 8MA is rising when it's actually the 200MA that's rising
Prevention:
Symptom: Report describes what happened 1-2 months ago, not what's happening NOW
Prevention:
Symptom: Report is bullish when 8MA and 200MA are about to death cross (bearish)
Prevention:
Symptom: Report claims bullish setup when chart shows pink downtrend background
Prevention:
Symptom: Report says "BUY signal confirmed" after only 1 week of increase
Prevention:
User: "breadth分析して" (Analyze breadth)
[No chart images provided]
Breadth Analyst:
1. Executes fetch_breadth_csv.py to get latest CSV data
2. Reads breadth_chart_methodology.md
3. Analyzes CSV data:
- 200MA: 62.26% (healthy)
- 8MA: 67.56% (healthy_bullish)
- 8MA vs 200MA: +5.30pt (NO dead cross)
- Uptrend Ratio: 33.03% GREEN (neutral_bullish)
- Sector summary with overbought/oversold sectors
4. Assesses market regime based on CSV values
5. Generates report: breadth_combined_analysis_2026-03-16.md
User: "Please analyze this S&P 500 breadth chart and tell me where we are in the market cycle."
[Provides Chart 1 image: 200MA Breadth Index]
Breadth Analyst (thinking in English):
1. Executes CSV fetch for authoritative numerical values
2. Confirms receipt of Chart 1 (200MA-based breadth index)
3. Reads breadth_chart_methodology.md for Chart 1 guidance
4. Two-stage analysis: full chart → right edge extraction
5. Cross-checks CSV values with chart readings
6. Generates comprehensive report in English
User: "Analyze both of these breadth charts and give me your overall market view."
[Provides both Chart 1 and Chart 2 images]
Breadth Analyst (thinking in English):
1. Executes CSV fetch as PRIMARY source
2. Confirms receipt of both charts
3. Reads full breadth_chart_methodology.md
4. Two-stage analysis for each chart
5. Cross-checks all values against CSV data
6. Combined assessment and unified recommendation
7. Generates comprehensive combined report
This skill includes the following bundled resources:
Comprehensive methodology covering:
Usage: Read this file before conducting any breadth chart analysis to ensure systematic, accurate interpretation.
Structured template for breadth analysis reports in English.
Usage: Use this template structure for every analysis report.
Sample Chart 1 image for format reference.
Sample Chart 2 image for format reference.
PRIMARY data source. Fetches market breadth, uptrend ratio, and sector summary data from public CSV sources. Uses only stdlib (urllib + csv) -- no external dependencies.
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py # Human-readable
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py --json # JSON output
Extracts the rightmost portion of chart images to help focus on latest data points. Requires PIL/Pillow.
python3 skills/breadth-chart-analyst/scripts/extract_chart_right_edge.py <image_path> --percent 25
OpenCV-based uptrend ratio detection. Superseded by CSV fetch. Requires opencv-python + numpy.
OpenCV-based breadth value detection. Superseded by CSV fetch. Requires opencv-python + numpy.
CRITICAL: All analysis, thinking, and output MUST be in English. This includes:
Do not translate or use any other language. The user expects English output exclusively.
This skill emphasizes backtested, systematic strategies rather than discretionary interpretation. Always:
The goal is actionable intelligence. Every analysis should answer:
README.md (opens in a new tab)assets/US_Stock_Market_Uptrend_Ratio.jpeg (opens in a new tab)assets/breadth_analysis_template.md (opens in a new tab)references/breadth_chart_methodology.md (opens in a new tab)scripts/detect_breadth_values.py (opens in a new tab)scripts/detect_uptrend_ratio.py (opens in a new tab)scripts/extract_chart_right_edge.py (opens in a new tab)scripts/fetch_breadth_csv.py (opens in a new tab)scripts/tests/__init__.py (opens in a new tab)scripts/tests/conftest.py (opens in a new tab)scripts/tests/test_detect_uptrend_ratio.py (opens in a new tab)scripts/tests/test_fetch_breadth_csv.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
market-breadth, sp500, trading-signals, position-sizing, market-analysis
npx claudepluginhub mphinance/alpha-skills --plugin quant-skills64 skills in this plugin
/0dte-flow0DTE day-trading playbook for a small account — Ghost Alpha signals into Tradier XSP (Mini-SPX) same-day options with strict IFTTT entry/exit rules and hard risk guardrails. Use when Michael wants to run a 0DTE session, size a contract, decide whether a signal qualifies, or apply the exit cascade. This is a DECISION-SUPPORT playbook — it drafts the plan; Michael places every order./backtest-expertExpert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development./batch-scannerRun the full suite of stock-screening strategies in sequence and export results to Google Sheets (one tab per strategy). Use when Michael wants to run the nightly/weekend scans, refresh the screener tabs, run a specific strategy, or understand which strategies are available and what each surfaces./breakout-trade-plannerGenerate Minervini-style breakout trade plans from VCP screener output with worst-case risk calculation, portfolio heat management, and Alpaca-compatible order templates (stop-limit bracket for pre-placement, limit bracket for post-confirmation). Use when user has VCP screener results and wants actionable trade plans with entry/stop/target levels and position sizing./broker-mcp-selectorPick a broker MCP server your AI agent can actually execute trades through, and wire it up safely. Use when the user wants to place, submit, or automate real orders; connect an agent to a brokerage account; choose between Alpaca, IBKR, Tradier, Robinhood, Schwab, Kraken and other broker MCP servers; move from analysis to execution; or check whether a broker's MCP server can trade, is read-only, or is safe to connect to real money. This is the "hands" that execute what the rest of the Alpha Skills suite decides./canslim-screenerScreen US stocks using William O'Neil's CANSLIM growth stock methodology. Use when user requests CANSLIM stock screening, growth stock analysis, momentum stock identification, or wants to find stocks with strong earnings and price momentum following O'Neil's investment system.Other plugins' skills for the same job