Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
tradermonty avatar

Macro Regime Detector

  • 1.2k installs
  • 2.6k repo stars
  • Updated August 4, 2026
  • tradermonty/claude-trading-skills

macro-regime-detector is a Claude trading skill that classifies current market conditions into one of five historical macro regimes using concentration, credit, and breadth signals before portfolio or trading decisions.

About

macro-regime-detector is a skill from tradermonty/claude-trading-skills that maps live macro readings into one of five historical regime classifications before portfolio or trading calls. Reference cases include documented periods such as 2023–2024 Magnificent Seven concentration, where RSP/SPY declined from ~0.32 to ~0.29 and top seven stocks drove roughly 60% of S&P 500 returns over ~18 months. The skill uses ETF ratio signals—RSP/SPY, IWM/SPY, HYG/LQD—and concentration characteristics to contextualize current conditions against historical parallels. Developers and quant engineers reach for macro-regime-detector when building or operating trading analytics that need a structured regime label before adjusting portfolio posture.

  • Classifies markets into five regimes using RSP/SPY, IWM/SPY, credit spreads, and sector rotation signals
  • Provides historical parallels with concrete examples from 2003–2024 including Magnificent Seven, post-COVID, and post-el
  • Outputs regime label, confidence, and recommended portfolio posture
  • Designed as a reusable context provider for trading agents and quant workflows

Macro Regime Detector by the numbers

  • 1,189 all-time installs (skills.sh)
  • +87 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #934 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/tradermonty/claude-trading-skills --skill macro-regime-detector

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.2k
repo stars2.6k
Security audit3 / 3 scanners passed
Last updatedAugust 4, 2026
Repositorytradermonty/claude-trading-skills

How do you classify current macro market regime?

Classify current market conditions into one of five historical macro regimes before making portfolio or trading decisions.

Who is it for?

Quant developers and portfolio engineers building regime-aware trading systems who need structured macro classification before allocation decisions.

Skip if: Individual stock pickers, long-only buy-and-hold investors with no regime framework, or non-financial application development.

When should I use this skill?

A developer or analyst needs to classify current market conditions into a macro regime before portfolio positioning or trading system logic runs.

What you get

Five-bucket macro regime label with historical parallel context, ETF ratio readings, and suggested portfolio posture guidance.

  • Macro regime classification
  • Historical parallel reference mapping

By the numbers

  • Classifies markets into 5 historical macro regime buckets
  • 2023–2024 reference: top 7 stocks drove ~60% of S&P 500 returns over ~18 months
  • RSP/SPY declined from ~0.32 to ~0.29 during Magnificent Seven concentration regime

Files

SKILL.mdMarkdownGitHub ↗

Macro Regime Detector

Detect structural macro regime transitions using monthly-frequency cross-asset ratio analysis. This skill identifies 1-2 year regime shifts that inform strategic portfolio positioning.

When to Use

  • User asks about current macro regime or regime transitions
  • User wants to understand structural market rotations (concentration vs broadening)
  • User asks about long-term positioning based on yield curve, credit, or cross-asset signals
  • User references RSP/SPY ratio, IWM/SPY, HYG/LQD, or other cross-asset ratios
  • User wants to assess whether a regime change is underway

Workflow

1. Load reference documents for methodology context:

  • references/regime_detection_methodology.md
  • references/indicator_interpretation_guide.md

2. Execute the main analysis script:

   uv run python3 skills/macro-regime-detector/scripts/macro_regime_detector.py --output-dir reports/

This fetches 600 days of data for 9 ETFs + Treasury rates (~10 API calls total). An FMP API key is required to run this skill (the client raises if it is missing). For individual ETFs whose FMP historical-price endpoint returns nothing, the client automatically falls back to yfinance — this fallback needs no additional API key, but it does not remove the FMP key requirement.

3. Read the generated Markdown report and present findings to user.

4. Provide additional context using references/historical_regimes.md when user asks about historical parallels.

Prerequisites

  • FMP API Key (required): Set FMP_API_KEY environment variable or pass --api-key
  • Free tier (250 calls/day) is sufficient (script uses ~10 calls)

6 Components

#ComponentRatio/DataWeightWhat It Detects
1Market ConcentrationRSP/SPY25%Mega-cap concentration vs market broadening
2Yield Curve10Y-2Y spread20%Interest rate cycle transitions
3Credit ConditionsHYG/LQD15%Credit cycle risk appetite
4Size FactorIWM/SPY15%Small vs large cap rotation
5Equity-BondSPY/TLT + correlation15%Stock-bond relationship regime
6Sector RotationXLY/XLP10%Cyclical vs defensive appetite

5 Regime Classifications

  • Concentration: Mega-cap leadership, narrow market
  • Broadening: Expanding participation, small-cap/value rotation
  • Contraction: Credit tightening, defensive rotation, risk-off
  • Inflationary: Positive stock-bond correlation, traditional hedging fails
  • Transitional: Multiple signals but unclear pattern

Output

  • macro_regime_YYYY-MM-DD_HHMMSS.json — Structured data for programmatic use
  • macro_regime_YYYY-MM-DD_HHMMSS.md — Human-readable report with:

1. Current Regime Assessment 2. Transition Signal Dashboard 3. Component Details 4. Regime Classification Evidence 5. Portfolio Posture Recommendations

Relationship to Other Skills

AspectMacro Regime DetectorMarket Top DetectorMarket Breadth Analyzer
Time Horizon1-2 years (structural)2-8 weeks (tactical)Current snapshot
Data GranularityMonthly (6M/12M SMA)Daily (25 business days)Daily CSV
Detection TargetRegime transitions10-20% correctionsBreadth health score
API Calls~10~330 (Free CSV)

Script Arguments

python3 macro_regime_detector.py [options]

Options:
  --api-key KEY       FMP API key (default: $FMP_API_KEY)
  --output-dir DIR    Output directory (default: current directory)
  --days N            Days of history to fetch (default: 600)

Resources

  • references/regime_detection_methodology.md — Detection methodology and signal interpretation
  • references/indicator_interpretation_guide.md — Guide for interpreting cross-asset ratios
  • references/historical_regimes.md — Historical regime examples for context

Related skills

How it compares

Use macro-regime-detector over single-indicator technical skills when portfolio posture needs a multi-signal historical regime label, not just price momentum.

FAQ

How many regimes does macro-regime-detector classify?

macro-regime-detector maps current readings into five historical macro regime classifications. Each regime includes reference cases with ETF ratios, credit conditions, and documented portfolio postures from past market periods.

Which signals does macro-regime-detector use?

macro-regime-detector analyzes concentration and breadth via ratios such as RSP/SPY and IWM/SPY plus credit spreads through pairs like HYG/LQD, comparing live readings to historical regime examples.

Is Macro Regime Detector safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.