Skip to content
cccskills
FreePublished on GitHub

uptrend-analyzer

Assess how widely US stock gains are shared across the market using uptrend ratios. The skill combines five measures into a health score and produces reports with sector comparisons, warning signals, and equity exposure guidance.

OriginalShow the original 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.

Run score Not tested

See how to install

Good for

  • Checking whether a US stock rally is broadly supported
  • Comparing uptrend participation across sectors
  • Reviewing equity exposure using market breadth
  • Tracking changes in momentum and sector rotation

Files included (28)

  • SKILL.md6.4 KB
  • references/uptrend_methodology.md13.5 KB
  • requirements.txt128 B
  • scripts/calculators/__init__.py40 B
  • scripts/calculators/historical_context_calculator.py6.8 KB
  • scripts/calculators/market_breadth_calculator.py4.9 KB
  • scripts/calculators/momentum_calculator.py7.3 KB
  • scripts/calculators/sector_participation_calculator.py6.5 KB
  • scripts/calculators/sector_rotation_calculator.py10.8 KB
  • scripts/data_fetcher.py7.6 KB
  • scripts/provenance_contract.py7.4 KB
  • scripts/report_generator.py19.1 KB
  • scripts/scorer.py14.3 KB
  • scripts/tests/conftest.py304 B
  • scripts/tests/helpers.py3.0 KB
  • scripts/tests/test_data_fetcher.py6.9 KB
  • scripts/tests/test_historical_context_calculator.py5.4 KB
  • scripts/tests/test_main_provenance.py2.1 KB
  • scripts/tests/test_market_breadth_calculator.py6.2 KB
  • scripts/tests/test_momentum_calculator.py6.4 KB
  • scripts/tests/test_new_features.py19.5 KB
  • scripts/tests/test_provenance_contract.py5.9 KB
  • scripts/tests/test_report_generator.py9.1 KB
  • scripts/tests/test_scorer.py6.3 KB
  • scripts/tests/test_sector_participation_calculator.py5.1 KB
  • scripts/tests/test_sector_rotation_calculator.py7.2 KB
  • scripts/tests/test_uptrend_analyzer.py6.1 KB
  • scripts/uptrend_analyzer.py9.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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 requests library (CSV parsing uses the stdlib csv/io modules)
  • Internet connection to fetch CSV data from GitHub (no API key required)
  • No paid API subscriptions needed

Difference from Market Top Detector

AspectUptrend AnalyzerMarket Top Detector
Score DirectionHigher = healthierHigher = riskier
Data SourceFree GitHub CSVFMP API (paid)
FocusBreadth participationTop formation risk
API KeyNot requiredRequired (FMP)
MethodologyMonty Uptrend RatiosO'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:

  1. Download CSV data from Monty's GitHub repository
  2. Calculate 5 component scores
  3. 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

#ComponentWeightKey Signal
1Market Breadth (Overall)30%Ratio level + trend direction
2Sector Participation25%Uptrend sector count + ratio spread
3Sector Rotation15%Cyclical vs Defensive balance
4Momentum20%Slope direction + acceleration
5Historical Context10%Percentile rank in history

Scoring Zones

ScoreZoneExposure Guidance
80-100Strong BullFull Exposure (100%)
60-79BullNormal Exposure (80-100%)
40-59NeutralReduced Exposure (60-80%)
20-39CautiousDefensive (30-60%)
0-19BearCapital Preservation (0-30%)

7-Level Zone Detail

Each scoring zone is further divided into sub-zones for finer-grained assessment:

ScoreZone DetailColor
80-100Strong BullGreen
70-79Bull-UpperLight Green
60-69Bull-LowerLight Green
40-59NeutralYellow
30-39Cautious-UpperOrange
20-29Cautious-LowerOrange
0-19BearRed

Warning System

Active warnings trigger exposure penalties that tighten guidance even when the composite score is high:

WarningConditionPenalty
Late CycleCommodity avg > both Cyclical and Defensive-5
High SpreadMax-min sector ratio spread > 40pp-3
DivergenceIntra-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.md for full framework understanding
  • Regular execution: References not needed - script handles scoring

Same-run provenance

Pass --run-id daily-20261017-unique to both required market-regime-daily producers. Without it each producer generates its own unique ID. JSON includes schema 1.0 data_provenance with actual primary timeseries business date, UTC retrieval time, source and run ID. Unknown adjustment, point-in-time, survivorship and corporate-action flags are false. Auxiliary summary dates are unverified; this does not certify the freshness of every composite input. Missing or malformed primary dates stop report generation.

Pass the exact JSON paths printed by these invocations to Exposure Coach's --require-provenance --run-id … --as-of … mode. Run IDs are caller-provided consistency markers, not authenticity or point-in-time proof.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

backtest-expert

FreeSummary

Plan and assess backtests, which test trading rules against historical data. Examine sensitivity to rule changes, trading costs, and data bias, then use supplied performance metrics to generate a structured evaluation with reasons that block adoption.

  • Define a backtesting plan for rule-based trading
  • Test sensitivity to parameters and trading costs
  • Investigate suspiciously strong backtest results
tradermonty/claude-trading-skills3.2KUpdated Oct 21, 2026

Assess how broadly US stock market gains are shared across stocks using public CSV data and optional charts. Produce English reports covering market conditions, trading signals, scenarios, and positioning for different investment timeframes.

  • Checking how broadly US stocks are participating in a market rise
  • Reviewing medium- to long-term market positioning
  • Assessing short-term swing trading signals
tradermonty/claude-trading-skills3.2KUpdated Oct 21, 2026

Analyze chart images showing how broadly US stocks are participating in market trends. Assess medium-term conditions and short-term signals, then produce an English report with positioning guidance, alternative scenarios, and risks based on the visible data.

  • Assessing the market cycle from an S&P 500 breadth chart
  • Checking short-term signals in an uptrend stock ratio chart
  • Comparing medium-term and short-term market signals
tradermonty/claude-trading-skills3.2KUpdated Oct 21, 2026

Turn VCP screening results, which identify narrowing price swings, into breakout trade plans. Calculate entry, stop-loss, target prices, and position sizes using worst-case entries, while applying portfolio risk limits and producing Alpaca-compatible order templates.

  • Planning entries, stop-losses, and profit targets for VCP candidates
  • Calculating position sizes from account size and risk limits
  • Checking total portfolio risk and sector exposure
tradermonty/claude-trading-skills3.2KUpdated Oct 21, 2026

canslim-screener

FreeSummary

Screen US growth stocks with William O'Neil's CANSLIM method, which evaluates seven factors including earnings, price strength, trading volume, and market direction. Receive ranked candidates with composite scores, factor breakdowns, market warnings, and data quality notes.

  • Find US stocks with earnings growth and price momentum
  • Compare a chosen list of stocks using CANSLIM scores
  • Screen a sector-focused stock list
tradermonty/claude-trading-skills3.2KUpdated Oct 21, 2026

Combine three reports on crowded positions, failed reactions to news, and weekly price reversals into one trading setup status. Identify missing or invalid evidence and determine whether the setup is ready for planning.

  • Combine three contrarian strategy reports
  • Check which confirmations are still missing
  • Find stale or inconsistent input reports
tradermonty/claude-trading-skills3.2KUpdated Oct 21, 2026

See all skills by tradermonty

Report a problem with this skill