Agent skill
market-breadth-analyzer
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.
Install this agent skill to your Project
npx add-skill https://github.com/tradermonty/claude-trading-skills/tree/main/skills/market-breadth-analyzer
SKILL.md
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.8+ with
requestslibrary (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
| 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 |
Execution Workflow
Phase 1: Execute Python Script
Run the analysis script:
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"
The script will:
- Fetch detail CSV (~2,500 rows, 2016-present) and summary CSV (8 metrics)
- Validate data freshness (warn if > 5 days old)
- Calculate all 6 component scores (with automatic weight redistribution if any component lacks data)
- Generate composite score with zone classification
- Track score history and compute trend (improving/deteriorating/stable)
- 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
| # | 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.
Health Zone Mapping (100 = Healthy)
| 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 |
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
technical-analyst
This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs. Use this skill when the user provides chart images and requests technical analysis, trend identification, support/resistance levels, scenario planning, or probability assessments based purely on chart data without consideration of news or fundamental factors.
market-environment-analysis
Comprehensive market environment analysis and reporting tool. Analyzes global markets including US, European, Asian markets, forex, commodities, and economic indicators. Provides risk-on/risk-off assessment, sector analysis, and technical indicator interpretation. Triggers on keywords like market analysis, market environment, global markets, trading environment, market conditions, investment climate, market sentiment, forex analysis, stock market analysis, 相場環境, 市場分析, マーケット状況, 投資環境.
us-stock-analysis
Comprehensive US stock analysis including fundamental analysis (financial metrics, business quality, valuation), technical analysis (indicators, chart patterns, support/resistance), stock comparisons, and investment report generation. Use when user requests analysis of US stock tickers (e.g., "analyze AAPL", "compare TSLA vs NVDA", "give me a report on Microsoft"), evaluation of financial metrics, technical chart analysis, or investment recommendations for American stocks.
stanley-druckenmiller-investment
スタンレー・ドラッケンミラーの投資哲学と戦略に基づいた投資アドバイスを提供。30年間無敗、年率30%近いリターンを達成した伝説的投資家の思考法を活用し、マクロ経済分析、リスク管理、ポジション構築、市場サイクルの読み方などについて実践的な指導を行う。投資判断、市場分析、リスク管理、ポートフォリオ構築などの相談時に使用。
earnings-calendar
This skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calendar data, wants to know which companies are reporting earnings in the upcoming week, or needs a weekly earnings review. The skill focuses on mid-cap and above companies (over $2B market cap) that have significant market impact, organizing the data by date and timing in a clean markdown table format. Supports multiple environments (CLI, Desktop, Web) with flexible API key management.
breadth-chart-analyst
This skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the US Stock Market Uptrend Stock Ratio charts. Use this skill when the user provides breadth chart images for analysis, requests market breadth assessment, positioning strategy recommendations, or wants to understand medium-term strategic and short-term tactical market outlook based on breadth indicators. All analysis and output are conducted in English.
Didn't find tool you were looking for?