Macro Regime Detector pulls about 600 days of price history for nine ETFs and Treasury rates, then scores six components: RSP/SPY concentration, the 10Y-2Y yield curve, HYG/LQD credit conditions, IWM/SPY size factor, the stock-bond relationship and XLY/XLP sector rotation.
It labels the current structural regime and writes a JSON and a Markdown report. It uses Financial Modeling Prep data when a key is set and yfinance otherwise. It describes market structure and gives no investment advice.
What You Get
- A current regime label from five classes
- A transition signal dashboard across six weighted components
- Component details and the evidence behind the classification
- JSON and Markdown reports named with the run timestamp
- Reference notes on methodology, indicator interpretation and historical regimes
Common Use Cases
- Asking whether market leadership is concentrated or broadening
- Checking the yield curve and credit ratios for signs of a regime change
- Comparing the structural view with tactical top and breadth tools
- Looking up historical regimes that resemble the current reading
What Makes It Unique
It works on a structural horizon of one to two years with monthly data, where the related market top and breadth skills work on weeks or a daily snapshot. It fails closed: if none of the six components has usable data, no report is written and a missing report is never to be read as a calm regime. It also runs without any paid key by falling back to yfinance.
Under The Hood
Claude installs the Python requirements with pip and runs macro_regime_detector.py through the shell, with uv. The script fetches ETF price history and Treasury rates from the Financial Modeling Prep web API when a key is available in FMP_API_KEY or on the command line, and falls back to yfinance, which also reaches the web. It computes the six components locally and writes JSON and Markdown reports into the output folder. Reference documents on methodology and history are loaded when needed.