The Oil-Market SVAR

Python · R · Part 8 of the VAR arc — supply, demand & identification

Overview

Part 8 of the VAR arc — its first genuinely non-monetary structural application. For decades the oil price was treated as an exogenous supply shock (price up ⟹ recession, Hamilton 1983). But the oil price is a price, set by supply and demand, so "an oil price increase" is not one event: a rise because OPEC cut output is economically different from one driven by a global boom pulling up demand for all industrial commodities, which differs again from a precautionary response to feared future shortfalls. Kilian (2009) disentangles them inside a structural VAR, and the punchline reshaped the field — the source of an oil price change matters more than its size, and most big moves have been demand-driven, not supply disruptions. This example reuses the structural ideas of Part 2 and adds two tools not yet seen in the series — the forecast-error variance decomposition and the historical decomposition — in a new self-contained module (oilsvar.py). A monthly 3-variable VAR (p=24p=24, 1974–2019): oil-production growth, the Kilian index of global real activity (from ocean dry-cargo freight rates), and the real price of oil.

yt=(Δoil production, global real activity, real price of oil),A0yt=c+i=1pAiyti+εty_t = \big(\Delta\text{oil production},\ \text{global real activity},\ \text{real price of oil}\big)' , \qquad A_0\,y_t = c + \textstyle\sum_{i=1}^{p} A_i\,y_{t-i} + \varepsilon_t

Two notebooks: identify, then stress-test the identification

8a — the recursive identification. A Cholesky ordering whose zeros are defensible within-the-month timing restrictions: crude production is near-vertical in the short run, so supply does not respond to demand within the month; global real activity reacts to a supply shock but not to oil-specific news within the month; and the real oil price is the fast, forward-looking variable that absorbs all three shocks on impact. The three structural shocks are thus a supply disruption, an aggregate-demand expansion, and an oil-specific (precautionary) demand shock — each sign-normalised to raise the real oil price, with Bayesian bands from a diffuse Normal-inverse-Wishart posterior. 8b — the identification debate. That single supply-does-not-respond zero is an economic claim: the short-run price elasticity of oil supply is exactly zero. Notebook 8b relaxes it three less-dogmatic ways over Haar-uniform rotations — sign restrictions (Uhlig; Rubio-Ramírez–Waggoner–Zha), a hard elasticity bound (Kilian–Murphy), and an explicit Bayesian elasticity prior (Baumeister–Hamilton) — and asks how much Kilian's conclusion depends on the assumption.

Results

8a — the big oil episodes, decomposed. The three "oil price increases" have completely different dynamic signatures: a supply disruption raises the price only modestly and slowly (+0.5 on impact), an aggregate-demand expansion builds a hump over a year (~+4 by 12 months), and an oil-specific demand shock jumps immediately (+6.5) and persists. The variance decomposition is the result that overturned the old view: supply explains ~2% of the real oil price at 18 months, vs ~17% aggregate demand and ~81% oil-specific (precautionary) demand. The historical decomposition attributes the 2003–2008 super-spike almost entirely to demand (aggregate +432, precautionary +887, while supply subtracted −161) — the China-led boom, not an OPEC squeeze, drove oil to $140. 8b — the conclusion is only as strong as the elasticity belief. Once the timing zeros go, flat sign restrictions let the supply share of the oil-price variance jump from 2% to ~31% (they admit an implausibly elastic supply); disciplining the elasticity to the near-inelastic range everyone agrees on pulls it back — Kilian–Murphy to ~10%, Baumeister–Hamilton's softer prior to ~26%. The honest lesson: neither the recursive zero (elasticity = 0) nor a "flat" sign-restriction prior is assumption-free — Kilian's demand story survives conditional on supply being inelastic, which is well supported, but the data alone don't pin the split. Each notebook is cross-checked in R (vars; an independent rotation search).

Notebooks

Downloads

References