Skip to content
Climate & the Price of Bread

Lab · runs in your browser

Refit the model yourself

The backtests use SARIMAX models fitted offline in Python. The lab uses their lightweight cousin, an ARX model fitted by least squares, which is fast enough to refit a few hundred times every time you move a slider: next month’s change is predicted from the last p changes plus one climate reading k months back, re-estimated on a rolling window, and compared with the same model without the climate term.

The TypeScript code is a port of the Python reference and is tested against it number for number (see the method notes). Try making the result look good, then ask whether you would have picked those settings in advance.

Commodity
Climate index
Prices
Lag
3 mo
AR order p
Training window
Score from
Jan 1990

Skill vs AR baseline

−0.16%

RMSE 6.084 vs 6.075

Diebold-Mariano

p 0.811

statistic −0.24, 441 months

95% interval coverage

93%

share of months inside ±1.96σ (climate model)

Reading

No clear difference

Jan 1990 to Sep 2026: 882 least-squares fits, done in your browser

Is the climate model pulling ahead?

Running total of (baseline error² − climate error²). Rising: the climate input is helping; falling: it is costing accuracy.
-100010020019901995200020052010201520202025

How much MEI.v2 moves the forecast, window by window

Fitted coefficient on MEI.v2 (lag 3) in each rolling fit, with a ±1.96 s.e. band. A band that keeps straddling zero is a weak signal.
  • coefficient
  • ±1.96 s.e.
-4.0-2.00.02.019901995200020052010201520202025

Scan every index and lag

Skill of the climate ARX against its AR(1) baseline for 6 indices × 24 lags, 10-year windows, scored from 1990. Runs in a Web Worker so the page stays responsive.