# Macro Regime Detector

Detect structural macro regime transitions (1-2 year horizon) using cross-asset ratio...

- Repository: https://github.com/tradermonty/claude-trading-skills (3536 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add tradermonty/claude-trading-skills --skill macro-regime-detector -g -a claude-code -y`
Codex: `npx skills add tradermonty/claude-trading-skills --skill macro-regime-detector -g -a codex -y`
Cursor: `npx skills add tradermonty/claude-trading-skills --skill macro-regime-detector -g -a cursor -y`
Gemini CLI: `npx skills add tradermonty/claude-trading-skills --skill macro-regime-detector -g -a gemini-cli -y`

## Description

Detect structural macro regime transitions (1-2 year horizon) using cross-asset ratio analysis. Analyze RSP/SPY concentration, yield curve, credit conditions, size factor, equity-bond relationship, and sector rotation to identify regime shifts between Concentration, Broadening, Contraction, Inflationary, and Transitional states. Run when user asks about macro regime, market regime change, structural rotation, or long-term market positioning.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:
   ```bash
   python3 -m pip install -r skills/macro-regime-detector/requirements.txt
   uv run python3 skills/macro-regime-detector/scripts/macro_regime_detector.py --output-dir reports/
   ```
   This fetches 600 days of data for 9 ETFs. With an FMP key, the client tries
   FMP first and fetches Treasury rates (~10 API calls total), then falls back
   to yfinance for unavailable ETF history. Without an FMP key, it runs in
   yfinance-only mode and uses SHY/TLT as the yield-curve fallback.

   The detector fails closed and writes no report when none of its six
   components has usable data. Do not treat a missing report or non-zero exit
   as a valid low-transition regime.

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

The rest: https://github.com/tradermonty/claude-trading-skills/blob/HEAD/skills/macro-regime-detector/SKILL.md
