skills/market-top-detector/SKILL.md
Detects market top probability using O'Neil Distribution Days, Minervini Leading Stock Deterioration, and Monty Defensive Sector Rotation. Generates a 0-100 composite score with risk zone classification. Use when user asks about market top risk, distribution days, defensive rotation, leadership breakdown, or whether to reduce equity exposure. Focuses on 2-8 week tactical timing signals for 10-20% corrections.
npx skillsauth add MileniumTick/skills market-top-detectorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect the probability of a market top formation using a quantitative 6-component scoring system (0-100). Integrates three proven market top detection methodologies:
Unlike the Bubble Detector (macro/multi-month evaluation), this skill focuses on tactical 2-8 week timing signals that precede 10-20% market corrections.
English:
Japanese:
Required:
$FMP_API_KEY environment variable or pass --api-key. Free tier sufficient (~33 API calls per execution).Optional:
--vix-term.Data Freshness: All manually collected data should be from the most recent 3 business days for accurate analysis.
| Aspect | Market Top Detector | Bubble Detector | |--------|-------------------|-----------------| | Timeframe | 2-8 weeks | Months to years | | Target | 10-20% correction | Bubble collapse (30%+) | | Methodology | O'Neil/Minervini/Monty | Minsky/Kindleberger | | Data | Price/Volume + Breadth | Valuation + Sentiment + Social | | Score Range | 0-100 composite | 0-15 points |
Before running the Python script, collect the following data using WebSearch. Data Freshness Requirement: All data must be from the most recent 3 business days. Stale data degrades analysis quality.
1. S&P 500 Breadth (200DMA above %)
AUTO-FETCHED from TraderMonty CSV (no WebSearch needed)
The script fetches this automatically from GitHub Pages CSV data.
Override: --breadth-200dma [VALUE] to use a manual value instead.
Disable: --no-auto-breadth to skip auto-fetch entirely.
2. [REQUIRED] S&P 500 Breadth (50DMA above %)
Valid range: 20-100
Primary search: "S&P 500 percent stocks above 50 day moving average"
Fallback: "market breadth 50dma site:barchart.com"
Record the data date
3. [REQUIRED] CBOE Equity Put/Call Ratio
Valid range: 0.30-1.50
Primary search: "CBOE equity put call ratio today"
Fallback: "CBOE total put call ratio current"
Fallback: "put call ratio site:cboe.com"
Record the data date
4. [OPTIONAL] VIX Term Structure
Values: steep_contango / contango / flat / backwardation
Primary search: "VIX VIX3M ratio term structure today"
Fallback: "VIX futures term structure contango backwardation"
Note: Auto-detected from FMP API if VIX3M quote available.
CLI --vix-term overrides auto-detection.
5. [OPTIONAL] Margin Debt YoY %
Primary search: "FINRA margin debt latest year over year percent"
Fallback: "NYSE margin debt monthly"
Note: Typically 1-2 months lagged. Record the reporting month.
Run the script with collected data as CLI arguments:
python3 skills/market-top-detector/scripts/market_top_detector.py \
--api-key $FMP_API_KEY \
--breadth-50dma [VALUE] --breadth-50dma-date [YYYY-MM-DD] \
--put-call [VALUE] --put-call-date [YYYY-MM-DD] \
--vix-term [steep_contango|contango|flat|backwardation] \
--margin-debt-yoy [VALUE] --margin-debt-date [YYYY-MM-DD] \
--output-dir reports/ \
--context "Consumer Confidence=[VALUE]" "Gold Price=[VALUE]"
# 200DMA breadth is auto-fetched from TraderMonty CSV.
# Override with --breadth-200dma [VALUE] if needed.
# Disable with --no-auto-breadth to skip auto-fetch.
The script will:
Present the generated Markdown report to the user, highlighting:
| # | Component | Weight | Data Source | Key Signal | |---|-----------|--------|-------------|------------| | 1 | Distribution Day Count | 25% | FMP API | Institutional selling in last 25 trading days | | 2 | Leading Stock Health | 20% | FMP API | Growth ETF basket deterioration | | 3 | Defensive Sector Rotation | 15% | FMP API | Defensive vs Growth relative performance | | 4 | Market Breadth Divergence | 15% | Auto (CSV) + WebSearch | 200DMA (auto) / 50DMA (WebSearch) breadth vs index level | | 5 | Index Technical Condition | 15% | FMP API | MA structure, failed rallies, lower highs | | 6 | Sentiment & Speculation | 10% | FMP + WebSearch | VIX, Put/Call, term structure |
| Score | Zone | Risk Budget | Action | |-------|------|-------------|--------| | 0-20 | Green (Normal) | 100% | Normal operations | | 21-40 | Yellow (Early Warning) | 80-90% | Tighten stops, reduce new entries | | 41-60 | Orange (Elevated Risk) | 60-75% | Profit-taking on weak positions | | 61-80 | Red (High Probability Top) | 40-55% | Aggressive profit-taking | | 81-100 | Critical (Top Formation) | 20-35% | Maximum defense, hedging |
Required: FMP API key (free tier sufficient: ~33 calls per execution) Optional: WebSearch data for breadth and sentiment (improves accuracy)
market_top_YYYY-MM-DD_HHMMSS.jsonmarket_top_YYYY-MM-DD_HHMMSS.mdreferences/market_top_methodology.mdreferences/distribution_day_guide.mdreferences/historical_tops.mdmarket_top_methodology.md for full framework understandingdistribution_day_guide.mdhistorical_tops.mddevelopment
Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions. Implements ownership patterns, manages lifetimes, designs trait hierarchies, builds async applications with tokio, and structures error handling with Result/Option. Use when building Rust applications, solving ownership or borrowing issues, designing trait-based APIs, implementing async/await concurrency, creating FFI bindings, or optimizing for performance and memory safety. Invoke for Rust, Cargo, ownership, borrowing, lifetimes, async Rust, tokio, zero-cost abstractions, memory safety, systems programming.
development
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.
development
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.
tools
When the user wants help with revenue operations, lead lifecycle management, or marketing-to-sales handoff processes. Also use when the user mentions 'RevOps,' 'revenue operations,' 'lead scoring,' 'lead routing,' 'MQL,' 'SQL,' 'pipeline stages,' 'deal desk,' 'CRM automation,' 'marketing-to-sales handoff,' 'data hygiene,' 'leads aren't getting to sales,' 'pipeline management,' 'lead qualification,' or 'when should marketing hand off to sales.' Use this for anything involving the systems and processes that connect marketing to revenue. For cold outreach emails, see cold-email. For email drip campaigns, see email-sequence. For pricing decisions, see pricing-strategy.