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
d13778a
Move the UK Chronicle pin to 505e0e7 (chronicle#288, HMRC CGT Table 4)
juaristi22 Sep 26, 2026
1e49ab0
Draw BADR and Investors' Relief claims inside the CGT asset-type stag…
juaristi22 Sep 26, 2026
7da1d01
Bind HMRC CGT Table 4.1 claimants and qualifying gains by band (#1014)
juaristi22 Sep 26, 2026
32e4108
Bind Table 3's all-gains income margins on the engine's CGT taxable i…
juaristi22 Sep 26, 2026
7c1de64
Record the #1014 phase A receipts
juaristi22 Sep 26, 2026
7c8caa0
Close Vahid's second-pass code notes on #1012 (energy_rake window ran…
juaristi22 Sep 28, 2026
a563137
Record the #1014 phase B receipts on the merged #1012
juaristi22 Sep 28, 2026
c012195
Walk the student-loan top-up to the SLC stock instead of drawing it (…
juaristi22 Sep 29, 2026
173a11c
Record the #1049 receipts on the licensed spine
juaristi22 Sep 29, 2026
619f299
Record the rebase onto main 6a70cd4ee and the m901 receipts
juaristi22 Sep 29, 2026
852559c
Rank CGT gainers on a blend of prior gain and household investable we…
juaristi22 Sep 28, 2026
dbb97be
Lean CGT asset flags and types towards gainers who show the stock the…
juaristi22 Sep 28, 2026
7595000
Record María's WP3 pick: c5 and c6 are on the branch
juaristi22 Sep 29, 2026
c9290d9
Replace the CGT band donors with a wealth-tier support split (#1014)
juaristi22 Sep 29, 2026
fc86c18
Report where the CGT redraw places support rows (#1014)
juaristi22 Sep 29, 2026
5f13a34
Record Part G of the CGT note: the support split replaces the band do…
juaristi22 Sep 29, 2026
83cd682
Point the CGT facts register at the support split; pin the feed ident…
juaristi22 Sep 29, 2026
8af33f3
Raise the support split's copy cap to 80 so the certified weight-rati…
juaristi22 Sep 29, 2026
dc016d2
Revert "Raise the support split's copy cap to 80 so the certified wei…
juaristi22 Sep 29, 2026
a319f1d
Lower the support split's headroom to 1.25 so the certified weight-ra…
juaristi22 Sep 29, 2026
1bcb424
Record Part G: the support split's licensed arms (ch1, ch2, h15, h125…
juaristi22 Sep 29, 2026
0f3b11b
Address Vahid's first review of #1045: explicit support copy index, f…
juaristi22 Sep 30, 2026
35a1d32
Carry the support copy index through the test fixtures and check it b…
juaristi22 Sep 30, 2026
9acc1e5
Key the support-family fold on the full lineage so geographic clones …
juaristi22 Sep 30, 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
1 change: 1 addition & 0 deletions changelog.d/1012-energy-rake-window-range.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK `energy_rake` stage-health gate now holds each fuel's NEED rake residual to its range (maximum minus minimum) over the convergence window rather than to the change between the window's endpoints, so a rake oscillating inside the window fails as a truncated one does; the LCFS stage refuses a recipient energy rake without a declared sweep count instead of falling back to 50 sweeps (Vahid's review of microcosm#1012).
1 change: 1 addition & 0 deletions changelog.d/1014-cgt-badr-asset-type-stage.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Business Asset Disposal Relief and Investors' Relief claims to the `hmrc_cgt_asset_type_spine` stage (microcosm#1014). Between the residential flag and the main asset type, the stage draws claimants among liable gainers not flagged residential, band by band on HMRC Table 4.1 2024-25: below GBP 1m, a logistic in log gains solved so the household-weighted claimants and qualifying gains equal the published band, with the claim taken as the whole net gain; in the open top band, a flat draw of the band's gains over the lifetime limit, each claim at the limit. The qualifying gain lands in the new person column `capital_gains_badr`, which policyengine-uk 2.100.0 taxes at the relief rate. A claimant's main asset type is drawn only from the types the reliefs apply to (unlisted shares, business land and buildings, other non-financial assets); the type weights refit to the fenced Table 7 gains shares and now refuse on non-convergence. Table 4.1 is vendored into `hmrc_cgt_asset_type_facts.json` (32 facts, fenced from calibration until bound). The stage-health gate holds every band to its deterministic sampling bound and the stage's invariants, and the export allow-list, graph cells, H2 fixture, coverage manifest and gate digests move with it.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK CGT asset-type stage now leans each flag and type towards gainers who show the stock it implies (microcosm#1014). The residential flag and each BADR band add a log-odds shift of 1.6 for a gainer with another residential property or property income (residential), or with corporate wealth or self-employment income (BADR). The main-type kernel is multiplied by 0.2 for listed shares without a stocks-and-shares ISA or dividends, unlisted shares without corporate wealth or self-employment income, and other financial assets without financial wealth. Every solve still meets its published totals, so only who is drawn moves. The operations declare the shift, the floor and the signals; the stage refuses a frame without the signal columns or with non-finite values in them, and its receipts report how many flagged, claiming and typed gainers show their stock against their populations.
1 change: 1 addition & 0 deletions changelog.d/1014-cgt-table3-income-margins.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bind HMRC Table 3 2024-25's all-gains margin, individuals with a CGT liability and their gains in each of the six taxable-income bands, as UK calibration targets in `hmrc_cgt` (12 rows: `hmrc.cgt.taxpayers_by_taxable_income_band`, `hmrc.cgt.gains_by_taxable_income_band`; microcosm#1014). Rows are banded on the new derived measure `cgt_<year>_taxable_income`, the taxable income policyengine-uk's `capital_gains_tax` stacks gains on (adjusted net income less the allowances that formula nets off), not the amounts redraw's arithmetic proxy; a lockstep test inverts the engine's CGT to hold the derivation to the engine's own rate band. The rows take their names from their band through the new `fanout_row_naming: dimension_value` rule. The reviewed CGT band-fact fence drops from 76 to 70 facts: the six income-column totals are promoted, while the 60 joint cells and 10 gain-band row totals stay fenced.
1 change: 1 addition & 0 deletions changelog.d/1014-cgt-table4-badr-targets.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bind HMRC Table 4.1 2024-25 individuals claiming Business Asset Disposal Relief or Investors' Relief and their qualifying gains in each of the eight bands of qualifying gain as UK calibration targets in `hmrc_cgt` (16 rows: `hmrc.cgt.badr_ir_taxpayers_by_band`, `hmrc.cgt.badr_ir_qualifying_gains_by_band`), measured on the engine-year `capital_gains_badr` of liable claimants through the new dated measure `cgt_<year>_badr_gains` (microcosm#1014). The individuals total row restates the bands and is signed out; the tax column has no engine variable and stays a stage diagnostic; the open top band's count row carries a structural 3 percent residual inside its rounding. The CGT measurement contract (v3) now checks the measurement period of dated CGT measures used in bands and filters as well as in gates and values. Sixteen of Table 4.1's 32 vendored facts leave the asset-type fence.
1 change: 1 addition & 0 deletions changelog.d/1014-cgt-wealth-ranked-redraw.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK CGT amounts redraw now ranks gainers within each income, age and region cell by a blend of their prior-gain rank and their household's investable-wealth rank (gross financial, corporate, other residential and non-residential property wealth), the wealth rank weighted 0.75, instead of the prior gain alone (microcosm#1014). The cells, walks and plan amounts are unchanged; only which gainer takes which amount moves, so gains now follow the stocks they are realised on. The operation declares the weight and the wealth columns, the redraw refuses a household table without them, and its receipt reports the within-income-band Spearman of drawn gains against investable wealth.
1 change: 1 addition & 0 deletions changelog.d/1045-cgt-redraw-placement-receipts.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK Table 3 capital-gains redraw (`hmrc_cgt_gains_spine`) records where its wealth-ranked walk placed each row, so the next licensed build measures the support split's placement instead of inferring it: the allocation receipt gains `placement_by_row_type` (placed and demoted rows and mass per initial Table 2.1a gain band of the prior, for plain rows and for the support families `cgt_support_split` created, with the sub-exempt remainder mass split by row type), `heaviest_placed_weight` (the heaviest person weight seated in each gain band of the redrawn amounts and in each gain-by-income plan), `income_band_rows` (each Table 3 income column's target, pass-1 and pooled-walk achievement and its overshoot), `open_band` (the £5m+ band's achieved people and gains against the published people and gains the stage summary reports, its heaviest placed weight and each income cell's achievement against its target) and `placed_share_by_wealth_decile` (the share of gainer mass placed in each decile of the rank key's investable-wealth component, overall and by income column). The walk, the plan draws and the remainder mapping are unchanged, a frame without the split's columns reports every row as plain, and the `cgt_imputation_summary` stage-health gate reads the receipt as before (microcosm#1045).
1 change: 1 addition & 0 deletions changelog.d/1045-cgt-support-split.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK spine's HMRC Table 2.1a band-donor stack (`cgt_band_donors`) is retired and replaced by `cgt_support_split`, a deterministic, mass-conserving stage before the incidence clone that splits the wealthiest households of each HMRC Table 3 income column into light copies at equal weight, sized by the published count of gainers at or above £250,000 in that column with a declared headroom of 1.25 and capped at 60 before the clone (30 after it); the headroom is the value at which the certified weight-ratio fence keeps its margin once the light copies join the median, and the cap the granularity at which the asset-type stage's residential draw keeps its own. The Table 3 redraw owns every gain amount and places rows by wealth rank, so the donors' band-mean values were notional and three quarters of the 270 heavy donor rows were demoted below the exempt amount, where they carried 93 percent of the projection-entrants fence's crossing mass and 392,000 households of created mass; the split supplies the same row support at the top of the distribution from the households the redraw already places, conserves mass exactly, needs no draw or seed, and lets the anchor-trimmed Advani–Summers clone composition define the sub-exempt population. The graph kernel's lineage rule now recovers copy `k` of a structural stage from `id + k × offset`, the anchor no longer declares donors, `mass_increasing_support` loses its only user, and the export surface carries `household_is_cgt_support_copy`, `cgt_support_copies` and `cgt_support_copy_index` (copy `k` on copy `k`, 0 on roots) in place of the donor flag; the geography identity kernel keys a support copy on that explicit index as the `cgt_support_split` branch, before the incidence clone, instead of the retired donor flag. The terminal `uk_weight_ratio` and `uk_weight_ess` gates evaluate on family-folded weights (each root with its copies summed, keyed on the explicit lineage the geography identity reads, so on the dense line each geographic clone folds only its own copies; the quantity the certified June bound was measured on) and report the row-level summary beside them, and the student-loans top-up receipt records the taken rows by support channel, copy and clone flag (microcosm#1045; the SPI income-band donors follow in microcosm#1063).
1 change: 1 addition & 0 deletions changelog.d/1049-student-loan-top-up-walk.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK student-loans stage realises each plan's shortfall against the SLC liable stock by an identity-keyed greedy walk (eligible persons in ascending stable-uniform order, taken when their weight fits the remaining shortfall, skipped when it would overshoot, the nearest skipped person taken afterwards if that brings the realised mass nearer) instead of a Bernoulli draw whose outcome for a shortfall of about one person's weight was zero or two rows (microcosm#1049). Its receipt records the walk's gap, the lightest skipped weight, an exhausted pool and the plan's stock attainment. The `student_loan_plans` stage-health gate now holds the gap within the lightest skipped weight and the final England count within a declared relative deviation of the stock, records a pool lighter than its shortfall instead of refusing it, and fails closed on a partial or inconsistent receipt; the relative-deviation rule on the Bernoulli increment, which refused every licensed spine since #1006, is retired.
1 change: 1 addition & 0 deletions changelog.d/uk-chronicle-feed-repin-505e0e7.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Re-pin the UK Chronicle feed to 505e0e7 (PolicyEngine/chronicle#288: HMRC CGT statistics 2026 Table 4, Business Asset Disposal Relief and Investors' Relief by band of qualifying gain; 287,150 rows). The change is purely additive: no compiled target value moved on either surface, and the vendored resources and membership reports restate the feed identity (microcosm#1014).
17 changes: 17 additions & 0 deletions docs/uk-cgt-observation-year-875.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ allowance; it does not identify every administrative taxpayer below that
threshold. The gains input is net of losses before the allowance; the aggregate
binding makes no additional loss or allowance deduction.

A third dated measure, `cgt_<year>_badr_gains`, reads the engine-year
`capital_gains_badr`, the Business Asset Disposal Relief or Investors' Relief
qualifying gain the asset-type stage writes; the Table 4.1 rows band and filter
on it (microcosm#1014). The resolver checks the measurement period of every dated
measure a binding names, in `groupby_variable`, `filters` and
`household_conditions` as well as the gate and value (measurement contract v3).

`cgt_<year>_taxable_income` is derived rather than read: it restates the taxable
income policyengine-uk's `capital_gains_tax` stacks gains on, adjusted net income
less the allowances net of gift aid and of the personal pension contributions
that extend the basic band, from the engine's component arrays at the named year.
Table 3's all-gains margin rows band on it instead of the amounts redraw's
arithmetic proxy. A lockstep test inverts the engine's CGT at raised rate-band
thresholds to hold the derivation to the engine's own band, one persona per
netted relief; a policyengine-uk variable exposing the same income would retire
the derivation.

## Observed-year fit and cash diagnostic

For this accepted FY2024–25 deliverable, the three published individual
Expand Down
6 changes: 6 additions & 0 deletions docs/uk-chronicle-feed-repin.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ The pin then moved to `5324aa2`, Chronicle main after PR #284 (the validator fix
needed: `build-consumer-artifact` at `00b4b14` refused every renamed-geography row). The export
re-run at the fix from the same suite bundle is byte-identical (287,024 rows, the same digests), so
only the commit and the feed label move: no value, row or receipt changes.
The `505e0e7` re-pin (microcosm#1014, PolicyEngine/chronicle#287 via #288, on top of `5324aa2`)
brought HMRC CGT statistics 2026 Table 4 (Business Asset Disposal Relief and Investors' Relief
claimants, qualifying gains and tax by band of qualifying gain, individuals, trusts and all
taxpayers, 2021-22 to 2024-25; 287,150 rows). The addition is purely additive: the national and
local reference files are byte-identical, the vendored resources carry the same rows under the new
feed identity, and the three compile-parity receipts are unchanged.
8 changes: 8 additions & 0 deletions docs/uk-income-anchors-280.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ microcosm#1006, comments 5812328880 and 5814299594):
a certified cut until the fence is settled on the #970/#979 side (bind the
count, spread the band-donor mass over lighter rows, or cap their weight
ratio).
**2026-09-29 (microcosm#1045):** settled by retiring the band-donor stage.
The Table 3 redraw owns every gain amount and places rows by wealth rank,
so the demoted donors were an artefact of drawing support by income and
placing it by wealth; #1045 replaces the stack with `cgt_support_split`, a
deterministic mass-conserving split of the wealthiest households of each
Table 3 income column into light copies before the incidence clone, and
the sub-exempt population becomes the anchor-trimmed Advani–Summers clone
composition (its 2030 crossing is 6,000 to 7,500 on the existing arms).

## SPI rows before the donor imputations

Expand Down
Loading
Loading