Skip to content

Certify the Microcosm UK national from microcosm#1419 on policyengine-uk 2.162.14 (4374e0bf; local area 6528c865 or c9df4b86) - #728

Draft
juaristi22 wants to merge 2 commits into
mainfrom
uk-certify-microcosm-national-1418
Draft

juaristi22 wants to merge 2 commits into
mainfrom
uk-certify-microcosm-national-1418

Conversation

@juaristi22

@juaristi22 juaristi22 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

@MaxGhenis, for the UK hub: this certifies the Budget-fixes national from PolicyEngine/microcosm#1419 on policyengine-uk 2.162.14. It needs one decision from you: which local-area cut it keeps, (a) or (b) below. It stays a draft until you choose.

This national supersedes 3c0d11b6, the national in #725. What happens to #725 is your call.

The national

microcosm-uk-2024-25-national-20261028T214959Z-4374e0bf (microcosm_uk_2024_25):

What it adds over 3c0d11b6 (details in #1419):

  • HMRC's Income Tax on savings at each rate (ITL Table 2.6) is bound, and the FRS NS&I and gilt interest the spine dropped is booked.
  • The Carer's Allowance pool is drawn from carers of a severely disabled person.
  • Bus support outside London is priced on BUS01c's older and disabled journeys, and the NTS non-user band gets no trips.

Fits:

  • Table 2.6 within 0.11%, and the SPI Table 3.7 interest bands within 0.22%.
  • 99% of targets within 10%.
  • Head-to-head on the same register against 3c0d11b6: 0.0128 against 0.0155 full loss.

The local area: your call

Constituency and local-authority regions route to the local-area cut (regional_release_kind: local_area). Neither cut below carries #1419's fixes, so area runs don't see them; the next rebuilt pair will.

(a) #725's microcosm-uk-2024-25-dense-20261027T154955Z-6528c865. This draft's default.

(b) main's microcosm-uk-2024-25-dense-20261026T105309Z-c9df4b86, the local-area data the dashboard reads today.

  • Built on policyengine-uk 2.151.0.
  • It needs its own input-surface audit against 2.162.14 before certify-data accepts it, with María as auditor (--audited-by juaristi22) and a limitation saying the cut was built on 2.151.0. Its H5 is on hand and matches the manifest pin, and the audit takes about a minute.
  • It doesn't store 25 inputs that 2.162.14 reads and 6528c865 stores: 24 alcohol, tobacco and gambling quantities, and is_apprentice. Area runs on it would read them as zero, so they would carry no alcohol, tobacco or gambling duty.

If you choose (b), I'll run the audit, re-certify and push it here.

Before the dashboard moves to this bundle

The SPI other-income gap

HMRC's Income Tax on savings at each rate (ITL Table 2.6) is met mostly through other_investment_income, the one savings column no target binds.

  • HMRC's savings tax grows ×1.52 from 2023-24 to the calendar-2025 window. The SPI Table 3.7 interest rows grow ×1.192, while the OBR's savings path is ×1.358.
  • other_investment_income is £9.5bn in 2024, against £3.5bn on 3c0d11b6. SPI 2023-24 Table 3.7 publishes £5.85bn of "other income".
  • What holds: the taxed savings base by rate matches HMRC's, which is the costing's base. The engine taxes interest and other investment income alike, so savings-rate costings hold.
  • What does not hold: the split between bank interest and other investment income, and anything else that reads other_investment_income.
  • The remedy is Budget 2026 slower data fixes, PR C of #1418: electricity at the ONS level, pension income by area microcosm#1420 (PR C). It re-uprates the Table 3.7 interest rows on the OBR savings path, binds Table 3.7's other income by band, and re-measures.

The Pension Tax Allowance and income_tax

The dashboard's Pension Tax Allowance measure ("State Pension income tax protection") can't run on policyengine-uk 2.162.x:

  • it wraps income_tax;
  • on 2.162.x, income_tax adds the tax before the Winter Fuel Payment charge to the charge itself;
  • the dashboard's _replace_formula refuses a variable built from adds or subtracts ("income_tax is built from adds or subtracts; a template cannot wrap it").

The data play no part. The row needs one of two things before the dashboard moves to this bundle:

Electricity

Electricity stays a diagnostic in this cut: the zero rate scores −£0.84bn against Table 6.1's −£0.755bn. The costing's base is ONS household spending, and this cut's electricity spending at the dataset year is £29.9bn, 6.3% above ONS 04.5.1's £28.13bn for 2024. PolicyEngine/microcosm#1420 moves it to the ONS level.

The dashboard's Budget measures on this national, against Table 6.1

From PR A's post-build check. Two comments go with it:

  • The first has the full reading against the costings and the diagnostics.
  • The second compares 3c0d11b6 with 4374e0bf, both on 2.162.14. It separates PR A's data effect from the engine change, which the Published column mixes. Savings rise 30%, from 11–13% below the costing to 13–16% above it. Carer's Allowance's net cost falls by about a quarter. The other measures move by less than 3%.

How it was scored.

  • Code: the measures from PolicyEngine/uk-autumn-budget-dashboard-2026 main (57095fd), with its October 2026 forecast (with_forecast).
  • Method: the same as the dashboard's BudgetaryImpactCalculator. Each figure is the weighted change in gov_balance, in £bn, positive when the Exchequer gains.
  • Engine: policyengine-uk 2.162.14.
  • Published: the dashboard's release artifacts, on national a6299504 with policyengine-uk 2.151.0. That column differs from this cut in engine as well as data.
  • Official: the dashboard's official_costings.json, from Table 6.1 and the costings note, after behaviour. The savings figures come from the costings note's savings income measure.
Measure Year 4374e0bf Published Official
Household Energy Payment 2026-27 −1.969 −1.969 −2.625
Zero VAT on domestic electricity 2026-27 −0.841 −0.840 −0.755
2027-28 −0.353 −0.353 −0.305
Fuel duty rises deferred 2026-27 −0.290 −0.301 −0.575
2027-28 −0.501 −0.521 −0.780
State Pension income tax protection 2027-28 not scored (1) −0.030 −0.045
2028-29 not scored (1) −0.083 −0.090
2029-30 not scored (1) −0.144 −0.150
Trading allowance raised to £3,000 2028-29 −0.112 −0.118 −0.225
2029-30 −0.116 −0.119 −0.165
2030-31 −0.116 −0.120 −0.175
2031-32 −0.119 −0.130 −0.180
Property income rates +2pp 2029-30 +0.416 +0.429 +0.435
2030-31 +0.432 +0.446 +0.445
2031-32 +0.445 +0.459 +0.455
Savings income rates +2pp (2) 2029-30 +0.603 held back +0.520
2030-31 +0.636 held back +0.555
2031-32 +0.666 held back +0.590
Carer's Allowance earnings taper (3) 2030-31 −0.017 −0.024 −0.040
2031-32 −0.032 −0.048 −0.080

Notes

  1. Not scored: see "The Pension Tax Allowance and income_tax" above. The data play no part.
  2. Savings was held back from the dashboard's release. On a6299504, the Budget day: announced measures uk-autumn-budget-dashboard-2026#290 review measured about +£0.29bn for 2028-29, about half the costing.
    • On this cut, the measure scores +£0.539bn for 2027-28 and +£0.569bn for 2028-29.
    • The costing's figures for those two years look like Self Assessment timing, as property's do: +£125m, then +£555m, above 2029-30's +£520m. So the like-for-like years start in 2029-30.
    • From 2029-30 it is 13–16% above the costing, which comes after savers shift into ISAs and publishes no static figure. See the SPI other-income gap above.
    • Projection doesn't explain the 13–16%. From 2025-26 the OBR savings income forecast the costing uses grows faster than the engine's GDP-per-head path (about +18% against +15% to 2029-30), so at matching 2025 levels this cut would score below a static costing. The excess is more plausibly the costing's ISA shifting.
  3. The dashboard nets the income tax on the allowance. The costing counts DWP's Carer's Allowance and UC spending only. This cut has about 80,000 gainers in England and Wales, against the Budget's 48,000.
    • One draw: Microcosm's static figure (−£30m in 2030-31, −£59m in 2031-32; Carer's Allowance plus UC, no income tax) is one draw of the 0.6 take-up assumed for newly entitled carers, on few FRS households (fewer than 10 in Wales).
    • Redraws: redrawing that take-up on the same file averages about −£41m and −£82m, around the costing's −£40m and −£80m. The 10th–90th percentile range is about −£28m to −£53m in 2030-31 and −£55m to −£106m in 2031-32.
    • The count: the ~80,000 counts everyone whose Carer's Allowance rises. About three fifths of that allowance goes to UC households, where UC takes nearly all of it back, so about 35,000 carers are better off, against the Budget's ~48,000 who benefit.
    • Next: the next pair balances the draw within strata to cut this noise (Budget 2026 slower data fixes, PR C of #1418: electricity at the ONS level, pension income by area microcosm#1420).

Bus, 2027-28, on this cut:

  • 34.2m people make local-bus trips, 26.9m of them outside London;
  • 14.9m households pay fares;
  • fares total £4.60bn.

Support: every figure above rests on ≥10 source households. The check counts either the measure's gainers or a set of households the measure is certain to change.

Impact

Commits

  • cf0401b5: the national and the local area, certified by one certify-data run. It also has the lock, the release lock, the TROs, the certified test constants and the changelog fragment.
  • 1c421c16: the household calculator snapshots, regenerated on 2.162.14 (PE_UPDATE_SNAPSHOTS=1). The UK households and the model surface move with the model; the US snapshots don't change.

The lock, pyproject.toml and the snapshots are byte-identical to #725's. The manifest differs from #725's only in the national's identity and hashes.

How it was made

uv sync --frozen --extra uk --extra dev --python 3.13
uv pip install policyengine-uk==2.162.14
# (a): #725's audit of 6528c865 for 2.162.14 is reused; no new audit
python scripts/bundle.py certify-data --country uk --data-producer populace \
  --manifest-uri "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-national-20261028T214959Z-4374e0bf/releases/microcosm-uk-2024-25-national/release_manifest.json" \
  --regional-manifest-uri "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-dense-20261027T154955Z-6528c865/releases/microcosm-uk-2024-25-dense/release_manifest.json" \
  --model-version 2.162.14 \
  --accept-regional-model-mismatch "<#725's reason, in the regional record>" \
  --regional-input-surface-evidence regional_input_surface.json
uvx --from uv==0.13.4 uv lock --no-config --no-sources --default-index https://pypi.org/simple --python 3.13
uv sync --frozen --extra uk --extra dev --python 3.13
python scripts/release_lock.py
python scripts/bundle.py generate --include-tros
PE_UPDATE_SNAPSHOTS=1 python -m pytest tests/test_household_calculator_snapshot.py -q
python scripts/bundle.py check
python scripts/bundle.py check --include-tros --strict-tros
python scripts/check_uk_uc_floor.py --dataset microcosm_uk_2024_25 --year 2025 --output uc_floor.json

uk_qualification.rewrite_certified_constants rewrote the certified constants in tests/test_models.py, tests/test_release_manifests.py and tests/test_uk_regions.py.

Evidence run on this head

  • The UC floor passed (check_uk_uc_floor.py, Great Britain, 2025, within 10%). The receipt holds weighted national totals only:

    • benefit units at 0.927 of DWP's figure;
    • spend at 0.958 of the OBR's.

    It took 205 s and peaked at 18.6 GB.

  • Both bundle.py check runs pass, the second with --include-tros --strict-tros.

  • Locally, these tests pass; the full suite runs in CI:

    • 139 on release manifests, UK regions, models, household snapshots and the UC floor;
    • 296 on the bundle, TRO, certification, regional-evidence, pin and release-lock paths.

Disclosure

Aggregates only: weighted national totals over many records, and published HMRC, ONS, DWP, OBR and Treasury figures.

🤖 Generated with Claude Code

juaristi22 and others added 2 commits October 29, 2026 01:01
…e0bf national, 6528c865 local area)

One certify-data run: the national microcosm-uk-2024-25-national-20261028T214959Z-4374e0bf
certifies on its own build (policyengine-uk 2.162.14); the local-area cut
microcosm-uk-2024-25-dense-20261027T154955Z-6528c865 routes on the accepted
model mismatch with the input-surface audit made for #725. Also the relock,
the release lock, the TROs, the certified test constants and the changelog
fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2.14

PE_UPDATE_SNAPSHOTS=1. The UK households and the model surface move with
the model; the US snapshots are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22

juaristi22 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Dashboard OBR scoring on national 4374e0bf (PolicyEngine/microcosm#1419, PR A of PolicyEngine/microcosm#1418)

How it was scored.

  • Code: the measures from PolicyEngine/uk-autumn-budget-dashboard-2026 main (57095fd), with its October 2026 forecast (with_forecast).
  • Method: the same as the dashboard's BudgetaryImpactCalculator. Each figure is the weighted change in gov_balance, in £bn, positive when the Exchequer gains.
  • Engine: policyengine-uk 2.162.14.
  • Published: the dashboard's release artifacts, on national a6299504 with policyengine-uk 2.151.0. That column differs from this cut in engine as well as data.
  • Official: the dashboard's official_costings.json, from Table 6.1 and the costings note, after behaviour. The savings figures come from the costings note's savings income measure.
Measure Year 4374e0bf Published Official
Household Energy Payment 2026-27 −1.969 −1.969 −2.625
Zero VAT on domestic electricity 2026-27 −0.841 −0.840 −0.755
2027-28 −0.353 −0.353 −0.305
Fuel duty rises deferred 2026-27 −0.290 −0.301 −0.575
2027-28 −0.501 −0.521 −0.780
State Pension income tax protection 2027-28 not scored (1) −0.030 −0.045
2028-29 not scored (1) −0.083 −0.090
2029-30 not scored (1) −0.144 −0.150
Trading allowance raised to £3,000 2028-29 −0.112 −0.118 −0.225
2029-30 −0.116 −0.119 −0.165
2030-31 −0.116 −0.120 −0.175
2031-32 −0.119 −0.130 −0.180
Property income rates +2pp 2029-30 +0.416 +0.429 +0.435
2030-31 +0.432 +0.446 +0.445
2031-32 +0.445 +0.459 +0.455
Savings income rates +2pp (2) 2029-30 +0.603 held back +0.520
2030-31 +0.636 held back +0.555
2031-32 +0.666 held back +0.590
Carer's Allowance earnings taper (3) 2030-31 −0.017 −0.024 −0.040
2031-32 −0.032 −0.048 −0.080

Notes

  1. The dashboard's State Pension template wraps income_tax. On policyengine-uk 2.162.14 that variable is the sum of the tax before the Winter Fuel Payment charge and the charge itself, so the template refuses to wrap it. The dashboard needs a port before it moves to 2.162.14; the data play no part.
  2. Savings was held back from the dashboard's release. On a6299504, the Budget day: announced measures uk-autumn-budget-dashboard-2026#290 review measured about +£0.29bn for 2028-29, about half the costing.
    • On this cut, the measure scores +£0.539bn for 2027-28 and +£0.569bn for 2028-29.
    • The costing's figures for those two years look like Self Assessment timing, as property's do: +£125m, then +£555m, above 2029-30's +£520m. So the like-for-like years start in 2029-30.
  3. The dashboard nets the income tax on the allowance. The costing counts DWP's Carer's Allowance and UC spending only. This cut has about 80,000 gainers in England and Wales, against the Budget's 48,000.

Reading against the costings

  • Household Energy Payment: the £2.625bn includes Barnett funding for the devolved nations.
  • Electricity: 11% above the costing in 2026-27. The costing's base is ONS household spending.
  • Fuel: household fuel only. The costing counts every litre, business included.
  • Trading: there are no gross receipts or miscellaneous income in the data. policyengine-uk relieves a profit within the allowance in full and gives no relief above it. The costing's base includes miscellaneous income.
  • Property: 4.4%, 3.0% and 2.3% below the costing in 2029-30 to 2031-32, and about 3% below the published figures. Engine and data both differ from the published column, so this table does not split that.
  • Savings: 16%, 15% and 13% above the costing in 2029-30 to 2031-32. The taxed base matches HMRC's Table 2.6 by rate in 2025 (see Diagnostics), and that base is the costing's.
    • The costing comes after savers shift into ISAs and publishes no static figure, so this table cannot split behaviour from growth.
    • Projection doesn't explain the 13–16%. From 2025-26 the OBR savings income forecast the costing uses grows faster than the engine's GDP-per-head path (about +18% against +15% to 2029-30), so at matching 2025 levels this cut would score below a static costing. The excess is more plausibly the costing's ISA shifting.
    • See the known gap below.
  • Carer's Allowance: 42% and 40% of the costing on the dashboard's net basis, which includes the income tax.
    • One draw: Microcosm's static figure (−£30m in 2030-31, −£59m in 2031-32; Carer's Allowance plus UC, no income tax) is one draw of the 0.6 take-up assumed for newly entitled carers, on few FRS households (fewer than 10 in Wales).
    • Redraws: redrawing that take-up on the same file averages about −£41m and −£82m, around the costing's −£40m and −£80m. The 10th–90th percentile range is about −£28m to −£53m in 2030-31 and −£55m to −£106m in 2031-32.
    • The count: the ~80,000 counts everyone whose Carer's Allowance rises. About three fifths of that allowance goes to UC households, where UC takes nearly all of it back, so about 35,000 carers are better off, against the Budget's ~48,000 who benefit.
    • Next: the next pair balances the draw within strata to cut this noise (Budget 2026 slower data fixes, PR C of #1418: electricity at the ONS level, pension income by area microcosm#1420).

Diagnostics on this cut

  • Savings tax at each rate, calendar 2025: the rate times the engine's savings income in that band, against HMRC Income Tax Liabilities Table 2.6. It comes to 99.3% at the basic rate, 99.9% at higher and 99.8% at additional.
  • Electricity spending:
    • £29.9bn at the dataset year (2024 prices); £31.0bn in 2025-26 and £32.1bn in 2026-27 after uprating.
    • ONS 04.5.1: £28.13bn for 2024.
  • Gas: £19.3bn at the dataset year, against ONS 04.5.2's £18.30bn.
  • Bus, 2027-28:
    • 34.2m people make local-bus trips, 26.9m of them outside London;
    • 14.9m households pay fares;
    • fares total £4.60bn.

Support: every figure above rests on ≥10 source households. The check counts either the measure's gainers or a set of households the measure is certain to change.

Known gap: carry this with the table. The national cut meets ITL Table 2.6's savings tax mostly through other_investment_income, the one savings column no target binds.

  • other_investment_income is £9.5bn in 2024, against £3.5bn on 3c0d11b6. SPI 2023-24 Table 3.7 publishes £5.85bn of "other income".
  • What holds: the taxed savings base by rate matches HMRC's, and that base is the costing's. The engine taxes interest and other investment income alike, so savings-rate costings hold.
  • What does not hold: the split between bank interest and other investment income, and anything else that reads other_investment_income.
  • PR C (Budget 2026 slower data fixes, PR C of #1418: electricity at the ONS level, pension income by area microcosm#1420) re-uprates the Table 3.7 interest rows on the OBR savings path, binds Table 3.7's other income by band, and re-measures.

🤖 Generated with Claude Code

@juaristi22

Copy link
Copy Markdown
Contributor Author

Same engine, before and after PR A: 3c0d11b6 against 4374e0bf (PolicyEngine/microcosm#1419)

Both cuts are scored with the dashboard's measure code (PolicyEngine/uk-autumn-budget-dashboard-2026 main, 57095fd), its October 2026 forecast and policyengine-uk 2.162.14, so the change between them is PR A's data. Each figure is the weighted change in gov_balance, in £bn, positive when the Exchequer gains. "Official" is the dashboard's official_costings.json, plus the costings note's savings figures.

Measure Year 3c0d11b6 4374e0bf Official
Household Energy Payment 2026-27 −1.968 −1.969 −2.625
Zero VAT on domestic electricity 2026-27 −0.837 −0.841 −0.755
2027-28 −0.352 −0.353 −0.305
Fuel duty rises deferred 2026-27 −0.290 −0.290 −0.575
2027-28 −0.501 −0.501 −0.780
Trading allowance raised to £3,000 2028-29 −0.112 −0.112 −0.225
2029-30 −0.113 −0.116 −0.165
2030-31 −0.113 −0.116 −0.175
2031-32 −0.121 −0.119 −0.180
Property income rates +2pp 2029-30 +0.418 +0.416 +0.435
2030-31 +0.434 +0.432 +0.445
2031-32 +0.447 +0.445 +0.455
Savings income rates +2pp 2029-30 +0.462 +0.603 +0.520
2030-31 +0.490 +0.636 +0.555
2031-32 +0.515 +0.666 +0.590
Carer's Allowance earnings taper 2030-31 −0.022 −0.017 −0.040
2031-32 −0.044 −0.032 −0.080

The State Pension income tax protection is not scored on either cut: the dashboard's template can't wrap income_tax on 2.162.14.

Reading

  • Measures PR A doesn't target move by less than 3%: the Household Energy Payment, electricity, fuel, trading and property.
  • Savings: the yield rises by 30%, from 11–13% below the costing to 13–16% above it. The costing comes after savers shift into ISAs.
    • At the calendar-2025 window, savings tax at each rate against ITL Table 2.6 moves from 86%, 71% and 65% (basic, higher, additional) to 99%, 100% and 100%.
    • The published dashboard (a6299504, policyengine-uk 2.151.0) gave about +0.29 for 2028-29. 3c0d11b6 already gives +0.43 on this engine, so most of that rise came before PR A.
  • Carer's Allowance: the net cost falls by about a quarter.
    • Gainers in England and Wales fall from about 85,000 to about 80,000, against the Budget's 48,000.
    • The dashboard's figure includes income tax; the costing counts Carer's Allowance and UC spending.
  • Bus, 2027-28:
    • People with local-bus trips: 69.9m → 34.2m. On 3c0d11b6 the NTS non-user band carried trips, so almost everyone had some.
    • Of them, outside London: 60.7m → 26.9m.
    • Households paying fares: 20.8m → 14.9m.
    • Total fares: £4.50bn → £4.60bn.
  • Electricity spending at the dataset year (2024 prices): £29.76bn → £29.90bn, against ONS 04.5.1's £28.13bn. Gas: £19.20bn → £19.29bn, against ONS 04.5.2's £18.30bn.

Support: every figure rests on ≥10 source households on both cuts. The check counts either the measure's gainers or a set of households the measure is certain to change.

Known gap: the savings known gap and the distributional caveat from the 4374e0bf table apply to the 4374e0bf column.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant