
Monitor Etf Holdings Drawdown Risk
This monitors physical ETFs like SLV and GLD for a specific divergence pattern: when commodity prices climb but ETF holdings drop, which might signal physical supply stress or just redemption flows. It calculates a 0-100 stress score by comparing price returns against inventory drawdowns over configurable windows (default 180 days), checks if holdings hit decade lows, and crucially presents two competing hypotheses rather than assuming one narrative. The Python scripts scrape ETF holdings via Selenium, pull prices from Yahoo Finance, and generate JSON plus visual reports. You'd run this if you're tracking precious metals markets and want systematic alerts when price and inventory move opposite directions, though you still need to interpret which hypothesis fits the broader data.
- skills.sh installs
- 125
- GitHub stars
- 3
- last updated
- Aug 21, 2026
Install
$ npx -y skills add fatfingererr/macro-skills --skill monitor-etf-holdings-drawdown-risk --agent claude-codeInstalls into .claude/skills of the current project.
Files
<essential_principles>
**背離訊號核心邏輯**背離事件定義:
- 價格上漲:
price_return >= min_price_return_pct(如 +15%) - 庫存下滑:
inventory_change <= -min_inventory_drawdown_pct(如 -10%) - 同時發生:在相同視窗期(如 180 天)內同時滿足
當價格與庫存同向時(同漲同跌)為正常;逆向時(價漲庫跌)才需要警覺。
**雙重假設驗證**不能直接把「庫存下降」解讀為「實物被搶」,需要交叉驗證:
| 假設 | 支持條件 | 反駁條件 |
|---|---|---|
| 實物緊張 | COMEX/LBMA 下降、backwardation、lease rates 上升、零售溢價擴大 | 其他庫存穩定、contango、溢價平穩 |
| 資金流/贖回 | ETF 流出但交易所庫存穩定、期貨結構不緊 | 多重庫存同步下降 |
輸出兩種解釋,讓用戶判斷哪個更符合當前數據。
**資料取得方式**本 skill 優先使用:
- ETF 官網庫存:Selenium 模擬人類瀏覽器行為抓取(避免 API 限制)
- Yahoo Finance:
yfinance套件取得現貨/期貨價格 - 交叉驗證:COMEX 庫存、期貨結構等公開數據
腳本位於 scripts/ 目錄,遵循 references/data-sources.md 的反偵測策略。
stress_score = 100 × min(1.0,
0.6 × divergence_severity + # 背離嚴重度
0.2 × decade_low_bonus + # 十年低點加成
0.2 × ratio_extreme_bonus # 比值極端加成
)
Sponsors
Details
- Repository
- github.com/fatfingererr/macro-skills
- Category
- DevOps & CI/CD
- First seen
- Jun 3, 2026