Macro Regime Detector
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.
No API
Download Skill Package (.skill) View Source on GitHub
Table of Contents
1. Overview
Macro Regime Detector
2. 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
3. Prerequisites
- FMP API Key (required): Set
FMP_API_KEYenvironment variable or pass--api-key - Free tier (250 calls/day) is sufficient (script uses ~10 calls)
4. Quick Start
python3 skills/macro-regime-detector/scripts/macro_regime_detector.py
5. Workflow
- Load reference documents for methodology context:
references/regime_detection_methodology.mdreferences/indicator_interpretation_guide.md
- Execute the main analysis script:
python3 skills/macro-regime-detector/scripts/macro_regime_detector.pyThis fetches 600 days of data for 9 ETFs + Treasury rates (10 API calls total).
-
Read the generated Markdown report and present findings to user.
- Provide additional context using
references/historical_regimes.mdwhen user asks about historical parallels.
6. Resources
References:
skills/macro-regime-detector/references/historical_regimes.mdskills/macro-regime-detector/references/indicator_interpretation_guide.mdskills/macro-regime-detector/references/regime_detection_methodology.md
Scripts:
skills/macro-regime-detector/scripts/fmp_client.pyskills/macro-regime-detector/scripts/macro_regime_detector.pyskills/macro-regime-detector/scripts/report_generator.pyskills/macro-regime-detector/scripts/scorer.py