
Commodity Analysis
Commodity analysis (oil supply-demand balance / gold pricing / copper as an economic...
Install
npx skills add HKUDS/Vibe-Trading --skill commodity-analysis -g -a claude-code -y- Repository
- HKUDS/Vibe-Trading37.4k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,193 tokens
- Runs scripts
- No, instructions only
What it does
Commodity analysis (oil supply-demand balance / gold pricing / copper as an economic predictor / inventory cycles / futures premium-discount structure / seasonality), generating directional commodity signals.
Commodity Analysis
Overview
Analyze commodities from four dimensions, supply-demand balance, pricing model, inventory cycle, and futures structure, and output directional signals suitable for backtesting. Focuses on crude oil (global pricing anchor), gold (safe haven + inflation hedge), and copper (economic barometer).
Core Concepts
1. Crude Oil Supply-Demand Balance
Key supply-side variables:
| Variable | Data Source | Frequency | Direction of Impact |
|---|---|---|---|
| OPEC production | OPEC monthly report | Monthly | Production cuts → oil price ↑ |
| US shale output | EIA weekly report | Weekly | Higher output → oil price ↓ |
| Rig count (Baker Hughes) | Baker Hughes | Weekly | Leads production by 3-6 months |
| Strategic Petroleum Reserve (SPR) | EIA | Weekly | SPR release → short-term oil price ↓ |
Key demand-side variables:
- IEA global oil demand forecast (quarterly)
- China crude imports (customs monthly data)
- US gasoline demand (EIA weekly report, implied demand)
- Global PMI (leads demand by 1-2 months)
Supply-demand balance signals:
# Simplified supply-demand judgment
if opec_compliance > 90% and us_rig_count_declining:
supply_signal = "tight" # bullish for oil
elif opec_compliance < 80% and us_production_rising:
supply_signal = "loose" # bearish for oil
if global_pmi > 50 and china_import_yoy > 5%:
demand_signal = "strong" # bullish for oil
elif global_pmi < 48 and china_import_yoy < 0:
demand_signal = "weak" # bearish for oil
2. Gold Pricing Framework
Four-factor model:
