Repository navigation
Conversation
corporate_wealth was built as (WAS total private pension wealth less current-employment DB) + employee shares + UK shares + investment ISAs + unit/investment trusts, so 84.7% of its WAS round 8 mass (GBP 3,659bn of 4,318bn) was pension wealth, which every means test disregards (UC Regs 2013 Sch 10 para 10 and the legacy equivalents). policyengine-uk counts corporate_wealth as capital, so imputed pensions failed claimants on the GBP 16,000 limit. The imputation now draws private_pension_wealth in the slot the old column held, then directly_held_shares (UK + employee shares), unit_and_investment_ trusts and stocks_and_shares_isa, and builds corporate_wealth as their exact sum. These are the parts DWP values differently: quoted shares less 10% for costs of sale (ADM H1665), unit trusts with none (H1674), ISAs at withdrawal value (H1656). cash_isa is exported too. other_residential_property_value took only WAS second homes (DVHseValR8, GBP 254bn) and left buy-to-let (DVBltValR8, GBP 573bn) out of every capital input; it now holds both. The debt secured on each non-main asset class is imputed after its asset for the policyengine-uk inputs that value capital net of encumbrances (reg 49(1)(b)): second homes + buy-to-let, other buildings and UK land, kept only where the household holds the asset. The model metadata records how each derived target is built, so a cached model retrains when a definition changes. Uprating rows for the new columns copy corporate_wealth's per-capita GDP index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
microimpute's QRF draws every target's quantile from the same seed, so each household got one quantile for all eighteen targets. Chained on earlier draws, that made sparse targets near-certain for households drawn high for a related asset: on the raw 2024-25 FRS the imputed debt secured on UK land came to GBP 56.8bn across 0.19m households (WAS donor GBP 1.3bn, 0.03m), and non-residential property debt GBP 51.8bn (donor GBP 5.7bn). Each target now gets its own seed after fitting (recorded in the model metadata, so cached models retrain): land debt falls to GBP 7.0bn across 0.04m households, non-residential debt to GBP 6.9bn, and savings from GBP 1,890bn to GBP 733bn (donor GBP 457bn on 7% fewer households). docs/imputations.md: overseas property and shares are not exported separately but are inside the property and financial totals (review nit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of
|
# Conflicts: # uv.lock
On the built Enhanced FRS: corporate_wealth equals its components, each secured debt appears only with its asset, the locked policyengine-uk reads every new input at its stored weighted total, deducts each debt from the asset it is imputed for, and keeps corporate_wealth as the share-like capital block. The engine checks need the policyengine-uk releases carrying #1974 and #1969; this PR stays a draft until the lock moves to them (UK hub review of 2ad43a6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
af64d37 to
0c7cf0a
Compare
|
@juaristi22 your coverage question was right, and it was a blocker. WAS round 8 defines gross property as seven terms (DV_Spec_Property_R8, rows 49–59): At The data side now needs a companion policyengine-uk change. That's |
|
Overlap: #501 (WAS wealth split, draft) also edits |
Main already pins hypothesis>=6.168.3; the unversioned entry this PR added before the merge duplicated it (review of 23d1027). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Specify seven WAS source terms mapped to six inputs, retain the combined residential value and debt, and stack on the open share and capital model companions. Correct capital sale-expense routing and the domestic purchase proxy, and remove instructions for the obsolete UC property-income gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve the wealth-split residential value, secured debts, share components and draw order. Retain overseas property and other real estate as the only new outputs, validate each raw property source before merging, and keep the WAS total for conditioning only while removing inherited saved totals. Retain Hypothesis accounting and growth tests, add buy-to-let conservation and source-cleaning regressions, and reconcile all seven source terms into six model inputs with separate historical and wealth-split comparisons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0c7cf0a to
8dd860b
Compare
Draft — stacked on policyengine-uk-data#501, which must merge first. This branch tracks
was-wealth-splitand must be restacked whenever that branch moves, without rewriting #501's history. Release only in a batched uk-data release after the companion model changes specified in docs/property-wealth-model-changes.md. No model PR is opened by this work.A saved
property_wealthcolumn overrides the model aggregate and lacks temporal uprating. This PR removes that override while preserving the complete WAS gross-property definition. It adopts #501's treatment of second homes and buy-to-let as one other-residential component; exporting buy-to-let again would double-count it.Confirmed source coverage
The WAS round-8 derived-variable specification, worksheet
DV_Spec_Property_R8, rows 49–59, defines:DVPropertyR8is gross, not mortgage-adjusted net property wealth. Row 45 separately definesHpropWR8 = DVPropertyR8 - HmortGR8; see also the user guide, p. 39.Seven source terms map to six saved components:
DVhValueR8main_residence_valueDVHseValR8_sumother_residential_property_valueDVBltValR8_sumother_residential_property_valueDVBlDValR8_sumnon_residential_property_valueDVLUKValR8_sumowned_landDVLOSValR8_sumoverseas_property_valueDVOprValR8_sumother_property_valueThe R8 dictionaries,
UProp2R8, category 5, include overseas dwellings and time-shares. The questionnaire, pp. 197–199 and 205–206, provides the category and valuation questions. The formernon_uk_landreference column did not preserve these assets because it was absent from the imputed outputs. #501 already retains buy-to-let; #543 completes overseas and other-real-estate mapping and the direct-land aggregate treatment.Data changes and retained #501 design
second_homes_value + buy_to_let_valueconstruction ofother_residential_property_value.buy_to_let_valueis an internal survey intermediate, with no separate buy-to-let model export.other_residential_property_secured_debt, the other secured-debt inputs, asset-before-debt chain order, debt zeroing, pension/share split, derivedcorporate_wealthand independent per-target quantile seeds.overseas_property_valueandother_property_valueto the existing imputation targets, preserving Split pensions, shares, trusts, ISAs and secured debt out of WAS wealth #501's existing target order and seeds. The expanded target metadata invalidates incompatible cached models and requires retraining. Retrained draws have not been compared with production data in this workspace.DVPropertyR8in its sequential conditioning slot, but never save that draw as a dataset column. Remove an inherited savedproperty_wealthtotal too. Independent component predictions have no enforced identity to the conditioning draw; the model derives the final aggregate from the components.-9/-8property missing codes and missing values to zero before combining second homes and buy-to-let. Reject other negative gross amounts with aggregate-only diagnostics. Zero-filled source reconciliation is a diagnostic, not a claim that incomplete source cases reconcile.Required model companion and dependencies
The property companion must stack on #501's two open model companions:
policyengine-uk#1974 (
wealth-share-components) and#1969 (
uc-capital-sale-expenses).Preserve their share routing and secured-debt valuation. The only new property model inputs are
overseas_property_valueandother_property_value, registered as household stocks with both variable-level and dataset-YAML GDP-per-capita uprating.The exact files, formulas and tests are specified in the companion document:
residential_property_valuekeeps its existing two-term formula: #501 puts buy-to-let into the other-residential term already.total_wealthreceives direct land, overseas property and other real estate throughproperty_wealth, with no separate additions. Gross property wealth remains separate from #1969's countable-capital valuation, which deducts sale expenses and identified secured debt.No companion model implementation or model dependency/version bump is claimed here. The locked model deliberately fails the build guard until the property companion is released and the data dependency is updated. The synthetic model tests use a local Reform representing the required contract; passing them does not establish that the installed production model has changed.
Consumers and calibration
The companion document separates the historical 2.93.0 file:line audit from current behavior checked on the model companion branches. Property wealth feeds household land/LVT, total wealth, wealth deciles and wealth-tax reforms. Benefit-capital rules and domestic purchase/SDLT proxies read components directly.
The property companion must add
overseas_property_valueandother_property_valueexactly once to both the countable-capital and sale-expense source lists for UC, Housing Benefit, Income Support, income-based JSA, income-related ESA and Pension Credit. Preserve existing source names, effective dates, reported-capital behavior, household-to-benefit-unit allocation and broad-asset/disregard limitations. Retain #1969's source-specific deduction of sale expenses before secured debt and its zero floor. Overseas/other property have no newly exported secured-debt inputs, so unidentified debt on those holdings cannot be deducted by this mapping.The current UC unearned-income formula has no property-income gate to extend. Actual interest, dividends and rent remain excluded at every capital level; capital enters through tariff income. The existing additional-residential purchase/SDLT stock proxy already reads
other_residential_property_value, so #501 includes domestic buy-to-let once automatically. Keep overseas and unclassified other real estate outside that dwelling-purchase proxy.Removing only the aggregate column has no direct effect on component-based benefit, purchase or high-value council-tax formulas at fixed weights. Completing category mapping and routing can change capital and purchase calculations. Recalibration can change weighted aggregates even for formulas without a direct property-wealth dependency.
No calibration control values, target weights or objective terms change here. National and regional land columns change when the model calculates land from the completed components. Evaluated losses and fitted constituency/local-authority weights can consequently change; fitting is not guaranteed to eliminate every discrepancy.
Base-year source reconciliation
Licensed WAS reconciliation: NOT RUN. This workspace has no licensed R8 household TAB file. Run the aggregate-only measurement before release:
The tool independently transcribes all seven source fields before QRF imputation or HPI adjustment. It reports the historical pre-#501 three-term baseline, #501's four-term baseline including buy-to-let, the remaining contributions, the full seven-term residual, and the six mapped model-input sums. Buy-to-let appears once in the grouped other-residential input.
Reports include weighted/unweighted sums, absolute residuals, discrepancy counts, category contributions, households owning only omitted/remaining categories, missing/sentinel counts and invalid-weight treatment. Complete cases and a separately labelled zero-filled diagnostic are both reported. No records or household identifiers are emitted. Earlier comparisons of independently imputed release columns are not raw WAS source reconciliation and are not used to quantify this fix.
Invariants and validation
property_wealthoverride, even when the draw differs arbitrarily from the component sum.Local results: 81 passed, 8 data-dependent skips. Each file ran individually in the foreground with
pytest.main(["-n", "0", "-q", FILE]), using Python 3.13 and a workspace dependency overlay constrained by the lockfile. The runner reused loaded dependencies and reloaded the changed source and test modules between commands.test_property_wealth_components.pytest_was_property_reconciliation.pytest_regional_property_uprating.pytest_student_loan_balance.pyRuff formatting and lint checks passed for all seven touched Python files;
git diff --checkpassed. Preloaded third-party plugins emitted assertion-rewrite warnings; test modules were imported afresh. The synthetic model checks apply the local Reform contract, not a released property companion.17 mutation variants produced the expected test failures, with byte-for-byte restoration verified by SHA-256. They covered omitted/doubled/re-exported buy-to-let; bypassed raw residential-source cleaning; omitted overseas/other mapping; restored conditioning-total persistence; retained inherited totals; missing direct-land/overseas subtraction; separate buy-to-let grouping or an omitted raw term in reconciliation; missing rows in each uprating table; accidental HPI scaling of direct land; and disabled aggregate/uprating compatibility guards. The HPI check initially reused a cached function; loading its current source fixed that validation issue and the rerun failed as expected. No licensed records were used.
Only touched test files are run, one file per foreground command, with at most two pytest workers and
OMP_NUM_THREADSno greater than four. Whole-suite, folder and multi-file runs are skipped under the shared-host rules. Data-dependent built-dataset checks require a rebuilt dataset and the released companion model; synthetic Reform tests establish only the specified contract.Reviewer questions
property_wealth, with explicit overseas exclusion in land. An alternative is domesticproperty_wealthplus a separate overseas addition intotal_wealth; that diverges from WAS's property definition and requires updating every relevant wealth consumer.owned_landonce. Alternatively, exclude it from property wealth and add it explicitly to total wealth, preserving the current land formula. That also diverges from the seven-term source definition.owned_land; UC's list currently omits it. The proposed companion preserves that existing UC treatment. Correcting it requires a deliberate separate model decision.Release boundary
Merge #501 first, then #543. Release notes must state full seven-category source coverage in six saved components; the inherited #501 buy-to-let treatment; affected wealth, land, decile and nonzero reform outputs; explicit companion capital/purchase routing; unchanged controls/objective terms with potentially changed losses/weights; main-residence-only regional HPI adjustment; and no migration of existing published releases.
Remaining gates: licensed source reconciliation; release of the property companion on the open #1974/#1969 model stack; data dependency/lock update; production rebuild/recalibration; fitted-weight comparisons; production distributional/LVT-impact measurements; and resolution of the reviewer classification questions. Existing published datasets retain their stored-total overrides. Keep this PR a draft until the batched release is authorised.
axiom: n/a: data asset mapping and microsimulation accounting; companion model routing is specified separately.
🤖 Generated with Claude Code