Commodity analysis (oil supply-demand balance / gold pricing / copper as an economic predictor / inventory cycles / futures premium-discount structure / seasonality), generating directional commodity signals.
57
66%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./agent/src/skills/commodity-analysis/SKILL.mdAnalyze 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).
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:
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 oilFour-factor model:
| Factor | Weight | Logic | Indicator |
|---|---|---|---|
| Real rates | 40% | Real rates ↓ → lower opportunity cost of holding gold → gold ↑ | 10Y TIPS yield |
| US dollar index | 25% | USD ↓ → gold becomes cheaper in pricing terms → gold ↑ | DXY |
| Safe-haven demand | 20% | Risk ↑ → safe-haven buying → gold ↑ | VIX + geopolitical risk index |
| Central-bank buying | 15% | Central-bank purchases → structural demand support | WGC quarterly report |
Practical rules:
Copper as a leading indicator:
r > 0.7)Copper fundamental tracking:
| Indicator | Data Source | Threshold |
|---|---|---|
| LME copper inventory | LME daily report | <150k tons = tight |
| SHFE copper inventory | SHFE weekly report | WoW decline >10% = tight |
| Copper concentrate TC/RC | SMM | TC < $30/ton = tight mining supply |
| China copper imports | Customs monthly report | YoY growth >10% = strong demand |
Visible inventory vs hidden inventory:
Four inventory-cycle stages (using copper as example):
Active restocking (price↑ volume↑) -> Passive restocking (price↓ volume↑) -> Active destocking (price↓ volume↓) -> Passive destocking (price↑ volume↓)
mid bull market late bull market mid bear market late bear / early bull marketSignal mapping:
| Stage | Inventory Direction | Price Direction | Trading Signal |
|---|---|---|---|
| Passive destocking | ↓ | ↑ | Long (best buying point) |
| Active restocking | ↑ | ↑ | Keep long positions |
| Passive restocking | ↑ | ↓ | Close longs (warning) |
| Active destocking | ↓ | ↓ | Short or stay neutral |
Contango (futures > spot, normal market):
roll yield < 0), unfavorable for long holdersfar month - near month > 5%) = severe oversupplyBackwardation (futures < spot, inverted market):
roll yield > 0), favorable for long holdersnear month - far month > 3%) = squeeze or extreme shortageTerm-structure signal:
# Spread ratio = (front month - second month) / front month
spread_ratio = (front_month - second_month) / front_month
if spread_ratio > 0.02: # backwardation > 2%
signal = "strongly bullish" # spot shortage
elif spread_ratio < -0.03: # contango > 3%
signal = "bearish" # oversupply
else:
signal = "neutral"Oil seasonality:
Gold seasonality:
Copper seasonality:
commodity_score = {
"supply_demand": +1, # supply-demand is tight
"inventory_cycle": +2, # passive destocking (best stage)
"term_structure": +1, # mild backwardation
"seasonality": 0, # neutral seasonality
"macro_env": -1, # stronger dollar is a headwind
}
# Total score = +3/5 = +0.6 -> bullish bias, but not a strong signal## Commodity Analysis Report — [Commodity Name]
### Supply-Demand Structure
- Supply side: [surplus / balanced / shortage] — [specific data]
- Demand side: [strong / stable / weak] — [specific data]
- Balance table: [inventory build X tons / drawdown X tons]
### Inventory Cycle
- Current stage: [active restocking / passive restocking / active destocking / passive destocking]
- Visible inventory: [LME X tons, SHFE X tons, WoW change]
### Term Structure
- Front-back spread: [contango X% / backwardation X%]
- Roll yield: [positive / negative]
### Composite Score
| Dimension | Score(-2~+2) | Basis |
|------|------------|------|
| Supply-demand | +1 | OPEC compliance rate 92% |
| Inventory | +2 | LME inventory hit 18-month low |
### Trading Direction
- Direction: [bullish / bearish / neutral]
- Confidence: [high / medium / low]
- Risk points: [specific risks]web-reader or entered manually8643fcd
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.