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.
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.
Rules, entities, dependency graphEntities
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.
Reforms and reproducibility
A reform is a flat dict of parameter path → new value. The household and population APIs take the same format.
Reform mechanicsVersion-pinned releases
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.
Survey microdata, enhanced
Population runs apply the same rule graph to a representative survey. Household calculations need no data and no credentials.
Data enhancementThe surveys · Gated UK microdata · Inherited error
enhanced_frs_2023_24The 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).