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.
Shock a variable, read the deviation.
Four steps, from hosted tools to a local run: each step's commands appear alongside as you read.
Start hosted: the MCP server
The quickest route is the hosted MCP server —
no install, no credentials. obr_shock shocks one
variable in model units and reads 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 that combination works, with the worked example and
its caveats, is on the overview.
Corporation-tax reforms are refused by the bridge (not
household-borne); UK only.
Or from the CLI
The pe-macro CLI mirrors the hosted tools one for one:
shock a variable, list the levers, or score a reform from the
terminal.
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 obrInstall and run locally
Locally, the package installs straight from GitHub — the equation listing, the March 2026 EFO forecast tables, and the ONS snapshot ship inside it, so there is no data step. A reform is one call: pick an exogenous variable, apply a shock, read the deviation from baseline.
Two solves, so about a minute.
python -m obr_macro.reform_analysis runs the five
bundled scenarios — a £5bn spending rise, a 5pp corporation-tax cut
and rise, £10bn public real investment (~£3bn nominal
CGIPS per quarter), and a £10bn austerity cut — with
charts landing in outputs/.
pip install git+https://github.com/PolicyEngine/obr-macroeconomic-modelfrom obr_macro import run_reform
# £5bn/yr government spending shock (£1.25bn per quarter)
results = run_reform(
name="Fiscal Stimulus",
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.25bn in every quarter, exactly flat — under the demand
# closure this lever's multiplier is 1.0000 by construction (OBR: 0.6)Pick a lever
Reforms enter through the 253 exogenous inputs; results come out of the 383 the model solves — the test is simply whether a variable has its own equation. The most useful levers and readouts are in the table alongside.
The full glossary — all 636 codes with descriptions, ONS series and equations — is the model package's variable and equation references.
CGGGovernment consumption — spending shocks, £m per quarterCGIPSCentral government investment — public investment, £m per quarter (nominal). Dead channel: business investment does not respond at all and the residual GDP effect is wrong-signed, against the OBR’s published 1.0. Do not score capital spending with itTCPROCorporation tax rate — rate, e.g. −0.05 for a 5pp cut. Converges slowly: since the log-space anchor fix the response reaches a plateau, but the root is slow — a 12-quarter run captures only ~40% of the full effect, and the result reports its plateau_fractionHHDI_ADDFACTORExternally costed household reform — virtual instrument, quarterly £m; positive revenue lowers HHDI via a held add-factorR / GILT / RXBank Rate · gilt yields · exchange rate — monetary & market assumptionsGDPMGDP at market prices — headline outputCONSPrivate consumptionIBUS / IFBusiness / total investmentLFSURUnemployment rate — rate, pp