Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
538a0b8
Lock policyengine-uk 2.134.4 on the UK side (#1095)
juaristi22 Oct 16, 2026
535f4c9
Impute additional-dwelling and non-residential purchases (uk-data#573…
juaristi22 Oct 16, 2026
5adb42c
Bind households' SDLT: the OBR line times individuals' share of HMRC …
juaristi22 Oct 16, 2026
5315fb4
Buy at the stock where it cannot carry HMRC's purchase value (#1095)
juaristi22 Oct 16, 2026
772a57c
Give the national line the regions' Land Registry home values (#1112,…
juaristi22 Oct 16, 2026
40bc97b
Draw the Move to UC claim flag at DWP's claim rates (uk-data#534, #1095)
juaristi22 Oct 16, 2026
b23f341
Band the purchases receipt on source households; pin the packaged tar…
juaristi22 Oct 17, 2026
e29d445
Band the home-value receipt on source households (#1112, #1095)
juaristi22 Oct 17, 2026
2ae4e4e
Measure the Move to UC claimants' share over Great Britain; band its …
juaristi22 Oct 17, 2026
d893032
Require each window-ratio operand member to match exactly once (#1095)
juaristi22 Oct 17, 2026
f9d775f
Declare the purchases' HRAD assumption and obr.sdlt's gross-net gaps …
juaristi22 Oct 17, 2026
cd1342e
Refuse a UK build on a policyengine-uk other than the pinned one (#1095)
juaristi22 Oct 17, 2026
fc88454
Declare the source households the home-value and Move to UC receipts …
juaristi22 Oct 18, 2026
08878cf
Withhold the stock-cap share on a small fit or side; read empty cells…
juaristi22 Oct 18, 2026
a892888
Refuse a frame outside the purchases and Move to UC stages' build per…
juaristi22 Oct 18, 2026
88f7306
Run the H2 fixture's non-residential purchases at the stock cap (#1095)
juaristi22 Oct 18, 2026
752aa56
Restate why the high-value homes region rows stay local; declare non-…
juaristi22 Oct 18, 2026
884983f
Withhold receipt pairs that give back a small side; flag p on both si…
juaristi22 Oct 19, 2026
6d5507a
Count receipt support on a required, non-null source lineage (#1095)
juaristi22 Oct 19, 2026
b1968c9
Refuse any other build period by its label, earlier or later (#1095)
juaristi22 Oct 19, 2026
b76c9d0
Check that the imported policyengine-uk is the pinned distribution's …
juaristi22 Oct 19, 2026
d430e3d
Run both purchase fits in the H2 fixture; add a --check to its tool (…
juaristi22 Oct 19, 2026
8e92411
Mirror the receipt's withholding in its fragment; date obr.sdlt's spl…
juaristi22 Oct 19, 2026
311bc39
Stand in the engine's freeze check where a preparation test stands in…
juaristi22 Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions changelog.d/1095-additional-property-purchases.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
A new spine stage, `property_purchases`, imputes each household's annual purchases of additional dwellings and of non-residential property (`additional_residential_property_purchased`, `non_residential_property_purchased`), porting uk-data#573 (a draft, at `07f6b460f`; uk-data#556; microcosm#1095). From policyengine-uk 2.134.1 (pe-uk#2241) both are inputs that default to nil, so without them a purchasing household pays SDLT on its main home only. The stage runs at the spine's design weights after the regional uprating and the high-value support copies:
- a household whose stock of a kind is at least £40,000, the chargeable consideration HMRC's Stamp Tax tables cover, can buy once a year, at a hazard proportional to its stock;
- the threshold on each household's exponential event score is set so that the weighted count of purchasers in England and Northern Ireland, where SDLT applies, comes closest to HMRC's transactions, and the same threshold applies in Scotland and Wales;
- each price is a band mean drawn at HMRC's band shares, times one scale fitted so the weighted England-and-Northern-Ireland value equals HMRC's, never below £40,000 and never above the household's stock.
- where the purchasers' stock cannot carry HMRC's value, as for non-residential property on the national spine, every purchaser buys at its stock and the receipt records the shortfall; the stage refuses below 80% of the value, while uk-data#573 refuses any shortfall (María's ruling of 2026-10-16).

The targets come from HMRC's Annual Stamp Tax Statistics 2024 to 2025 (corrected), vendored from the pinned Chronicle feed as `hmrc_stamp_tax_facts.json`: Table 6b's 2024-25 higher-rates transactions and value, which cover every buyer, allocated to households by individuals' shares of Table 8a's residential transactions and value, with Table 6b's bands and the five above £2m combined; and Table 8b's 2024-25 individuals for non-residential purchases. The stage fits transactions and value only; households' SDLT is fitted at build level through `obr.sdlt`. Households' HRAD is not published, so the allocation by individuals' shares of Table 8a is an assumption, as uk-data#573 says: its household lower bounds are 87,200 transactions and £33.28bn, and the allocation probably overstates households' purchases, since nearly all receipts at or below the £250,000 nil-rate band are surcharge and other buyers' receipts there imply more higher-rates transactions than their share of all transactions. The draws read identity-keyed uniforms, so they differ from uk-data's positional streams while following the same method.

The stage's receipt gives a weighted figure, the purchases outside the fit regions included, only where ten or more source households carry it, and "<10" otherwise. The share of purchasers at the stock cap appears only where the fit and both its sides rest on ten or more, and the eligible owner weight and the event rate only where both the buyers and the eligible owners who do not buy do; an empty cell reads 0. Support is counted on each row's source household, and the stage refuses a frame without one, as it refuses a frame at any period other than 2024.
3 changes: 3 additions & 0 deletions changelog.d/1095-households-sdlt.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
`obr.sdlt` now binds households' SDLT, not the whole OBR line (uk-data#564, microcosm#1095). The OBR's Stamp Duty Land Tax line covers every buyer, and HMRC's other buyers (companies, partnerships and collective investment schemes) pay about a third of the receipts; policyengine-uk charges households' `stamp_duty_land_tax` and adds `corporate_sdlt` beside it, so binding the whole line pushed households' SDLT up by the companies' share. The target is the OBR line's calendar-2025 window (three twelfths of 2024-25, nine of 2025-26) times individuals' share of HMRC's 2024-25 SDLT receipts, residential (Table 8a) and non-residential (Table 8b) together, both from the pinned Chronicle feed. uk-data#569 (a draft) subtracts policyengine-uk's corporate SDLT statistic instead, which needs the unreleased pe-uk#2322.

A new target value operation, `calendar_year_window_scaled_by_ratio`, carries the rule: the `calendar_year_window` of the reference's own series, translated by the quotient of two operands that each pin their own period, may come from another publisher, and may each sum a declared number of cells (`expected_member_count`). The quotient must be a share in (0, 1], as for `scaled_by_ratio`.
5 changes: 5 additions & 0 deletions changelog.d/1095-move-to-uc-claims.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The UK spine now draws `would_claim_uc_at_legacy_closure` at DWP's Move to Universal Credit claim rates (uk-data#492, ported from uk-data#534; microcosm#1095). policyengine-uk 2.128.0 (pe-uk#2119) moves a family off a legacy benefit DWP has closed and takes its other legacy awards away; the family then claims Universal Credit if `would_claim_uc` or this flag is true, and the engine's default for the flag, true, put every such family on Universal Credit.

A new stage, `uc_legacy_closure_take_up`, runs after `uc_capital_coherence` and before `pension_credit_take_up`. A benefit unit with a member reporting Universal Credit, a unit whose `would_claim_uc` is true, and a unit reporting none of the six legacy means-tested benefits keep the engine's default. Every other unit is drawn at (r - p) / (1 - p), clipped to [0, 1]: r is DWP's claimed / (claimed + did not claim) for the unit's combination of legacy benefits (the all-households rate where DWP reports none), and p is the combination's share of Great Britain's such units whose `would_claim_uc` is true, at the spine's design weights (uk-data#534's share is unweighted; María's rulings of 2026-10-16 and 2026-10-17); the probability applies in Northern Ireland too. So, in expectation, the weighted share of Great Britain's drawn units claiming at the closure in each combination is DWP's rate wherever p is at most r; where p exceeds it the receipt flags the combination (`rate_unreachable`), never p itself. Two limits carry over from uk-data#534: the drawn cohort includes units on the Pension Credit route, whose legacy benefits policyengine-uk does not close, and DWP's rates count every household sent a notice, entitled to Universal Credit or not. The rates are DWP's Stat-Xplore households sent a migration notice in Great Britain, notices July 2022 to June 2026, vendored from the pinned Chronicle feed (`uk/dwp_move_to_uc_facts.json`); households still in progress are left out. Each unit's uniform reads an identity-keyed stream.

The flag joins the export surface's reviewed extra columns, and the policyengine-uk concept mapping binds it as a take-up input, so no take-up input is left at the engine's default.
6 changes: 6 additions & 0 deletions changelog.d/1095-policyengine-uk-2-134.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The lock's UK side moves from policyengine-uk 2.132.6 to 2.134.4, and the UK extras of microcosm-build, microcosm-data and microcosm-frame require >=2.134.4 (microcosm#1095). policyengine-core stays at 3.33.3 on the UK side and 3.32.5 on the US side; 2.134.4 still asks for core >=3.32.27. Nothing the UK build writes is renamed, removed or re-typed. Two inputs join the engine:
- 2.134.1 turns `additional_residential_property_purchased` and `non_residential_property_purchased` from formulas into inputs that default to nil (pe-uk#2241), so a purchasing household pays SDLT on its main home only unless the data supplies them. The sixth #1095 ports PR imputes both in the same PR.

What the other releases change: 2.134.0 makes a retention-rate elasticity of 1 the default realisation response to a CGT reform (pe-uk#2419), which moves no baseline; 2.134.3 starts Scotland's top rate at the statutory £125,140 of taxable income for 2024-25 to 2026-27 (pe-uk#2437), not £112,570; and 2.134.4 draws the new-claimant UC health element for 2026 to 2032 and keeps the protected LCWRA amount from 2030-31. The CGT taxable-income lockstep test's measurement reform now switches the realisation response off, since it would move the gains the test inverts. Re-derived with no change to data: the uprating pins (the version stamp only), the concept coverage (300 inputs to 302, the two above, uncovered), the texts that cite the locked engine, the rate-class docstring and the salary-sacrifice fragment's Scottish top-rate sentence, the H2 fixture's dependency, the coverage manifest's source digests and `APPROVED_UV_LOCK_SHA256`.

The lock stops at 2.134.4 (María's ruling of 2026-10-16). 2.134.5 (pe-uk#2240) limits pension relief to relevant earnings and charges the annual allowance on the excess pension input, with the new `unused_pension_annual_allowance` at its default of nil. On the national spine that moves Universal Credit awards and income tax for households with pension contributions, and the solve fails the calibrated-seam weight-ratio gate. It waits for a follow-up that supplies the unused allowance and checks the relief inputs.
2 changes: 1 addition & 1 deletion changelog.d/1095-salary-sacrifice-rate-bands.added.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ The measure resolver gains a declared rate-class allocation. One counterfactual

A contribution that straddles a boundary is relieved at each rate, and the personal allowance taper lands in the brackets the extra pay reaches. The three bands sum to the change in the engine's `earned_income_tax` for every person, and the measure refuses if they stop doing so. The tolerance is £1 plus four float32 steps at the person's own amounts, since the engine computes in float32. The resolver's receipt records the gap to the change in `income_tax` (for example, dividends pushed into the higher dividend band). A binding that declares anything other than the exact allocation is refused. uk-data's worked examples at 2025 reproduce exactly: £454 basic and £692 higher, Scotland's £349.02 and £981.96, and £6,000 all higher where the taper applies.

policyengine-uk puts the Scottish top-rate threshold at £112,570 rather than the statutory £125,140 (pe-uk#2130), so it files some advanced-rate relief as additional. The Table 6.2 all-rates total (£8.8bn) becomes a diagnostic on the higher-rate band, since the bands carry the same relief. The three measure exclusions that held the bands out, due to expire on 25 November, are retired.
Up to policyengine-uk 2.134.2 the Scottish top-rate threshold was £112,570 rather than the statutory £125,140 (pe-uk#2130), so some advanced-rate relief was filed as additional; 2.134.3 (pe-uk#2437) corrects it, and microcosm locks 2.134.4 since the sixth #1095 ports PR. The Table 6.2 all-rates total (£8.8bn) becomes a diagnostic on the higher-rate band, since the bands carry the same relief. The three measure exclusions that held the bands out, due to expire on 25 November, are retired.
5 changes: 5 additions & 0 deletions changelog.d/1112-national-home-values.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The national release now carries Land Registry home values (microcosm#1112). A new spine stage, `regional_home_values`, runs after the high-value home support copies and gives every England-and-Wales owner household with a value the one its region's uprated Land Registry distribution holds at the household's weighted mid-rank among the owner households of its FRS region, at the spine's weights. It ranks as the dense line's value node does (ties broken by a keyed draw; the support copies spread over the top stratum by their own draws), reads the region level of the same knots resource (`uk/high_value_home_value_knots.json`; Wales is `W92000004`), and moves `property_wealth` by the value's change. Scotland, Northern Ireland, renters and owners without a value keep theirs, and the council-tax band is untouched.

Before it, the national line solved the bound spine with the WAS-imputed values after the regional uprating, not the regions' Land Registry values. The dense line is unchanged: the stage keeps the value it replaced in `main_residence_value_rank_basis`, the dense value node receives that column through its slice and ranks on it (refusing if it is missing), and the release boundary drops it on both lines.

The value reaches three national rows: `obr.sdlt`, through the main-home purchase value, and `ons.land.land_value` and `ons.land.household_land_value`, through `property_wealth` and policyengine-uk's land intensity; corporate land value does not move. The region knots run up to each region's largest sale and down to its smallest, as the dense line's constituency knots do, so the national line places more homes in the top surcharge bands than the derived stock facts; the tails are to be fixed on both lines together (#1112, María's ruling of 2026-10-17).
2 changes: 1 addition & 1 deletion changelog.d/1301-high-value-homes-region-control.added.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The UK local line binds region controls for the high-value homes family (microcosm#1301, the issue's 6a). Three new two-level targets, `microcosm.high_value_homes.over_1m_by_region`, `over_1_5m_by_region` and `over_2m_by_region`, bind the derived Land Registry stock at the nine English regions and Wales, except the North East and Wales rows over £2m, which are signed out below the 400-home floor. They carry the same measurement block and record-set selector as the constituency and local-authority cells, so each row is the cross-grain control for its area cells, and the three `no_higher_control` local routes in `uk/cross_grain_declarations.json` are gone.

**Local line only.** A new contract key, `calibration_lines`, names the lines a target binds on; these three declare `["local"]`. The national spine's `main_residence_value` is the WAS donor's, not a Land Registry placement. The national compiles now merge the derived facts beside the Chronicle feed too, as the local ones already did: both loaders in `full_targets.py`, the release-cut certifier, the compile-parity tool's national receipt, the national reference generator (`--derived-facts` names another resource), the UC matrix diagnosis and the incumbent-surface evaluation. `load_uk_national_target_inputs`, the certifier's calibration reference and the UC matrix diagnosis then drop the local-only rows right after the compile, before reconciliation, the measure exclusions and the frozen-register check. The national registry version is therefore unchanged. `register_completeness.calibration_line` receipts what each line dropped.
**Local line only.** A new contract key, `calibration_lines`, names the lines a target binds on; these three declare `["local"]`. Since microcosm#1095 the national spine reads `main_residence_value` off the regions' Land Registry knots too, but binding these rows there would move the national registry and solve while the knots' tails still place more homes in the top bands than the derived stock, so that is left to microcosm#1112's follow-up. The national compiles now merge the derived facts beside the Chronicle feed too, as the local ones already did: both loaders in `full_targets.py`, the release-cut certifier, the compile-parity tool's national receipt, the national reference generator (`--derived-facts` names another resource), the UC matrix diagnosis and the incumbent-surface evaluation. `load_uk_national_target_inputs`, the certifier's calibration reference and the UC matrix diagnosis then drop the local-only rows right after the compile, before reconciliation, the measure exclusions and the frozen-register check. The national registry version is therefore unchanged. `register_completeness.calibration_line` receipts what each line dropped.

**Fan-out.** `tools/generate_uk_target_references.py` now honours a two-level target's `area_scope` by level. The region rows fan out over the English regions and Wales, which is pinned at country level `W92000004`. Scotland and Northern Ireland are not cells.

Expand Down
Loading
Loading