Tax-benefit microsimulation

PolicyEngine microsimulation

Rules as code, the microdata, and how a reform is applied.

How it works

Statute as code, a reform as a parameter change, and survey microdata for population runs.

1

Statute as a dependency graph

Every quantity (an allowance, a taper, a means test) is a variable. Asking for one resolves the graph beneath it, so net income comes from the statutory chain, not an approximating schedule.

Request a variable, resolve the graph beneath it dated parameters allowances, tapers, rates household inputs the ones you type variables formula + dated parameters, attached to entities net income statutory chain entities: UK 3 (person, benefit unit, household) · US 6
click to expand
Rules, entities, dependency graphEntities
Rules, entities, dependency graph
Variable
formula + dated parameters
Resolution
request a variable → resolve the graph beneath it
Entities
UK: 3 · US: 6

Entities

Variables attach to entities. UK: three (person, benefit unit, household). US: six (person, tax unit, SPM unit, family, marital unit, household), because US programmes are assessed on differently drawn units.

2

Reforms and reproducibility

A reform is a flat dict of parameter path → new value. The household and population APIs take the same format.

A reform re-dates parameters and re-resolves the same graph reform dict {parameter path → new value} re-dated parameter same graph, new values re-resolved graph household + population APIs Version-pinned release country-model + dataset versions pinned; estimates trace to the bundle
click to expand
Reform mechanicsVersion-pinned releases
Reform mechanics
Reform
{parameter path → new value}
Evaluation
re-date parameter → re-resolve same graph

Version-pinned releases

Each release pins the country-model and dataset versions it certifies, so a published estimate traces to the exact bundle that produced it.

3

Survey microdata, enhanced

Population runs apply the same rule graph to a representative survey. Household calculations need no data and no credentials.

Building the enhanced UK dataset FRS survey household microdata administrative totals aggregate targets impute + reweight under-reported incomes, weights to match totals enhanced FRS enhanced_frs_2023_24 US population runs use the Current Population Survey (CPS)
click to expand
Data enhancementThe surveys · Gated UK microdata · Inherited error
Data enhancement
UK dataset
enhanced FRS · enhanced_frs_2023_24
US dataset
Current Population Survey (CPS)
Enhancement
impute under-reported incomes + reweight to administrative totals

The surveys

UK: the enhanced Family Resources Survey (currently the enhanced_frs_2023_24 vintage). US: the Current Population Survey.

Gated UK microdata

The enhanced UK microdata is distributed via a gated Hugging Face repository (policyengine/policyengine-uk-data).

Inherited error

Population estimates inherit sampling, imputation and ageing error that a deterministic household calculation does not. No interval is computed (limits).

Where the outputs go

The same microdata feeds the OLG model’s tax functions, and the static costings feed the OBR emulator (every join).