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.
Use macro-regime-detector to analyze the current structural macro regime and produce a report on cross-asset signals, likely regime state, transition evidence, and long-term positioning implications; install the required Python dependencies first.
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: macro-regime-detectordescription: 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.
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
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.
Read the generated Markdown report and present findings to user.
Provide additional context using references/historical_regimes.md when user asks about historical parallels.
Prerequisites
Python dependencies (required): install requirements.txt, including yfinance and requests
FMP API Key (optional): set FMP_API_KEY or pass --api-key to use FMP and Treasury data before the yfinance/SHY-TLT fallbacks
The FMP free tier may not serve every ETF; unavailable symbols automatically use yfinance
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