一键导入
detect-freight-led-inflation-turn
透過美國卡斯貨運指數 (CASS Freight Index) 的週期轉折,偵測美國通膨壓力是否進入放緩或反轉階段。用於判斷「通膨是否正在降溫」,並驗證市場對降息、通膨回落的宏觀敘事是否有實體經濟數據支撐。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
透過美國卡斯貨運指數 (CASS Freight Index) 的週期轉折,偵測美國通膨壓力是否進入放緩或反轉階段。用於判斷「通膨是否正在降溫」,並驗證市場對降息、通膨回落的宏觀敘事是否有實體經濟數據支撐。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
以槓桿反向 ETF(做空)相對槓桿正向 ETF(做多)的交易占比,作為散戶風險偏好代理指標,評估 SPX 後續下行風險。
用勞力士市場指數(WatchCharts Rolex Market Index)作為高 β 的風險偏好/流動性代理,判讀「流動性改善但未到投機狂熱」的狀態
使用公開市場資料量化驗證鉑/白金對巴西股市(EWZ)的長週期傳導/連動關係,輸出雙軸圖、領先落後分析、關聯強度分數與監控訊號。
用天然氣與化肥價格的日頻數據,檢驗「天然氣暴漲→化肥供應受限/毀約→化肥飆價」敘事是否成立,輸出可標註到圖上的關鍵轉折點與領先落後分析。
Track cumulative return of stocks/indices with multi-ticker comparison, index Top N ranking, and visualization. All comparisons use S&P 500 as the fixed benchmark.
用 COT 非商業部位變化,量化對沖基金在農產品期貨的資金流向,並把出口需求、USDA 數據、美元/原油/金屬等宏觀風向整合成可交易的敘事與訊號。
| name | detect-freight-led-inflation-turn |
| description | 透過美國卡斯貨運指數 (CASS Freight Index) 的週期轉折,偵測美國通膨壓力是否進入放緩或反轉階段。用於判斷「通膨是否正在降溫」,並驗證市場對降息、通膨回落的宏觀敘事是否有實體經濟數據支撐。 |
<essential_principles>
**CASS Freight Index 是最權威的貨運指標**CASS Freight Index 由 Cass Information Systems 編制,追蹤北美地區的貨運出貨量與支出:
| 指標 | 說明 | 用途 |
|---|---|---|
| Shipments Index | 出貨量指數 | 衡量實體經濟需求強度 |
| Expenditures Index | 運費支出指數 | 衡量物流成本壓力 |
| Shipments YoY | 出貨量年增率 | 偵測週期轉折(主要分析指標) |
| Expenditures YoY | 支出年增率 | 驗證成本傳導 |
數據來源:MacroMicro (透過 Highcharts 爬取)
**貨運量是通膨的領先指標**核心邏輯:
關鍵訊號不是單月變化,而是「週期轉折」:
當偵測到 CASS 週期轉折:
這是跨週期關係辨識:「物流需求動能 → 通膨方向」
**多指標交叉驗證**建議同時觀察四個 CASS 指標:
當 Shipments 和 Expenditures 同時轉負,訊號更為可靠。
</essential_principles>
偵測 CASS Freight Index 的週期轉折,判斷通膨是否正在放緩。輸出三層訊號:
<quick_start>
最快的方式:使用 Chrome CDP 抓取數據
Step 1:安裝依賴
pip install requests websocket-client pandas numpy
Step 2:啟動 Chrome 調試模式
# Windows
"C:\Program Files\Google\Chrome\Application\chrome.exe" ^
--remote-debugging-port=9222 ^
--remote-allow-origins=* ^
--user-data-dir="%USERPROFILE%\.chrome-debug-profile" ^
"https://www.macromicro.me/charts/46877/cass-freight-index"
Step 3:等待頁面完全載入(圖表顯示),然後執行
cd scripts
python fetch_cass_freight.py --cdp
Step 4:執行通膨訊號分析
python freight_inflation_detector.py --quick
Step 5:生成視覺化圖表
python visualize_freight_cpi.py \
--cache cache/cass_freight_cdp.json \
--output ../../output/freight_cpi_$(date +%Y-%m-%d).png \
--start 1995-01-01
輸出範例:
{
"signal": "inflation_easing",
"confidence": "high",
"freight_yoy": -7.46,
"cycle_status": "negative",
"indicator": "shipments_yoy",
"macro_implication": "通膨壓力正在放緩,未來 CPI 下行風險上升"
}
output/freight_cpi_2026-01-23.png備選方法(Selenium):
pip install selenium webdriver-manager
python scripts/fetch_cass_freight.py --selenium --no-headless
</quick_start>
需要進行什麼分析?請選擇或直接提供分析參數。
| Response | Action | |------------------------------|-------------------------------------------------------------| | 1, "快速", "quick", "check" | 執行 `python scripts/freight_inflation_detector.py --quick` | | 2, "完整", "full", "analyze" | 閱讀 `workflows/analyze.md` 並執行 | | 3, "學習", "方法論", "why" | 閱讀 `references/methodology.md` | | 提供參數 (如日期範圍) | 閱讀 `workflows/analyze.md` 並使用參數執行 |路由後,閱讀對應文件並執行。
<directory_structure>
detect-freight-led-inflation-turn/
├── SKILL.md # 本文件(路由器)
├── skill.yaml # 前端展示元數據
├── manifest.json # 技能元資料
├── workflows/
│ ├── analyze.md # 完整分析工作流
│ └── quick-check.md # 快速檢查工作流
├── references/
│ ├── data-sources.md # CASS 數據來源與爬蟲說明
│ ├── methodology.md # 領先性方法論解析
│ └── historical-episodes.md # 歷史案例對照
├── templates/
│ ├── output-json.md # JSON 輸出模板
│ └── output-markdown.md # Markdown 報告模板
├── scripts/
│ ├── fetch_cass_freight.py # MacroMicro CASS 爬蟲
│ ├── fetch_via_cdp.py # Chrome CDP 爬蟲模組
│ ├── freight_inflation_detector.py # 主分析腳本
│ └── visualize_freight_cpi.py # CASS vs CPI 領先性視覺化
└── examples/
└── sample_output.json # 範例輸出
</directory_structure>
<reference_index>
方法論: references/methodology.md
資料來源: references/data-sources.md
歷史案例: references/historical-episodes.md
</reference_index>
<workflows_index>
| Workflow | Purpose | 使用時機 |
|---|---|---|
| analyze.md | 完整週期轉折分析 | 需要深度分析時 |
| quick-check.md | 快速檢查訊號 | 日常監控或快速回答 |
| </workflows_index> |
<templates_index>
| Template | Purpose |
|---|---|
| output-json.md | JSON 輸出結構定義 |
| output-markdown.md | Markdown 報告模板 |
| </templates_index> |
<scripts_index>
| Script | Command | Purpose |
|---|---|---|
| fetch_cass_freight.py | --cdp | 使用 CDP 爬取(推薦) |
| fetch_cass_freight.py | --selenium --no-headless | 使用 Selenium 爬取(備選) |
| freight_inflation_detector.py | --quick | 快速檢查最新訊號 |
| freight_inflation_detector.py | --start DATE --indicator X | 完整分析 |
| visualize_freight_cpi.py | --lead-months 6 --start DATE | 繪製 CASS vs CPI 領先圖 |
| </scripts_index> |
視覺化輸出:CASS vs CPI 領先性對比圖
核心特徵(參考 Bloomberg/Refinitiv 風格):
快速繪圖:
cd scripts
python visualize_freight_cpi.py \
--cache cache/cass_freight_cdp.json \
--output ../../output/freight_cpi_YYYY-MM-DD.png \
--start 1995-01-01 \
--lead-months 6
輸出路徑:output/freight_cpi_YYYY-MM-DD.png(根目錄)
圖表解讀:
<input_schema>
**Type**: string (ISO YYYY-MM-DD) **Description**: 分析起始日期 **Example**: "2010-01-01" **Type**: string (ISO YYYY-MM-DD) **Description**: 分析結束日期 **Type**: string **Options**: `shipments_index` | `expenditures_index` | `shipments_yoy` | `expenditures_yoy` **Description**: CASS 指標選擇 - `shipments_yoy`: 出貨量年增率(推薦,主要分析指標) - `expenditures_yoy`: 支出年增率 - `shipments_index`: 出貨量指數 - `expenditures_index`: 支出指數 **Type**: integer **Description**: 領先 CPI 的月份數 **Range**: 3-12 **Type**: float **Description**: 年增率警戒門檻(如 0 表示轉負)</input_schema>
<output_schema>
參見 templates/output-json.md 的完整結構定義。
摘要:
{
"signal": "inflation_easing | inflation_rising | neutral",
"confidence": "high | medium | low",
"freight_yoy": -2.9,
"cycle_status": "new_cycle_low | negative | positive",
"indicator": "shipments_yoy",
"macro_implication": "通膨壓力正在放緩,未來 CPI 下行風險上升",
"all_indicators": {
"shipments_index": {...},
"expenditures_index": {...},
"shipments_yoy": {...},
"expenditures_yoy": {...}
}
}
</output_schema>
<success_criteria> 分析成功時應產出: