--- license: cc-by-nc-4.0 task_categories: - tabular-classification - tabular-regression - time-series-forecasting language: - en tags: - synthetic - oil-and-gas - commodities - crude-oil - wti - brent - futures - volatility-surface - garch - quantitative-finance - xpertsystems pretty_name: "OIL-029 — Synthetic Crude Oil Price Dataset (Sample)" size_categories: - 100K 0.98 typical; both benchmarks track global crude supply-demand with quality differential as offset) | | 10 | regime diversity entropy | 0.8399 | 0.78 | ±0.1 | ✓ PASS | 6-class regime taxonomy (balanced / contango / backwardation / supply_shock / demand_collapse / high_volatility) per CFTC Commitments of Traders + EIA Short-Term Energy Outlook regime classification, normalized Shannon entropy. Lower than uniform 1.0 because balanced regime dominates (~30-40%) in long-horizon paths. | **Overall: 100.0/100 — Grade A+** (10 PASS · 0 MARGINAL · 0 FAIL of 10 metrics) --- ## Schema highlights **`crude_spot_prices.csv`** — full quant finance physics stack: > **GARCH(1,1)**: var_t = 2.0e-5 + 0.08·ε²_{t-1} + 0.80·var_{t-1} (Bollerslev 1986) > **OU mean reversion** (Schwartz 1997): −κ·ln(S/μ), κ=0.005/day, μ=$75 > **Jump diffusion** (Merton 1976): Bernoulli(0.5%) × Beta(2,5) × direction > **DXY drag**: −0.18 × (DXY−102) / 100 / 252 (BIS oil-dollar) > **6-regime drift**: ±(0.00003 to 0.00045) per day with stochastic switching The sample's realized vol is ~48% annualized (above the long-run real- market average of 35-45%) reflecting the simulated period's regime mix. **`futures_curves.csv`** — **Hull cost-of-carry pricing**: > F = S × exp((r + storage_cost − convenience_yield) × T) > storage_cost = 0.018 + 0.010 × max(inv_z, 0) > convenience_yield = 0.035 − 0.020 × inv_z + 0.025 × (regime ∈ {backwardation, supply_shock}) The sample's **inventory ↔ convenience yield Pearson correlation is r ≈ −0.90** — **near-deterministic Working (1949) coupling** validates the storage theory implementation. **`volatility_surfaces.csv`** — **Black-Scholes IV surface with term structure + smile + skew**: > IV(K, T) = ATM(realized_vol) > + 0.02 × log(1+T)/log(366) (term structure) > + 0.16 × (m − 1)² (smile, m = K/S) > + 0.10 × max(0, 1 − m) (put skew) > + noise The sample's **realized vol ↔ 30d ATM IV Pearson correlation is r ≈ +0.999** — **near-deterministic Black-Scholes coupling** with vol smile shape (IV at extreme strikes > ATM IV) preserved. **`trading_labels.csv`** — **feature-coupled labels** keyed to future returns and curve state: > target_5d_direction = up if ret_5d > 0.015 else down if < -0.015 else flat > volatility_state = low(<0.25) / medium(0.25-0.45) / high(>0.45) (realized vol bins) > crisis_label = (rare_event_flag == 1) OR (realized_vol > 0.70) > trading_signal_label = long_bias if (ret_5d > 0.02 AND curve = backwardation) > = short_bias if (ret_5d < -0.02 AND curve = contango) > = neutral otherwise This is **the first OIL SKU with future-return-coupled supervised learning labels** — unlike most catalog SKUs where labels are derived from current features, OIL-029's labels reflect actual 5-day forward price evolution, making this dataset directly trainable for predictive ML. --- ## Suggested use cases 1. **5-day directional classification** — 3-class predictor on `target_5d_direction` from regime + curve state + vol state features. **Strong feature coupling** to actual forward returns. 2. **Realized volatility regression** — predict next-day `realized_vol_annualized` from GARCH(1,1) features + regime + macro. 3. **Implied vol surface regression** — predict `implied_vol` at any moneyness × expiry from realized vol + regime per Black-Scholes. **Strong physics**: realized↔ATM IV r ≈ +0.999. 4. **Curve state classification** — 3-class classifier on `curve_state` from inventory + storage + convenience yield features. **Strong physics**: inventory↔conv_yield r ≈ −0.90 per Working 1949. 5. **Crisis label binary classification** — predict rare-event + high-vol crisis state from macro + vol features. 6. **OPEC market surprise prediction** — predict OPEC market_surprise_score from prior price + inventory + regime features. 7. **Crack spread regression** — predict gasoline/diesel/jet `crack_spread` from WTI + seasonality + refinery utilization features. 8. **Intraday liquidity classification** — binary classifier on `liquidity_state` (normal vs stressed) from spread + volume + regime. 9. **6-regime classification** — predict `regime` from realized vol + curve state + macro features. (Note: regime is a generator-internal latent variable; in real markets must be inferred.) 10. **Multi-table relational ML** — entity-resolution across the 12 tables via `market_date`. Macro + curve + vol + events form rich feature matrices for any predictive task. --- ## Loading ```python from datasets import load_dataset ds = load_dataset("xpertsystems/oil029-sample", data_files="crude_spot_prices.csv") print(ds["train"][0]) ``` Or with pandas: ```python import pandas as pd spot = pd.read_csv("hf://datasets/xpertsystems/oil029-sample/crude_spot_prices.csv") fut = pd.read_csv("hf://datasets/xpertsystems/oil029-sample/futures_curves.csv") vol_s = pd.read_csv("hf://datasets/xpertsystems/oil029-sample/volatility_surfaces.csv") spreads = pd.read_csv("hf://datasets/xpertsystems/oil029-sample/calendar_spreads.csv") macro = pd.read_csv("hf://datasets/xpertsystems/oil029-sample/macro_factors.csv") labels = pd.read_csv("hf://datasets/xpertsystems/oil029-sample/trading_labels.csv") # Quant feature engineering for 5-day directional ML: joined = (spot .merge(spreads, on="market_date") .merge(macro, on="market_date", suffixes=("", "_macro")) .merge(labels, on="market_date")) # Predict target_5d_direction from WTI + curve_state + vol + macro features ``` --- ## Reproducibility All generation is deterministic via the integer `seed` parameter (driving `np.random.default_rng`). A seed sweep across `[42, 7, 123, 2024, 99, 1]` confirms Grade A+ on every seed in this sample. --- ## Honest disclosure of sample-scale limitations + generator patch **This wrapper applies a documented patch to the underlying generator** that adds **Schwartz (1997) Ornstein-Uhlenbeck mean reversion** toward a $75 long-run anchor (κ=0.005/day, half-life ≈ 140 days) and reduces GARCH persistence (α=0.08, β=0.80 vs original 0.10, 0.86). The patch was needed because the original generator's pure regime-drift GBM exhibited path- dependent runaway in multi-year horizons — WTI mean would walk to $200- $400+ across 8-year paths depending on regime sequence. Real crude oil mean-reverts toward cost-of-production, so this patch makes the sample behave like real markets per Schwartz (1997) canonical OU commodity model. Several other limitations should be understood before use: 1. **Log return kurtosis is too low (~1.2 vs real ~5-10).** Mean reversion dampens extreme moves. For tail-risk ML (e.g., VaR backtesting), use the full product (which has uncapped kurtosis at production horizons) or augment with explicit fat-tailed jump samples. 2. **DXY ↔ WTI correlation is positive (r ≈ +0.53) instead of negative.** In real markets, a stronger dollar usually depresses oil prices. The generator's DXY evolves as an independent random walk modified only slightly by regime (`+0.08 × demand_collapse_flag`), so long paths produce spurious co-drift rather than the expected negative correlation. For oil-USD ML, treat DXY as a noisy macro feature rather than a primary driver. **The full product v1.1 will add proper oil-dollar mean-reverting cointegration.** 3. **Rare event ↔ realized vol correlation is near zero.** Rare events spike vol transiently (1 day), but realized_vol is computed continuously and only ~11 rare events occur in 2200 days. The signal is dominated by GARCH baseline. **For rare-event ML, train on the `rare_event_flag` directly + acute vol responses** rather than expecting a strong day-of correlation. 4. **Volatility is ~48% annualized vs real ~35-45%.** The sample is slightly more volatile than empirical 2015-2024 WTI history because regime parameters bias toward more supply_shock / high_volatility regimes (30%+ supply_shock at sample scale). For models calibrated to real-market volatility, **scale vol features by ~0.85x** or use the full product which has tighter regime-balance enforcement. 5. **Regime is a generator-internal latent variable.** In real markets, regime is inferred from observed price/inventory/macro features (e.g., via Hamilton 1989 regime-switching models or modern HMMs). The `regime_label` field is the ground-truth label and would NOT be available in production trading. **For realistic regime ML, treat regime as a hidden state to be classified**, not as an input feature. 6. **Tanker disruption events are sparse (~7 events over 2200 days).** For 6-class disruption-type classification at sample scale, this is insufficient. Use the full product (50,000+ tanker events) for class- balanced disruption ML. 7. **Intraday data uses 8 bars/day**, not realistic 1-minute or 5-minute bars. CME WTI futures trade ~24 hours with peak liquidity in NYMEX pit hours. For HFT/microstructure ML, use full product (78 bars/day = 5-minute pit hours) or augment with continuous-time simulations. 8. **OPEC events are random per-day**, not coupled to actual OPEC meeting calendar (typically quarterly + ad-hoc emergency meetings). For event-study ML, **derive your own event windows** from the dates in `opec_events.csv` rather than expecting them to align to real OPEC meeting dates (Dec 1-2, Jun 6-7, etc.). --- ## Where physics IS strong (use these for ML) Five coupling signals in this sample are **physically valid and ML-useful**: | Signal | r | Source | |---|---:|---| | **Realized vol ↔ 30d ATM IV** | +0.999 | Black-Scholes implied vol surface | | **WTI ↔ Brent** | +0.998 | ICE / CME cointegration | | **Inventory ↔ convenience yield** | −0.896 | Working (1949) storage theory | | **Inventory ↔ curve state** | −0.755 | Schwartz (1997) commodity model | | **WTI ↔ crack spread** | −0.475 | EIA refining margin compression | Plus **GARCH(1,1) vol clustering** confirmed via |return| autocorrelation (ACF lag 1 ≈ +0.21, lag 5 ≈ +0.14) per Bollerslev (1986). --- ## Cross-references to other XpertSystems OIL SKUs This SKU opens a **new sub-vertical: commodity markets** — complementing the physical operations SKUs with **price discovery + financial market physics**: | SKU | Layer | Focus | |---|---|---| | OIL-013, OIL-016, OIL-018 | Upstream | Production + decline curves + multiphase | | OIL-015, OIL-024, OIL-025, OIL-027 | Midstream | Pipeline operations + leak detection + corrosion | | OIL-028 | Storage | Tank storage + inventory mass balance | | OIL-019, OIL-020, OIL-022, OIL-023 | Downstream | Refining + catalyst + turnaround | | OIL-021 | Cross-stream | Equipment performance + PHM | | **OIL-029** | **Commodity markets** | **WTI + Brent + futures + options + GARCH + Schwartz + Working** *(new sub-vertical)* | **OIL-029 is the catalog's first quant-finance SKU.** All previous OIL SKUs focus on physical operations (drilling, production, refining, transport). OIL-029 captures the **price-discovery layer** that ties operational decisions to commodity market signals. Use OIL-029 for **quant trading / risk management ML**, other OIL SKUs for **operational ML**. **Natural integrations** with other OIL SKUs: - **OIL-029 + OIL-028 (storage)** → join inventory_levels on market_date for CFTC inventory-trade modeling - **OIL-029 + OIL-020 (yields)** → join crack spreads + WTI for refinery margin optimization - **OIL-029 + OIL-016 (decline)** → tie production decisions to forward WTI curves for capital allocation --- ## Full product The **full OIL-029 dataset** ships at **25,000 business days** (~100-year synthetic history) × **36 monthly futures tenors** × **78 intraday bars** (5-minute pit hours) producing hundreds of millions of rows with **proper oil-dollar mean-reverting cointegration**, **uncapped jump kurtosis** for realistic tail-risk modeling, **calendar-aligned OPEC meeting events**, **realistic regime-balance enforcement** (Hamilton-style transitions), **multi-asset cross-commodity coupling** (natural gas + heating oil + gasoline), and **5-minute intraday microstructure** — licensed commercially. Contact XpertSystems.ai for licensing terms. 📧 **pradeep@xpertsystems.ai** 🌐 **https://xpertsystems.ai** --- ## Citation ```bibtex @dataset{xpertsystems_oil029_sample_2026, title = {OIL-029: Synthetic Crude Oil Price Dataset (Sample)}, author = {XpertSystems.ai}, year = {2026}, url = {https://huggingface.co/datasets/xpertsystems/oil029-sample} } ``` ## Generation details - Sample version : 1.0.0 - Random seed : 42 - Generated : 2026-05-23 00:44:25 UTC - Business days : 2200 (~8.5 years) - Start date : 2015-01-02 - Futures tenors : 12 monthly contracts (M1-M12) - Vol surface : 7 expiries × 9 moneyness levels - Intraday bars : 8 per business day - Regimes : 6 (balanced, contango, backwardation, supply_shock, demand_collapse, high_volatility) - Rare event types : 10 (negative_price_stress, opec_cut, opec_supply_surge, shipping_disruption, sanctions_embargo, refinery_outage, spr_release, flash_crash, hurricane_gulf_disruption, global_demand_collapse) - OPEC event types : 4 (cut, increase, no_change_guidance, emergency_meeting) - Patch applied : Schwartz (1997) OU mean reversion κ=0.005/day, μ=$75; GARCH α=0.08, β=0.80; jump cap 8% - Calibration basis : Working (1949), Schwartz (1997), Black-Scholes (1973), Merton (1976), Engle (1982), Bollerslev (1986), Hull, CME WTI, ICE Brent, EIA Weekly Petroleum Status, EIA Short-Term Energy Outlook, OPEC MOMR, CFTC COT, Baker Hughes Rig Count - Overall validation: 100.0/100 — Grade A+