model 02 — OBR macroeconometric model · obr-macro · UK · hosted
UK fiscal reform, quarter by quarter.
Run selected UK tax and spending scenarios and trace GDP, consumption, and investment over 3–5 years against the March 2026 EFO baseline. Borrowing is not yet returned by the PolicyEngine Macro adapter.
Transpile, solve, swap the closure.
The pipeline in six steps: the OBR's published EViews equation listing is rewritten in Python, initialised from official data, solved quarter by quarter until the equations agree, anchored so the baseline reproduces the published EFO, shocked against an identical baseline so the difference is the policy effect — and joined to the PolicyEngine microsimulation, which supplies the static costing the shock comes from.
Transpile the published listing
From EViews to Python
The OBR publishes its full equation listing, but as EViews source that few can run. The transpiler rewrites every EViews line — dlog(), @elem, lags like X(-1), error-correction terms — into an equivalent Python expression, compiled once per solve.
What comes out
The result is the published listing in open code, runnable without an EViews licence. All 372 equations parse, but it is not a complete working copy of the OBR’s model: about 79 are skipped at solve time because inputs they need are not published, some headline variables pass through at their published values rather than being computed, and business investment uses an equation the OBR had commented out of its listing, reconstructed here.
@elem → indexed array readsInitialise from official data
Loading history
History loads from the OBR's detailed forecast tables. Of the 261 endogenous variables the listing referenced but the outlook did not print, 199 had ONS series codes; a vendored 355-series ONS snapshot supplies them.
Why it matters
That snapshot ships inside the package — there is no download step — and it gives the circular fiscal and financial sub-blocks real balancing data rather than guessed starting values.
Solve by Gauss–Seidel iteration
Simultaneous within a quarter
The equations depend on each other, so each quarter is solved simultaneously: cycle through the equations, update, repeat to convergence. Quarters then solve sequentially forward.
Runtime
A twelve-quarter anchored solve takes roughly 30–40 seconds single-threaded; a reform run is two such solves.
Anchor to the published EFO
Add-factors, the OBR's own device
Add-factors — the residuals reconciling each behavioural equation to data — are set so the baseline reproduces the published EFO. This is the OBR's own device, used the OBR's own way.
Forecasting with held add-factors
For forecasting rather than one-off shocks, the emulator fits add-factors over a base window of 2024Q1–2025Q4, holds them constant, and projects to 2027Q4, with exogenous inputs extrapolated (seasonal cash series at their trailing annual mean). Scenario solves run twelve quarters, 2025Q1–2027Q4.
Horizon limits
The anchored horizon extends to 2031Q1, where GDP is reproduced to 0.67%. Anchored unemployment (LFSUR) is unreliable beyond 2027Q4, drifting to 0.9% against the EFO's 4.1% by 2031Q1.
Swap the closure, shock, compare
Closure swap
In the OBR file GDP (GDPM) is an exogenous input and inventories (DINV) are already the residual that closes the expenditure identity. For a shock the emulator removes the DINV equation, holds DINV at its EFO path, and adds a GDP identity so that GDPM is endogenous — output responds to the policy instead of being fixed.
Shock against an identical baseline
The emulator solves shocked and baseline paths with identical structure and reports the difference, isolating the policy effect from the underlying forecast.
DINV equation removed and held at EFO; GDP identity added, GDPM endogenousScore a costed reform through the microsimulation bridge
Static costing in, second-round effects out
The suite's flagship join. PolicyEngine's microsimulation costs a statutory reform year by year — who pays and how much — and score_reform(country="uk", reform=..., model="obr") hands this model the bill: each year's costing enters as HHDI_ADDFACTOR, minus the annual £bn spread flat across its four quarters (×1000 ÷ 4 → £m/qtr), held as an add-factor on household disposable income.
What the emulator computes
Lower income moves consumption through the published consumption equation, and consumption moves GDP under the demand closure — the second round, quarter by quarter, against the anchored baseline of step 4. The anchoring add-factors are held fixed in both the baseline and the shocked run, so they cancel in the difference. 1p on the basic rate from April 2026: £6.46bn static in 2026, and a GDP fall building from about 0.15× the revenue raised in the first year to roughly 0.34× by the twelfth quarter. Individual quarters are not reliable — no quarter of the solve converges to tolerance.
Where the bridge stops
This route's implied multiplier is about 0.34 by the twelfth quarter, against the OBR's published 0.3 for income tax and NICs — the ~1-by-construction problem belongs to the spending lever (CGG, exactly 1.0000 against the OBR's 0.6), not to this one. Corporation tax is refused — not household-borne in the microsim, and the direct TCPRO closure converges only slowly (a 12-quarter run reaches ~40% of its plateau). UK only; no US bridge exists. Every join in the suite → /models#compose.
HHDI_ADDFACTOR = −(annual costing) × 1000 ÷ 4, £m/qtr, heldHHDI → RHHDI → CONS → GDPMpe-macro score --country uk --reform '{…}' --model obr