Emulator of the OBR macroeconometric model

OBR emulator

Run it hosted, from the CLI or locally, and pick a lever.

Shock a variable, read the deviation

1

Start hosted: the MCP server

Connect to the hosted MCP server: no install, no credentials, three tools.

The three tools3 points
  • obr_shock shocks one variable in model units and returns the per-quarter GDP deviation.
  • list_reform_variables lists the shockable levers with units.
  • score_reform with model="obr" scores a PolicyEngine reform end to end through the static-costing bridge (how a reform reaches it).
2

Or from the CLI

The pe-macro CLI mirrors the hosted tools one for one. pe-macro compare runs the same reform through the static and the macro route side by side.

pe-macro obr-shock --var CGG --shock 1250
pe-macro variables
pe-macro score --country uk \
  --reform '{"gov.hmrc.income_tax.rates.uk[0].rate":0.21}' \
  --model obr
3

Install and run locally

The package installs from GitHub. The equation listing, the October 2026 EFO forecast tables and the ONS snapshot ship inside it, so there is no data step.

pip install git+https://github.com/PolicyEngine/obr-macroeconomic-model
from obr_macro import run_reform

# £5bn/yr government spending shock (£1.25bn per quarter)
results = run_reform(
    name="Spending rise",
    var="CGG",        # government consumption (exogenous)
    shock=1250,        # £1.25bn per quarter, in £m
    periods=12,
)
print(results[["period", "delta_gdp_bn", "pct_gdp"]])
# ΔGDP ≈ £1.27bn rising to £1.30bn — the shock mostly enters the GDP
# identity, so the multiplier is about 1.01 to 1.04 (OBR: 0.6);
# borrowing rises by the cash cost (nominal_consistent=True, the default)
About this stepnotes

A reform is one call: pick an exogenous variable, apply a shock, read the deviation from the anchored October 2026 baseline (why the deviation is clean). It is two solves: about one to five minutes for a raw shock on the hosted server.

python -m obr_macro.reform_analysis runs the five bundled scenarios, with charts landing in outputs/: a £5bn spending rise, a 5pp corporation-tax cut and rise, a £10bn spending cut, and £10bn public real investment (~£3bn nominal CGIPS per quarter, which does not reach GDP under the default closure).

To score a statutory reform end to end from Python, install the suite instead (pip install "policyengine-macro[models] @ git+https://github.com/PolicyEngine/macro#subdirectory=integration") and call policyengine_macro.score_reform(country="uk", reform={...}, model="obr").

4

Pick a lever

Reforms enter through the 253 exogenous inputs; results come out of the 383 endogenous variables in the published listing. About 290 of its 372 equations are live in a solve; a variable without a live equation passes through at the OBR’s value.

About this stepnotes
levers — set these (exogenous)
CGGGovernment consumption — spending shocks, £m per quarter
CGIPSCentral government investment — £m per quarter (nominal). No transmission by default; investment_closure=True passes it through as an identity, not a multiplier (limit)
VRECVAT receipts — £m per quarter (2,200 is a 1pp rise). Barely reaches GDP by default; price_passthrough=True is a labelled overlay (limit)
TCPROCorporation tax rate — rate, e.g. −0.05 for a 5pp cut. Converges slowly: a 12-quarter run captures only ~40% of the full effect, and the result reports its plateau_fraction
HHDI_ADDFACTORExternally costed household reform — virtual instrument, quarterly £m; positive revenue lowers HHDI via a held add-factor
R / GILT / RXBank Rate · gilt yields · exchange rate — monetary & market assumptions
readouts — read these (endogenous)
GDPMGDP at market prices — headline output
CONSPrivate consumption
IBUS / IFBusiness / total investment — IF has no live equation under the default closure and moves exactly zero
LFSURUnemployment rate — rate, pp. Does not respond to any lever tested: no Okun channel

All 636 codes, with descriptions, ONS series and equations, are in the model package's variable and equation references. Before quoting a result, check the limits: only income tax and NICs carry behaviour.