Mathematical & Econometric Architecture
Predicting energy commodity prices requires bridging quantitative financial futures with qualitative real-world shocks (war, refinery tornadoes, executive social posts, alternative physical rig data, and live financial media streams). This guide details the exact equations, vector spaces, and ML regularizations powering midgley {get_model_version()}.
Peer-Reviewed Literature Active Ledger
Explore theoretical theorems, arXiv pre-prints, Context Routing bounds (\(\rho_h\) vs \(\Delta\)), Alibaba CEDAR residual decomposition, and Purged CPCV cross-validation across all 12 cited foundation papers.
Model Data Sources & Feeds 26 Ingestion Feeds
Explore complete technical documentation, endpoints, update cadences, schemas, and zero-cost quota policies for all 26 data streams feeding the model.
Quantitative Commodity Futures & 3-2-1 Crack Spread Modeling
Wholesale commodity benchmarks for NYMEX RBOB gasoline (RB=F), WTI Crude (CL=F), and Ultra-Low Sulfur Diesel (HO=F) establish the foundational quantitative baseline. Crude oil quoted in dollars per barrel (\(42\text{ gallons}\) per barrel) is converted into per-gallon volumetric equivalents to compute refining margins and technical momentum returns:
Equation 1.1: Refining Crack Spread & Technical Returns
Equation 1.2: Industry Standard 3-2-1 Refining Crack Margin ($/bbl & $/gal) (Issue #169)
where \(P_{\text{RBOB}}\) is NYMEX RBOB Futures, \(P_{\text{WTI}}\) is West Texas Intermediate Crude, and \(P_{\text{ULSD}}\) is Heating Oil/Diesel. Rolling moving averages \(\text{MA}_K(t) = \frac{1}{K}\sum_{i=0}^{K-1} P_{t-i}\) across \(K \in \{7, 14, 30\}\) and technical momentum indicators (RSI-14, MACD line/signal, Bollinger %B, and ATR-14) capture autoregressive price trends.
Alternative Physical Feeds, Macroeconomics & Market Positioning (Issue #225)
To capture structural macroeconomic shifts, options tail-risk panic, upstream drilling supply pipelines, and institutional positioning, Midgley ingests 7 physical and alternative market data feeds:
Equation 2.1: Unified Alternative Physical & Macro Feature Matrix
1. Cboe Crude Oil Volatility Index (^OVX): Options tail-risk volatility ("VIX for crude") measuring short-term hedging skew and panic buying/selling.
2. Baker Hughes US Active Rig Counts: Total US active drilling rigs, oil rigs, and weekly delta (\(\Delta\text{Rigs}_{1\text{w}}\)), acting as a 3-to-6 month supply pipeline lead indicator.
3. U.S. Treasury Yield Curve & TIPS Real Yields (Issue #66): 10-Year Treasury Yield (\(Y_{10\text{y}}\)), 10Y–2Y inversion spread (\(\Delta Y_{10\text{y}-2\text{y}}\)), and 10-Year TIPS real yield (\(r_{\text{TIPS}}\)), quantifying macroeconomic demand expectations, recession probabilities, and breakeven inflation.
4. CFTC Commitment of Traders (COT) Energy Positioning (Issue #143): Non-commercial speculative net length, 3-year rolling \(Z\)-score, and commercial hedger ratio, measuring hedge fund crowding.
5. FERC Form 6 Interstate Pipeline Tariffs (Issue #123): Colonial Line 1, Plantation, and Explorer pipeline tariffs (\(\$/\text{bbl}\)) establishing physical inter-regional transport cost floors.
6. EIA Weekly Petroleum Status (WPSR): Commercial crude and finished motor gasoline inventory draws/builds (\(\Delta\text{Inv}_{\text{EIA}}\)) and PADD refinery capacity utilization percentage.
7. USDA Biofuel & Ethanol Spot Rack / RIN Credits: Spot Midwest E100 ethanol rack prices and D6 RIN credit values for E10 finished unleaded blendstock cost modeling.
Live News Streams, Web Scraping & Multi-Tiered LLM Extraction (Issue #226)
Unstructured financial news bulletins, deep web articles, RSS streams, and incoming webhooks are ingested and parsed across a resilient 4-tier LLM failover architecture:
Equation 3.1: Live News Vector Ingestion & Batch Factor Scoring
Equation 3.2: Multi-Provider LLM & Deterministic Lexicon Failover Engine (Issue #196)
1. Finlight.me REST API Stream: Live tier-1 financial energy headlines (Reuters, Bloomberg, Seeking Alpha, Investing.com) with a 150 call/month hard quota safety valve.
2. Firecrawl Web-to-Markdown API (Issue #83): JS-rendered full article extraction, refinery operator disclosures, and state tax bulletins with 800 call/month quota valve and 24-hour SHA-256 disk caching.
3. Free RSS News Feeds (Strategy 2): Zero-cost continuous 15-minute polling across Google News (when:1d), NYT Energy, and CNBC with 24-hour timestamp age filtering.
4. Incoming Webhook Gateway & IPASIS Security (Strategy 4 & Issue #87): Real-time push alerts via POST /api/v1/events/webhook with HMAC-SHA256 signature verification and IPASIS Tor/Abuse origin screening.
5. Bounded Factor Vector Space: Payloads are transformed into a 5-element numerical vector:
$$\mathbf{V}_{\text{event}, t} = \begin{bmatrix} S_{\text{geopolitical}} \\ S_{\text{supply}} \\ S_{\text{opec}} \\ S_{\text{demand}} \\ S_{\text{pressure}} \end{bmatrix}_t \in [-1.0, +1.0]^5$$
Executive Social Media Stream & Weekday vs. Weekend Gap Dynamics (Issue #224)
Executive social media commentary (Twitter/X and Truth Social energy posts) directly impacts active intraday trading sessions during weekdays, while weekend posts published during commodity market closures accumulate to drive opening price gap volatility:
Equation 4.1: Social Media Sentiment & Weekend Market Open Gap Multiplier
Weekday Active Trading Impact: Posts published during active NYMEX/CME trading hours produce immediate short-term futures return shocks. Dovish OPEC talk-downs urging production increases produce an average \(-1.85\%\) single-day RBOB return shock, while hawkish energy import tariff threats trigger \(+2.10\%\) single-day price surges.
Weekend Market Closure Accumulation: Because commodity futures exchanges close Friday at 17:00 EST and reopen Sunday at 18:00 EST, posts published over the weekend accumulate without real-time price discovery. When trading resumes Sunday evening, this accumulated sentiment results in \(1.42\times\) higher opening price gap volatility compared to weekday baselines.
Multi-Tiered NOAA Weather Risk Dynamics
Atmospheric weather alerts from the NOAA NWS API (api.weather.gov) are factored across national basins and regional localized metro tiers:
Equation 5.1: Multi-Tiered Weather Vulnerability Matrix
Tier 1 (National): Gulf Coast hurricane landfall tracks (PADD 3 refining corridor) & Permian/Bakken production basin polar vortex freezes.
Tier 2 (Tulsa OK): Tulsa County (OKZ060) EF-3 Tornado warnings (halting West Tulsa \(125,000\text{ bpd}\) HF Sinclair loading racks, \(+\$0.173/\text{gal}\) shock) and Cushing (OKZ066) sub-zero delivery freezes.
Tier 2 (Newark DE): New Castle County (DEZ001) Nor'easters & storm surges affecting PBF Delaware City (\(180,000\text{ bpd}\)) loading racks, Big Stone Anchorage deepwater lightering halts, and C&D Canal freeze lockouts.
Tier 2 (Cincinnati OH/KY): Hamilton County OH (OHZ077) & NKY (KYZ091/092/093) Ohio Valley flooding & Mississippi River low-water draft restrictions affecting river barge deliveries from Marathon Catlettsburg (\(291,000\text{ bpd}\)).
Tier 2 (Greenville NC): Pitt County (NCZ081) Atlantic hurricane coastal inundation, Tar River flood crests (\(>19\text{ ft}\)), and winter ice storms throttling Selma/Apex terminal rack dispatch on Colonial Pipeline Lines 1 & 2.
Tier 2 (Charlotte NC): Mecklenburg County (NCZ071) inland tropical cyclone wind gusts, Catawba River basin flooding, and severe convective power substation trips halting truck dispatches at Paw Creek petroleum tank farms.
Tier 2 (Oakland & SF Bay Area CA): Alameda County (CAZ508) & Contra Costa County (CAZ511) atmospheric river bomb cyclones, PG&E Public Safety Power Shutoffs (PSPS) / Diablo winds impacting Chevron Richmond (\(245,000\text{ bpd}\)) CaRFG units, and USGS Hayward Fault seismic pipeline shutoffs.
Tier 2 (Port St. Lucie FL): St. Lucie County (FLZ147 / Zip 34952) Atlantic hurricane evacuations/landfalls (Ian, Nicole, Milton), South Florida 25-inch flash flood rack washouts, and marine barge delays into Port Everglades and Port Canaveral berths.
Tier 2 (Chicago IL/IN): Cook County (ILZ104 / Zip 60601) and Lake County IN (INZ001) Lake Michigan polar vortex freezes, summer severe convective derechos, and BP Whiting/CITGO Lemont cooling water intake loops.
Tier 2 (Houston TX): Harris County (TXZ213 / Zip 77002) and Galveston/Jefferson Counties Gulf hurricane storm surges, tropical convective inundation (Harvey-style), winter freeze-offs, and Houston Ship Channel marine draft restrictions across Baytown (560 kbpd) and Port Arthur (630 kbpd).
Tier 2 (Los Angeles CA): Los Angeles County (CAZ041 / Zip 90012) Santa Ana Red Flag / SCE PSPS wind events, Pacific atmospheric river inundation, San Pedro Bay marine swell closures, and Newport-Inglewood seismic shutoffs across Carson/Wilmington (363 kbpd), El Segundo (269 kbpd), and Torrance (166 kbpd).
Equation 5.2: Capacity-Weighted PADD 3 Refining Exposure Score
Spatial Point-in-Polygon Containment: Rather than uniform text keyword matching across the entire Gulf of Mexico, src/nhc_hurricane.py parses NOAA NHC active 34-knot tropical storm and 64-knot hurricane wind swath boundaries (\(\mathcal{P}_{\text{cone}}\)) and performs ray-casting containment tests against exact geographic coordinates and operable crude distillation capacities (\(C_i\)) from EIA Form 820.
Geographic Asymmetry Calibration: Captures critical spatial supply divergence across \(7.82\text{M bpd}\) of PADD 3 refining assets. Eastern Gulf landfalls (e.g. Florida Panhandle / Destin) impact only Mississippi Sound and Mobile Bay facilities (Chevron Pascagoula, Vertex Mobile), yielding low exposure (\(<15\%\)), while Western Gulf tracks targeting the Upper Texas Coast and Southwest Louisiana directly intersect the dense refining epicenter (Houston Ship Channel, Galveston Bay, Port Arthur, Lake Charles), yielding proportional high exposure (\(>50\%\)).
Global & Regional Maritime Chokepoints, Inland River Barging & Waterborne Terminals
Global maritime chokepoints, inland river tow barge draft constraints, and coastal waterborne terminal freight logistics dictate crude transit delays, spot barge shipping rates, and regional rack margins:
Equation 6.1: Unified Waterway Freight & Detour Penalty Model
1. Global Strategic Chokepoints (National Wholesale Baseline):
• Strait of Hormuz: \(21.0\text{M bpd}\) (\(20\%\) of global petroleum) naval blockade & Iranian mine threats (\(+\$0.109/\text{gal}\) futures price shock).
• Suez Canal & Bab-el-Mandeb / Red Sea: Cape of Good Hope reroutings add \(+12\text{--}14\) days transit time, adding \(+\$4.50/\text{bbl}\) marine freight premium (\(+\$0.201/\text{gal}\) price shock).
• Venezuela Orinoco & Caribbean: OFAC General License 44 heavy crude sanctions and tanker export quotas (\(0.85\text{M bpd}\)).
2. Inland River Barging & Hydro Navigation Corridors (Mid-Continent & Midwest):
• Cincinnati Tri-State (Ohio & Lower Mississippi River Corridor): Confluence at Cairo, IL (Mile 981 on Lower Mississippi / Mile 0 on Ohio River) and Memphis, TN USGS gage (07032000). Autumn low-water droughts drop gage below \(5.0\text{ ft}\) (severe crisis at \(<0.0\text{ ft}\)), enforcing \(-40\%\) barge payload draft cuts, surging spot barge freight rates \(+300\%\), and expanding Cincinnati/Ohio Valley rack margins by \(+14.5\text{¢}/\text{gal}\) (\(+\$0.145/\text{gal}\)). Winter ice lockouts at Markland Locks & Dam (Mile 531.5) halt Marathon Catlettsburg (\(291,000\text{ bpd}\)) barge deliveries, forcing rail substitution (\(+\$0.112/\text{gal}\)).
• Tulsa Metro (MKARNS / Port of Catoosa Navigation): McClellan-Kerr Arkansas River Navigation System (Head of Navigation Mile 445 at Verdigris River) linking West Tulsa HF Sinclair refinery corridor to the Mississippi River; high-discharge flood stages or low-water lock halts throttle refined product barge departures.
3. Coastal Waterborne Terminals & Domestic Canal Bottlenecks:
• Newark Metro (Delaware Bay & C&D Canal): Big Stone Anchorage deepwater tanker lightering freezes and C&D Canal emergency shoaling closures force tank barges onto a \(300\text{ nm}\) open-ocean detour around the Delmarva Peninsula (+35% marine freight rate surge, expanding regional Delaware rack margins by \(+\$0.097/\text{gal}\), \(p = 0.00191\)).
• Port St. Lucie (Straits of Florida & Coastal Waterborne Terminals): Florida lacks crude/product pipelines and refineries, relying \(100\%\) on waterborne articulated tug-barges (ATBs) and product tankers from Gulf Coast refining hubs (Texas/Louisiana) into Port Everglades and Port Canaveral berths. Tropical cyclones, high seas, and Straits of Florida gale warnings bottleneck coastal barge dockings (\(+\$0.125/\text{gal}\) freight dislocation).
• Oakland & SF Bay Area (Carquinez Strait & San Francisco Bay): Marine crude lightering in Central San Francisco Bay and Carquinez Strait barge berthing supplying Chevron Richmond (\(245,000\text{ bpd}\)) and Martinez refineries; Pacific bomb cyclones and coastal gale warnings throttle marine dockings and CaRFG waterborne transfers.
• Greenville NC (Port of Wilmington & Cape Fear River): Coastal petroleum barge offloading at Port of Wilmington oil terminal docks supplying Eastern North Carolina fuel racks via Cape Fear River navigation channel during storm surge closures.
USGS 3D Hypocentral Attenuation, Hydrological & Industrial AQI Outage Risk (Issues #54, #55, #56, #73)
Real-time USGS seismic feeds, Mississippi/Ohio River hydrological gages, and multi-feed industrial air quality (PurpleAir, OpenAQ, AirNow) flaring monitors quantify physical infrastructure disruptions:
Equation 7.1: 3D Seismic Shaking Attenuation & River Bottleneck Index
3D Hypocentral Distance: Computes hypocentral distance \(R=\sqrt{d^2+h^2}\) from epicentral distance \(d\) and focal depth \(h\), applying a Cauchy attenuation weight \(w(R)\) to evaluate seismic shaking intensity \(I\) across major refinery complexes (e.g. Hayward Fault near Chevron Richmond, Cushing storage tanks).
Hydrological Telemetry: Real-time USGS water gages evaluate low-water draft reductions at Memphis, TN and Cairo, IL.
AQI Industrial Flaring Outages: Spike detections across PM2.5, SO2, and VOC sensors detect unannounced refinery unit shutdowns and emergency flaring before financial disclosures.
Microsoft Qlib Symbolic Alpha Factor Mining & Dynamic Domain Adaptation (Issues #127 & #215)
Midgley incorporates automated symbolic alpha factor mining inspired by Microsoft Qlib and RD-Agent, alongside CoSPOT compositional spectral/wavelet features (arXiv:2609.02093):
Equation 8.1: Information Coefficient, CoSPOT Spectral & DDG-DA GMM RBF Kernel
Symbolic Alpha Evaluation: Evaluates non-lookahead symbolic factor formulas with strict point-in-time calculation rules (\(d \ge 0\)), pruning collinear factors (\(|r| > 0.70\)).
CoSPOT Spectral Features: Extracts rolling Discrete Fourier Transform (DFT) dominant cycle periods, low-frequency energy ratios, and Discrete Wavelet Transform (DWT) detail shock magnitudes.
DDG-DA Domain Adaptation: Weights historical training samples using Gaussian RBF kernels across Gaussian Mixture Model (GMM) regimes to combat concept drift during macro shocks.
Econometric Exponential Memory Decay & Category-Specific Shock Fusion (Issue #227)
Real-world qualitative events possess distinct econometric persistence profiles. A structural refinery outage impacts physical balances for weeks, while executive social posts shock spot sentiment for days. Midgley models this continuous decay with category-specific half-lives and Context Routing diagnostic weight modulation:
Equation 9.1: Category-Specific Continuous Memory Accumulator & Fusion Weight
Econometric Category Half-Life Profiles (\(t_{1/2, c}\)):
• Supply Disruption (\(t_{1/2} = 14.0\text{ days}\)): Structural physical outages (refinery FCC trips, pipeline ruptures, hurricane damage).
• Geopolitical Risk (\(t_{1/2} = 7.0\text{ days}\)): International sanctions, maritime blockades, Middle East conflict escalation.
• OPEC+ Policy Action (\(t_{1/2} = 5.0\text{ days}\)): Official production quota announcements, ministerial meetings, voluntary export cuts.
• Demand Sentiment (\(t_{1/2} = 4.0\text{ days}\)): Macroeconomic interest rate shifts, GDP revisions, recession fears.
• Short-Term Price Pressure (\(t_{1/2} = 2.5\text{ days}\)): Executive social media posts, breaking headline sentiment, intraday rumor cycles.
• NOAA Weather & Atmospheric Shocks (\(t_{1/2} = 4.0\text{ days}\)): Regional convective storms, polar vortex freezes, and seasonal river flood stages.
Context Routing Diagnostic Fusion Weight (\(\omega_{\text{fusion}}\)) (Paper 2608.25128v1):
Evaluates the autocorrelation coefficient \(\rho_h\) at horizon \(h=5\) against critical threshold \(\Delta = 0.95\). When \(\rho_h \ge 0.95\) (TRY_FUSION), \(\omega_{\text{fusion}} = 1.00\); when \(\rho_h < 0.95\) (NO_FUSION), \(\omega_{\text{fusion}} = 0.10\) and effective half-life is compressed to \(0.20 \times t_{1/2}\) to prevent overfitting during volatile regime transitions.
Standardized Ridge Estimator & Purged Combinatorial Cross-Validation (CPCV)
Rather than predicting non-stationary raw price levels, our model fits a regularized Ridge Regression (\(\alpha = 10.0\)) model to predict 5-day percentage price returns (\(\Delta\%\)), applied directly to today's live pump price (\(P_{\text{Live Base}}\)):
Equation 10.1: Regularized Ridge Objective Function & Calibration
where \(\alpha = 10.0\) prevents overfitting across high-dimensional hybrid features, evaluated out-of-sample across rolling forward forecast horizons and walking origins.
Equation 10.2: Purged & Combinatorial Cross-Validation (CPCV) Overlap Elimination (Issue #117)
Temporal Data Leakage Prevention (López de Prado, 2018): In 5-day step-ahead horizon forecasting, standard cross-validation leaks lookahead information because observation \(t\)'s evaluation window \([t, t+5]\) overlaps with test samples. PurgedGroupTimeSeriesSplit and CombinatorialPurgedCV purge any training observation whose label period intersects test folds or falls within the post-test embargo window (\(h_{\text{embargo}} = 5\text{ days}\)), ensuring 100% out-of-sample purity (queryable via REST API at GET /api/v1/forecast/purged-cv).
CARB Regulatory Burden & PADD 5 Refining Island Isolation
California operates as an isolated refining island with zero interstate product pipelines crossing the Sierra Nevada. Retail prices in Los Angeles (\(\$4.890/\text{gal}\)), Oakland (\(\$5.550/\text{gal}\)), and the 9-County SF Bay Area (\(\$5.650/\text{gal}\)) embed a mandatory \(\$0.953/\text{gal}\) state tax & regulatory burden:
Equation 11.1: Total Statutory CARB Tax & Fee Accumulation
Refining Crack Spreads: \(\text{RichmondCrack}_t = P_{\text{Oakland Retail}, t} - \frac{P_{\text{Brent}, t}}{42.0}\), \(\text{ElSegundoCrack}_t = P_{\text{LA CARBOB}, t} - \frac{P_{\text{Brent}, t}}{42.0}\).
Physical Risk Shocks: El Segundo / Torrance FCC Trip (\(+\$0.450/\text{gal}\)), Hayward Fault Seismic (\(+\$0.420/\text{gal}\)), Newport-Inglewood Seismic (\(+\$0.380/\text{gal}\)), PG&E / SCE PSPS Red Flag Wildfire Blackout (\(+\$0.350/\text{gal}\)), and PTWC Tsunami Berth Closure (\(+\$0.165/\text{gal}\)).
Ultra-Low Sulfur Diesel (ULSD) & Distillate Crack Spread Modeling (Issue #41 - WIP)
Beyond unleaded RBOB gasoline, Midgley models Ultra-Low Sulfur Diesel (ULSD) (HO=F NY Harbor futures) and distillate cracking margins governing commercial freight logistics, agricultural harvesting, and heating oil demand pools. Note: The ULSD model is currently an experimental Work-In-Progress (WIP) undergoing multi-week feedback loop empirical evaluation before extending full regional metro models.
Equation 12.1: Distillate Crack Spread & 3-2-1 Margin Formulas
Regulatory Excise & Renewable Diesel Overhead: Federal diesel tax (\(\$0.244/\text{gal}\)), state excise differential, and California statutory CARB ULSD / D4 Biomass-Based Diesel RIN & RD99 renewable diesel compliance overhead (\(\$1.120/\text{gal}\)) (queryable via REST API at GET /api/v1/diesel/live, GET /api/v1/diesel/forecast, and GET /api/v1/diesel/simulate).
Dynamic Volatility-Gated Persistence Blending (DV-GPB) & Empirical CI (Issue #214)
During low-volatility plateaus, autoregressive time-series models risk overreacting to micro-fluctuations. DV-GPB applies a continuous sigmoid gate derived from 14-day rolling price volatility (\(\sigma_{14\text{d}}\)) to dynamically blend model forecasts with naive persistence:
Equation 13.1: Adaptive Sigmoid Volatility Gate & Empirical Residual Bounds
When \(\sigma_{14\text{d}} \ll 0.015\), \(\lambda_{\text{vol}} \to 0.0\) (shrinking forecasts to pure naive persistence). When \(\sigma_{14\text{d}} > 0.015\), \(\lambda_{\text{vol}} \to 1.0\) (preserving 100% of event shock vectors). Empirical 95% confidence bounds derived from 30-day regional residual standard error elevate empirical coverage to \(\ge 90\%\).
Local Metro Basis Differentials, Spatial Freight & Retail Rack Margins
Wholesale commodity futures must be adjusted for localized transportation tariffs, state/local excise taxes, and rack margin markups across each specific metro hub:
Equation 14.1: Metro Spatial Basis & Retail Margin Accumulator
Tulsa OK: Direct pipeline connection to Cushing WTI / Magellan system with Oklahoma state tax (\(\$0.190/\text{gal}\)) and minimal transit basis.
Newark DE: PADD 1B Delaware City refinery rack with Delaware state tax (\(\$0.230/\text{gal}\)) and Delmarva barge freight.
Cincinnati OH/KY: Dual-state Ohio (\(\$0.385/\text{gal}\)) and Kentucky (\(\$0.287/\text{gal}\)) tax differential and Ohio River barge transit rates.
Greenville NC & Charlotte NC: PADD 1C Colonial Pipeline Line 1 tariffs, Selma/Apex rack differentials, and North Carolina excise tax (\(\$0.404/\text{gal}\)).
Oakland & SF Bay Area CA: PADD 5 isolated island with statutory CARB regulatory burden (\(\$0.953/\text{gal}\)) and local county sales taxes.
Port St. Lucie FL: Florida waterborne ATB tanker delivery freight from Gulf Coast refining hubs and Florida state tax (\(\$0.352/\text{gal}\)).
Chicago IL/IN: Multi-tiered Illinois (\(\$0.470/\text{gal}\)), Cook County (\(\$0.060/\text{gal}\)), and Chicago city (\(\$0.080/\text{gal}\)) motor fuel taxes with Indiana cross-border arbitrage and BP Whiting / CITGO Lemont rack margin pass-through.
Houston TX: PADD 3 Gulf Coast refining epicenter directly adjacent to Baytown and Port Arthur mega-refineries, Texas state excise tax (\(\$0.200/\text{gal}\)), prompt USGC spot pass-through, and zero local pipeline import tariff.
Los Angeles CA: PADD 5 South Coast Basin refining cluster (Marathon Carson/Wilmington, Chevron El Segundo, PBF Torrance), statutory CARB regulatory burden (\(\$0.953/\text{gal}\)), LA CARBOB spot pass-through, and Kinder Morgan Watson Station rack distribution.
End-to-End Master Prediction Synthesis & Mathematical Factor Composition
The ultimate retail price forecast \(\hat{P}_{r, t+5}\) for any regional market \(r\) is synthesized by composing the mathematical operations from all preceding sections into a unified multi-layer estimator. The architecture transitions sequentially from quantitative futures and qualitative shock memory to regularized regime projection, spatial basis calibration, statutory tax burdens, physical friction offsets, and volatility-gated persistence blending:
Equation 15.1: Master Multi-Layer Retail Price Estimator
Equation 15.2: Volatility-Calibrated Empirical Prediction Interval
| Factor Term | Originating Section | Mathematical & Econometric Role |
|---|---|---|
| \(X_{k, t}\) & \(\text{Crack}_{321, t}\) | Section 01 & Section 12 | NYMEX RBOB (\(RB=F\)), WTI Crude (\(CL=F\)), ULSD (\(HO=F\)), and 3-2-1 refining margins. |
| \(\mathbf{X}_{\text{Physical}, t}\) | Section 02 | Cboe OVX options volatility, Baker Hughes rig counts, Treasury yields, CFTC COT, and EIA inventories. |
| \(\mathbf{V}_{\text{News}, t}\) & \(\mathbf{V}_{\text{social}, t}\) | Section 03 & Section 04 | Live Finlight/Firecrawl/RSS/Webhook feeds with Tier 1–3 failover, and executive social media gap dynamics. |
| \(\mathbf{M}_t = \sum \mathbf{M}_{c, t-1} e^{-\lambda_c} + \omega \mathbf{V}_t\) | Section 09 | Category-specific half-lives (\(t_{1/2} \in [2.5, 14.0]\text{ days}\)) and Context Routing diagnostic fusion weight. |
| \(\boldsymbol{\beta}(\mathbf{W})\) & \(\mathbf{f}_{\text{Qlib}, t}\) | Section 08 & Section 10 | \(L_2\)-regularized Ridge projection with Purged CPCV and Qlib DDG-DA GMM market regime weights \(w_i\). |
| \(\Delta_{\text{metro}, r}\) & \(T_{\text{tax}, r}\) | Section 11 & Section 14 | Hub-to-rack pipeline basis differentials, state excise taxes, and California CARB burden (\(\$0.953/\text{gal}\)). |
| \(\delta_{\text{physical}, r}\) | Section 05, Section 06 & Section 07 | NOAA convective storm alerts, maritime chokepoints, USGS 3D seismic intensity \(I\), and river barge draft indices. |
| \(\lambda_{\text{vol}} = \sigma(\sigma_{14\text{d}})\) | Section 13 | Continuous sigmoid volatility gate dynamically blending model projection with naive persistence \(P_{r, t}\). |
| \(\text{CI}_{95\%}\) | Section 13 | Empirical 30-day residual standard error establishing \(\ge 90\%\) out-of-time coverage bands. |