zeberg-salomon-rotator

Analyze macro indicators to generate equity and bond switch signals.

3|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/fatfingererr/macro-skills --skill zeberg-salomon-rotator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zeberg-salomon-rotator
Source: https://github.com/fatfingererr/macro-skills/tree/main/skills/zeberg-salomon-rotator
Command: npx skills add https://github.com/fatfingererr/macro-skills --skill zeberg-salomon-rotator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, yfinance, pandas-datareader, requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides an automated framework to monitor macro indicators and switch portfolio exposure between equities and long-duration bonds based on the Zeberg–Salomon two-state model, identifying iceberg and sinking events.

Core Features & Use Cases

  • Build LeadingIndex and CoincidentIndex from public data (FRED, Yahoo Finance).
  • Detect Iceberg and Sinking events with confirmed state transitions.
  • Generate switch signals and run backtests against benchmarks, with visualization outputs.
  • Quick-start path to get current state or run full backtests and visualizations.

Quick Start

Use the quick start to check the current state:

  • cd skills/zeberg-salomon-rotator
  • python scripts/rotator.py --quick For a full backtest:
  • python scripts/rotator.py --start 2000-01-01 --end 2026-01-01

Frequently Asked Questions about zeberg-salomon-rotator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate portfolio rotation between equities and bonds using macro indicators?

Automate portfolio rotation by processing FRED leading and coincident indices with Yahoo Finance price data to detect two-state economy transitions. The framework generates actionable switch signals between equity and long-duration bond exposure based on confirmed iceberg and sinking events.

What is the Zeberg-Salomon two-state macro model for backtesting?

The Zeberg-Salomon two-state macro model identifies iceberg and sinking economic events to trigger portfolio exposure shifts. It applies a confirm period and hysteresis logic to leading and coincident indices, generating reproducible switch signals for backtesting against benchmarks.

How do I run a macro indicator backtest from 2000 to 2026 using Python?

Run a macro indicator backtest by executing the rotator script with start and end date arguments like 2000-01-01 to 2026-01-01. The workflow uses pandas-datareader and yfinance to fetch public data, outputting switch signals, backtest results, and visualizations.

Do I need pandas-datareader and yfinance to build leading and coincident indices?

Yes, you need pandas-datareader to pull FRED macroeconomic data and yfinance for Yahoo Finance price data to build leading and coincident indices. The workflow also requires pandas and numpy for data processing and numerical calculations.

Can I check the current macro economic state quickly without running a full backtest?

Yes, you can check the current macro economic state quickly by running the rotator script with the quick flag. This bypasses the full backtest workflow and immediately analyzes FRED and Yahoo Finance data to output the current two-state economy condition.