uptrend-analyzer
tradermonty/claude-trading-skills
Diagnose market breadth health using free Uptrend Ratio data—no API key required.
What is uptrend-analyzer?
Analyzes market participation across ~2,800 US stocks using Monty's Uptrend Ratio Dashboard to generate a 0-100 composite score. Use this when assessing whether current market conditions support equity exposure or to evaluate breadth across sectors and momentum.
- Calculates a 0-100 composite score from 5 weighted components: breadth, sector participation, rotation, momentum, and historical context
- Downloads free CSV data from GitHub—no paid API subscriptions or keys required
- Generates sector heatmaps showing strongest and weakest performing sectors
- Provides exposure guidance (Full/Normal/Reduced/Defensive/Preservation) based on score zones
- Applies warning penalties for late-cycle conditions, high sector spread, and divergence signals
How to install uptrend-analyzer
npx skills add https://github.com/tradermonty/claude-trading-skills --skill uptrend-analyzer- Python 3.9 or later with requests library
- Internet connection to fetch CSV data from GitHub
How to use uptrend-analyzer
- 1.Run the analysis script: python3 skills/uptrend-analyzer/scripts/uptrend_analyzer.py
- 2.Review the generated Markdown report highlighting composite score and zone classification
- 3.Check sector heatmap to identify strongest and weakest sectors
- 4.Apply the exposure guidance (Full/Normal/Reduced/Defensive/Preservation) to your portfolio
- 5.Monitor momentum and rotation signals for tactical adjustments
Use cases
- Assess whether current market breadth supports maintaining full equity exposure or reducing risk
- Diagnose narrow vs. broad market rallies to inform portfolio positioning
- Evaluate sector rotation patterns and cyclical vs. defensive balance
- Monitor historical percentile rank to contextualize current breadth conditions
- Guide tactical allocation decisions when market participation narrows
- Equity traders and portfolio managers
- Market analysts evaluating breadth conditions
- Investors using breadth-based market timing strategies
- Anyone following Monty's Uptrend Ratio Dashboard
uptrend-analyzer FAQ
No. This skill uses free CSV data from GitHub, so no API subscriptions or keys are required.
Run it whenever you want to assess current market breadth conditions or when market participation changes significantly—typically daily or weekly depending on your trading timeframe.
Uptrend Analyzer focuses on breadth participation (higher score = healthier) using free data; Market Top Detector assesses top-formation risk (higher score = riskier) using paid FMP API data.
Scores 80-100 suggest Full Exposure (100%), 60-79 Normal (80-100%), 40-59 Reduced (60-80%), 20-39 Defensive (30-60%), and 0-19 Capital Preservation (0-30%).
Late-cycle, high-spread, and divergence warnings trigger penalties (up to -10 total) that tighten exposure guidance even when the composite score is high.
Full instructions (SKILL.md)
Source of truth, from tradermonty/claude-trading-skills.
name: uptrend-analyzer description: Analyzes market breadth using Monty's Uptrend Ratio Dashboard data to diagnose the current market environment. Generates a 0-100 composite score from 5 components (breadth, sector participation, rotation, momentum, historical context). Use when asking about market breadth, uptrend ratios, or whether the market environment supports equity exposure. No API key required.
Uptrend Analyzer Skill
Purpose
Diagnose market breadth health using Monty's Uptrend Ratio Dashboard, which tracks ~2,800 US stocks across 11 sectors. Generates a 0-100 composite score (higher = healthier) with exposure guidance.
Unlike the Market Top Detector (API-based risk scorer), this skill uses free CSV data to assess "participation breadth" - whether the market's advance is broad or narrow.
When to Use This Skill
English:
- User asks "Is the market breadth healthy?" or "How broad is the rally?"
- User wants to assess uptrend ratios across sectors
- User asks about market participation or breadth conditions
- User needs exposure guidance based on breadth analysis
- User references Monty's Uptrend Dashboard or uptrend ratios
Japanese:
- 「市場のブレドスは健全?」「上昇の裾野は広い?」
- セクター別のアップトレンド比率を確認したい
- 相場参加率・ブレドス状況を診断したい
- ブレドス分析に基づくエクスポージャーガイダンスが欲しい
- Montyのアップトレンドダッシュボードについて質問
Prerequisites
- Python 3.9+ with the
requestslibrary (CSV parsing uses the stdlibcsv/iomodules) - Internet connection to fetch CSV data from GitHub (no API key required)
- No paid API subscriptions needed
Difference from Market Top Detector
| Aspect | Uptrend Analyzer | Market Top Detector |
|---|---|---|
| Score Direction | Higher = healthier | Higher = riskier |
| Data Source | Free GitHub CSV | FMP API (paid) |
| Focus | Breadth participation | Top formation risk |
| API Key | Not required | Required (FMP) |
| Methodology | Monty Uptrend Ratios | O'Neil/Minervini/Monty |
Execution Workflow
Phase 1: Execute Python Script
Run the analysis script (no API key needed):
python3 skills/uptrend-analyzer/scripts/uptrend_analyzer.py
The script will:
- Download CSV data from Monty's GitHub repository
- Calculate 5 component scores
- Generate composite score and reports
Phase 2: Present Results
Present the generated Markdown report to the user, highlighting:
- Composite score and zone classification
- Exposure guidance (Full/Normal/Reduced/Defensive/Preservation)
- Sector heatmap showing strongest and weakest sectors
- Key momentum and rotation signals
5-Component Scoring System
| # | Component | Weight | Key Signal |
|---|---|---|---|
| 1 | Market Breadth (Overall) | 30% | Ratio level + trend direction |
| 2 | Sector Participation | 25% | Uptrend sector count + ratio spread |
| 3 | Sector Rotation | 15% | Cyclical vs Defensive balance |
| 4 | Momentum | 20% | Slope direction + acceleration |
| 5 | Historical Context | 10% | Percentile rank in history |
Scoring Zones
| Score | Zone | Exposure Guidance |
|---|---|---|
| 80-100 | Strong Bull | Full Exposure (100%) |
| 60-79 | Bull | Normal Exposure (80-100%) |
| 40-59 | Neutral | Reduced Exposure (60-80%) |
| 20-39 | Cautious | Defensive (30-60%) |
| 0-19 | Bear | Capital Preservation (0-30%) |
7-Level Zone Detail
Each scoring zone is further divided into sub-zones for finer-grained assessment:
| Score | Zone Detail | Color |
|---|---|---|
| 80-100 | Strong Bull | Green |
| 70-79 | Bull-Upper | Light Green |
| 60-69 | Bull-Lower | Light Green |
| 40-59 | Neutral | Yellow |
| 30-39 | Cautious-Upper | Orange |
| 20-29 | Cautious-Lower | Orange |
| 0-19 | Bear | Red |
Warning System
Active warnings trigger exposure penalties that tighten guidance even when the composite score is high:
| Warning | Condition | Penalty |
|---|---|---|
| Late Cycle | Commodity avg > both Cyclical and Defensive | -5 |
| High Spread | Max-min sector ratio spread > 40pp | -3 |
| Divergence | Intra-group std > 8pp, spread > 20pp, or trend dissenters | -3 |
Penalties stack (max -10) + multi-warning discount (+1 when ≥2 active). Applied after composite scoring.
Momentum Smoothing
Slope values are smoothed using EMA(3) (Exponential Moving Average, span=3) before scoring. Acceleration is calculated by comparing the recent 10-point average vs prior 10-point average of smoothed slopes (10v10 window), with fallback to 5v5 when fewer than 20 data points are available.
Historical Confidence Indicator
The Historical Context component includes a confidence assessment based on:
- Sample size: Number of historical data points available
- Regime coverage: Proportion of distinct market regimes (bull/bear/neutral) observed
- Recency: How recent the latest data point is
Confidence levels: High, Medium, Low.
API Requirements
Required: None (uses free GitHub CSV data)
Output Files
- JSON:
uptrend_analysis_YYYY-MM-DD_HHMMSS.json - Markdown:
uptrend_analysis_YYYY-MM-DD_HHMMSS.md
Reference Documents
references/uptrend_methodology.md
- Uptrend Ratio definition and thresholds
- 5-component scoring methodology
- Sector classification (Cyclical/Defensive/Commodity)
- Historical calibration notes
When to Load References
- First use: Load
uptrend_methodology.mdfor full framework understanding - Regular execution: References not needed - script handles scoring
Related skills
More from tradermonty/claude-trading-skills and the wider catalog.

us-market-bubble-detector
Quantitative bubble risk assessment using objective market metrics and strict data-driven scoring.

us-stock-analysis
Comprehensive fundamental and technical analysis for US stocks with real-time data and investment reports.

value-dividend-screener
Screen US stocks for high-quality dividend opportunities combining value metrics, attractive yields, and consistent growth.

vcp-screener
Screen S&P 500 for Mark Minervini's Volatility Contraction Pattern (VCP) setups or backtest historical patterns on individual tickers.

weekly-performance-digest
Generate weekly performance summaries from closed trades with win rate, expectancy, profit factor, and pattern analysis.

address-sanitizer
Detect memory errors like buffer overflows and use-after-free in C/C++/Rust via AddressSanitizer instrumentation.