# Commodity Analysis

Commodity analysis (oil supply-demand balance / gold pricing / copper as an economic...

- Repository: https://github.com/HKUDS/Vibe-Trading (37375 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add HKUDS/Vibe-Trading --skill commodity-analysis -g -a claude-code -y`
Codex: `npx skills add HKUDS/Vibe-Trading --skill commodity-analysis -g -a codex -y`
Cursor: `npx skills add HKUDS/Vibe-Trading --skill commodity-analysis -g -a cursor -y`
Gemini CLI: `npx skills add HKUDS/Vibe-Trading --skill commodity-analysis -g -a gemini-cli -y`

## Description

Commodity analysis (oil supply-demand balance / gold pricing / copper as an economic predictor / inventory cycles / futures premium-discount structure / seasonality), generating directional commodity signals.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:**

```python
# 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:**

The rest: https://github.com/HKUDS/Vibe-Trading/blob/HEAD/agent/src/skills/commodity-analysis/SKILL.md
