This skill quantifies the health of market breadth using public data from TraderMonty's GitHub repository. It generates a composite score from 0-100 (100 = healthy) across six key components, providing a quick, data-driven assessment of market participation.
Key Features:
Composite Score (0-100): Single, easy-to-understand metric for breadth health.
6-Component Analysis:
No API Key Required: Uses a publicly available CSV, making it free and reliable.
Historical Context: Compares the current score to its 3-month and 6-month moving averages.
Explicit Triggers:
Implicit Triggers:
When NOT to Use:
The entire process is handled by a single Python script.
bash
# Run the breadth analysis
python3 skills/market-breadth/scripts/breadth_analyzer.py
The script performs the following actions:
Downloads Data: Fetches the latest Market-Breadth-Data.csv from TraderMonty's public GitHub repo.
Calculates Components: For each of the 6 components, it calculates a normalized score (0-100) based on its current value relative to its 1-year range.
Computes Composite Score: A weighted average of the 6 component scores.
% > 50d MA: 25%% > 200d MA: 25%NH-NL: 20%ADL Momentum: 15%AAII Bullish: 10% (inverse scoring)SPX distance from 200d MA: 5%Generates Report: Outputs a JSON file and a human-readable Markdown summary.
The script produces two files:
breadth_report_YYYY-MM-DD.jsonbreadth_report_YYYY-MM-DD.mdJSON Output:
json
{
"composite_score": 78.5,
"assessment": "Healthy",
"trend": "Improving",
"components": {
"stocks_above_50d_ma": 85,
"stocks_above_200d_ma": 90,
"new_highs_lows": 75,
"ad_line_momentum": 60,
"aaii_bullish_inverse": 70,
"spx_distance_from_200d_ma": 95
},
"moving_averages": {
"3_month": 65.2,
"6_month": 58.9
}
}
Markdown Report:
Synthesize the Markdown report into a concise, clear answer.
Example Response: "Current market breadth is healthy, with a composite score of 78.5 out of 100. This is above the 3-month average of 65.2, indicating an improving trend.
Overall, this suggests the current market rally is broad-based and well-supported."
A divergence (e.g., S&P 500 making new highs while the breadth score is falling) is a significant warning sign.