Repository navigation
Conversation
Stores the FRS benefit-unit capital (TOTCAPB4, TOTCAPB3 fallback) once as policyengine-uk's benunit_reported_capital instead of the programme-named pension_credit_reported_capital. policyengine-uk derives Universal Credit and Pension Credit reported capital from it, so UC's capital test now uses the FRS's own capital, as Pension Credit already did. SPI-synthetic copies keep -1 (household proxy). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on PolicyEngine/policyengine-uk#2201, which adds the
benunit_reported_capitalinput. This PR needs a policyengine-uk release containing #2201 and a lock bump to it; until then CI fails on the new variable. Like every uk-data merge, it lands with the next batched data release on Max's go (the d833 pattern). Draft until the rebuild below is done.Why
uk-data#513 gave Pension Credit the FRS's own benefit-unit capital (
TOTCAPB4). Universal Credit still takes capital from the household wealth imputation. In policyengine-uk,uc_assessable_capitalusesuc_reported_capitalwhen it is 0 or more. Otherwise it shares the household'ssavings, other residential and non-residential property andcorporate_wealthamong the claimants and partners of unreported benefit units, and adds person-level sources such as a Lifetime ISA.is_uc_eligiblethen requires assessable capital of at most £16,000, anduc_tariff_incomecharges £4.35 a month per £250 above £6,000. In 1.58.0 no benefit unit records UC capital, so the proxy applies everywhere.On the published 1.58.0 dataset (policyengine-uk main 2.123.7, 2026, child-weighted over households in absolute BHC poverty):
The household imputation predicts wealth from income, composition, tenure and region, and has no information on means-tested receipt.
Following Max's direction ("the microdata should just populate the inputs"), the data now records the observed capital once. policyengine-uk#2201 makes
uc_reported_capitalandpension_credit_reported_capitalformulas of it, rather than this build writing into each programme's column.What changes
create_frswritesbenunit_reported_capital= FRSTOTCAPB4for every benefit unit, in place ofpension_credit_reported_capital. The source and method are Use the FRS benefit-unit capital for Pension Credit's capital test #513's, unchanged:TOTCAPB3for earlier survey years, and -1 where both are missing or negative.pension_credit_reported_capitalfrom the same input, with the same values and the same uprating. On the 1.58.0 data, Pension Credit and Housing Benefit totals are identical to main for 2024 to 2026 (table below).impute_income) get -1 in every recorded-capital column (REPORTED_CAPITAL_COLUMNS), so they fall back to the household proxy, as in Use the FRS benefit-unit capital for Pension Credit's capital test #513.uprating_factors.csvanduprating_growth_factors.csv: thepension_credit_reported_capitalrow becomesbenunit_reported_capital, with the same per-capita GDP values. The two programme variables are formulas in policyengine-uk, socreate_policyengine_uprating_factors_tableno longer emits rows for them. A test checks the row against the model.savingsand the other wealth columns, so wealth analyses still use the WAS imputation.Measured: static, on 1.58.0 (real runs; rebuild pending)
Setup: 1.58.0's own
pension_credit_reported_capitalcolumn already holds exactly what this build writes:TOTCAPB4, -1 on SPI-synthetic copies, uprated by the same row.benunit_reported_capital, with the Pension Credit column dropped (make_branch_dataset.py).UC against DWP (GB):
¹ DWP, Benefit expenditure and caseload tables, Spring Forecast 2026 (xlsx): Table 1a for spending and Table 1c for caseload (financial-year average).
How the counts compare:
obr/universal_credittarget) gives £66.4bn, £79.3bn and £87.6bn for the three years.Two caveats:
dwp/uc/householdsis 6.7m, while the family-type and payment-band targets each sum to 6.096m (May 2025 households with a payment). That is chipped separately; Calibrate DWP and OBR welfare targets on the countries their source covers #542 fixes only their geography.Child poverty, FYE 2025 (2024), UK:
³ DWP, "Households below average income: FYE 1995 to FYE 2025" (26 March 2026), tables 1_4a/1_4b. The absolute line is 60% of the FYE 2025 median, so absolute equals relative in FYE 2025; policyengine-uk uses the same reference year.
Other groups, absolute BHC / AHC, FYE 2025:
The capital gap among poor children (FYE 2025; child-weighted, households in absolute BHC poverty):
Everything else, 2024 to 2026:
uc_assessable_capital.These results are at fixed weights and take-up draws. Calibration targets UC caseload and spend, so the rebuild will move them.
Rebuild (owed)
The plan is base (main relocked to the policyengine-uk release with #2201) against branch (the same plus this change), with the same seed, inputs and engine, 512 epochs. Measures: UC, PC, HB and CTR caseloads and spend; calibration fit; and the poverty table above.
It is held on two things:
Remaining gap, outside this PR
benunit_reported_capitalis a policyengine-uk follow-up, also chipped.Tests
tests/test_benunit_reported_capital.py(renamed fromtest_pension_credit_reported_capital.py):TOTCAPB4carries over, withTOTCAPB3as the fallback, including for nullable columns.benunit_reported_capitaluprating rows equal what the model derives (2020–2034).Run with policyengine-uk #2201 installed: these tests plus
test_uprating_range.pyandtest_road_fuel_volume_uprating.py, 26 passed.Scripts and outputs:
~/reviews/uk-uc-reported-capital-2026-10-08/(local):measure.py,make_branch_dataset.pyandout/*.json.axiom: n/a: data change (the UC capital rule itself is unchanged; policyengine-uk#2201 carries the input)
🤖 Generated with Claude Code