zeberg-salomon-rotator

zeberg-salomon-rotator is a skill for Claude Code, Codex from fatfingererr/macro-skills. It costs 77 tokens per session (2,652 once invoked), scanned A, original, MIT.

A business-cycle market model that uses early warning data and current economic data to classify conditions as expansion (Risk-On) or contraction (Risk-Off).

In plain words
What is it for?
Build economic indexes from FRED data, detect early “iceberg” warnings and confirmed “sinking” events, switch between stock and bond positions, and backtest the results.
Why use it?
It helps separate an economy that may be weakening from one already in contraction, so market signals are not based on a single indicator.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Build economic indexes from FRED data, detect early “iceberg” warnings and confirmed “sinking” events, switch between stock and bond positions, and backtest the results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fatfingererr/macro-skills/zeberg-salomon-rotator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fatfingererr/macro-skills --skill zeberg-salomon-rotator
Clone the repo
git clone --depth 1 https://github.com/fatfingererr/macro-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin zeberg-salomon-rotator/plugin install zeberg-salomon-rotator after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zeberg-salomon-rotator

README.md
[![agentmods](https://agentmods.dev/badge/skills/fatfingererr/macro-skills/zeberg-salomon-rotator/github.svg)](https://agentmods.dev/skills/fatfingererr/macro-skills/zeberg-salomon-rotator)
Your own site
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/zeberg-salomon-rotator"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/zeberg-salomon-rotator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for zeberg-salomon-rotator

Your own site · 80×15
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/zeberg-salomon-rotator"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/zeberg-salomon-rotator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,652 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.02652
Opus 5 $0.00039 $0.01326
Sonnet 5 $0.00015 $0.00530
Haiku 4.5 $0.00008 $0.00265

Measured 12d ago against content hash fc51d1699ceb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

zeberg-salomon-rotator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/fetch_data.py, scripts/rotator.py, scripts/visualize.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/zeberg-salomon-rotator/SKILL.md · 257 lines

How it starts

The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<essential_principles>

Zeberg–Salomon 模型將市場簡化為兩種狀態:

  • RISK_ON: 持有股票(SPY),景氣擴張期
  • RISK_OFF: 持有長債(TLT),景氣收縮期

切換邏輯基於「領先指標先轉弱,同時指標後確認」的景氣循環規律。

類型 作用 典型成分 領先時間
Leading 預警 殖利率曲線、新訂單、房市許可 6-12 月
Coincident 確認 就業、工業生產、實質收入 同步

合成方式

  1. 各序列做 transform(yoy/mom/diff)
  2. 統一方向(direction +1/-1)
  3. Rolling z-score 標準化
  4. EMA 平滑
  5. 加權合成
Iceberg Event: LeadingIndex < iceberg_threshold
  → 預警:景氣開始轉弱
  → 搭配「領先指標下降」+ 可選「市場亢奮」濾鏡

Sinking Event: CoincidentIndex < sinking_threshold
  → 確認:實體經濟收縮
  → 通常在 Iceberg 之後數月發生

狀態機邏輯

  • RISK_ON → RISK_OFF:Iceberg 連續確認 + 斜率為負
  • RISK_OFF → RISK_ON:領先指標回升超過 (threshold + hysteresis)

本 skill 使用無需 API key 的資料來源:

  • FRED CSV: https://fred.stlouisfed.org/graph/fredgraph.csv?id={SERIES_ID}
  • Yahoo Finance: yfinance 套件抓取 SPY, TLT, VIX

腳本位於 scripts/ 目錄,可直接執行。

</essential_principles>

  1. 建構指標:從 FRED 數據合成 LeadingIndex 與 CoincidentIndex
  2. 偵測事件:識別「冰山」(領先轉弱)與「下沉」(同時確認)
  3. 切換訊號:產生 RISK_ON ↔ RISK_OFF 切換事件
  4. 回測績效:計算累積報酬、MaxDD、CAGR、與 benchmark 比較

輸出:切換事件清單、指標時間序列、回測摘要、診斷資訊。

<quick_start>

最快的方式:執行預設回測

cd skills/zeberg-salomon-rotator
pip install pandas numpy yfinance pandas-datareader  # 首次使用
python scripts/rotator.py --quick

輸出範例:

{
  "state": "RISK_ON",
  "latest_indices": {"LeadingIndex": 0.41, "CoincidentIndex": 0.22},
  "iceberg_event": false,
  "sinking_event": false,
  "last_switch": {"date": "2023-06-30", "action": "EXIT_LONG_BOND_ENTER_EQUITY"}
}

完整回測

python scripts/rotator.py --start 2000-01-01 --end 2026-01-01 --output result.json

</quick_start>

  1. 快速檢查 - 查看目前的景氣狀態與最新指標
  2. 完整回測 - 執行完整的歷史回測與績效分析
  3. 視覺化圖表 - 生成多面板回測結果圖表
  4. 監控模式 - 設定持續監控與切換警報
  5. 方法論學習 - 了解 Zeberg-Salomon 模型的邏輯

請選擇或直接提供分析參數。

路由後,閱讀對應文件並執行。

<directory_structure>

zeberg-salomon-rotator/
├── SKILL.md                           # 本文件(路由器)
├── skill.yaml                         # 前端展示元數據
├── manifest.json                      # 技能元數據
├── workflows/
│   ├── backtest.md                    # 完整回測工作流
│   ├── visualize.md                   # 視覺化工作流
│   ├── monitor.md                     # 持續監控工作流
│   └── analyze.md                     # 深度分析工作流
├── references/
│   ├── data-sources.md                # FRED 系列代碼與資料來源
│   ├── methodology.md                 # Zeberg-Salomon 方法論解析
│   └── input-schema.md                # 完整輸入參數定義
├── templates/
│   ├── output-json.md                 # JSON 輸出模板
│   └── output-markdown.md             # Markdown 報告模板
└── scripts/
    ├── rotator.py                     # 主輪動腳本
    ├── visualize.py                   # 視覺化繪圖工具
    └── fetch_data.py                  # 數據抓取工具

</directory_structure>

<reference_index>

方法論: references/methodology.md

  • Zeberg-Salomon 模型概念
  • 冰山/下沉事件定義
  • 兩態切換邏輯

資料來源: references/data-sources.md

  • FRED 系列代碼(領先/同時)
  • Yahoo Finance 資產代碼
  • 數據頻率與對齊

輸入參數: references/input-schema.md

  • 完整參數定義
  • 預設值與建議範圍

Read the full file on GitHub · 257 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 257 lines · 77 tokens per session scan A fc51d1699ceb

Subscribe to this mod's changes

zeberg-salomon-rotator is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 77 tokens to every session and 2,652 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens

reading-receipt

An image-reading workflow for extracting structured information from receipts, invoices, and hometown-tax donation certificates. It can first extract text from PDFs and otherwise read their images.

kazukinagata/shinkoku · 64 tokens