From 8674483a961ceb5c1569cfc9593ddd193696b7dc Mon Sep 17 00:00:00 2001 From: Vahid Ahmadi Date: Wed, 27 May 2026 12:17:49 +0200 Subject: [PATCH 1/3] Add capital gains distribution plan (#818 #817) #818 asks for a multivariate capital gains imputation instead of the current per-income-decile-independent fits. #817 reports the related failure mode of imputing gains to zero-wealth households. The imputation lives in policyengine-uk-data, not in this repo, but persist the model-facing plan here so the cross-repo agreement is discoverable. The page covers: - the current state (per-decile marginal distributions fit to HMRC CGT statistics binned by income), - three concrete limitations (overfitting boundaries, no wealth conditioning per #817, no within-decile correlation), - two candidate approaches: A. multivariate Gaussian KDE following OG-USA's bequest-transmission model; B. two-stage QRF reusing the existing imputation infrastructure already proposed in the #1621 pipeline-alignment plan, - recommendation: B (QRF) because the infrastructure exists, it handles correlated predictors naturally, and it solves both #818 and #817 in one move by adding total_wealth as a predictor, - the model-side surface (negligible, since the input variable stays the same; one new regression test for "no gains on zero-wealth households"), - open questions on the wealth donor source (FRS vs WAS) and on elasticity-by-band as a follow-up. Closes both #818 and #817 in the planning sense. --- changelog.d/818.md | 1 + .../capital-gains-distribution-plan.md | 139 ++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 changelog.d/818.md create mode 100644 docs/book/assumptions/capital-gains-distribution-plan.md diff --git a/changelog.d/818.md b/changelog.d/818.md new file mode 100644 index 0000000000..1e645121fe --- /dev/null +++ b/changelog.d/818.md @@ -0,0 +1 @@ +- Add a capital gains distribution planning docs page at `docs/book/assumptions/capital-gains-distribution-plan.md` documenting the current per-decile-independent imputation (in `policyengine-uk-data`) and proposing a two-stage QRF replacement that jointly conditions on income, wealth, age and region — closing both the #818 overfitting concern and the #817 zero-wealth-gains failure mode in one move. diff --git a/docs/book/assumptions/capital-gains-distribution-plan.md b/docs/book/assumptions/capital-gains-distribution-plan.md new file mode 100644 index 0000000000..0d00ba6d44 --- /dev/null +++ b/docs/book/assumptions/capital-gains-distribution-plan.md @@ -0,0 +1,139 @@ +# Capital gains distribution plan + +```{note} +**Planning page.** Tracks [#818](https://github.com/PolicyEngine/policyengine-uk/issues/818) +and the related zero-wealth imputation question raised in +[#817](https://github.com/PolicyEngine/policyengine-uk/issues/817). +PolicyEngine UK's capital gains imputation lives in +`policyengine-uk-data`, not in this repo — but the modelling +assumptions and the calibration constraints are documented here so the +cross-repo plan is discoverable from a single page. +``` + +## Current state + +PolicyEngine UK reads `capital_gains_before_response` as a person-level +input variable; the runtime variables under +[`variables/gov/hmrc/capital_gains_tax/`](../../../policyengine_uk/variables/gov/hmrc/capital_gains_tax) +then compute the elasticity-based behavioural response and the tax +liability against the published CGT bracket structure. + +The input itself is produced in `policyengine-uk-data` by: + +1. Splitting the population into income deciles. +2. Fitting a separate marginal distribution of capital gains within + each decile (against HMRC's *Capital Gains Statistics*). +3. Drawing values for each FRS row from the decile-conditional + distribution. + +This is the **independent per-decile model** that #818 flagged. + +## Limitations of the current approach + +### 1. Overfitting at the boundaries + +Per-decile fitting means each decile's tail is fit independently from +its neighbours. With HMRC's published CGT statistics binning gains by +income, the per-decile tails contain few observations — the fitted +upper tails are noisy, and the joint distribution of "income + capital +gains" can have spurious features at decile boundaries. + +### 2. No conditioning on wealth + +#817 reported a related failure mode: capital gains are imputed to +households with zero recorded wealth. That's structurally implausible +(you can't realise gains on assets you don't own) and arises because +the per-decile model conditions only on income, not on wealth holdings. +Many low-income retirees with substantial wealth would receive gains +the current model misses; many low-income tenants with zero wealth +incorrectly receive them. + +### 3. No covariance between income and gains beyond decile membership + +A higher-rate-band earner with £200k income and a lower-rate earner +with £40k income within the same decile (after weighting / SPI) +receive draws from the same marginal distribution. In reality the +correlation between income and gains is much stronger than that. + +## Proposed approach (#818) + +Switch to a **multivariate model over (income, wealth, age, gender)** +that produces capital gains as a derived dimension. Concrete options: + +### A. Multivariate KDE + +The [OG-USA bequest model](https://pslmodels.github.io/OG-USA/content/api/bequest_transmission.html) +referenced in #818 uses a multivariate Gaussian KDE over the relevant +conditioning variables. For UK gains the bandwidth + kernel choice +would need calibrating against HMRC's gains-by-income-by-age cross-tabs; +the SAS *Survey of Personal Incomes* extracts (where available via +Datalab) give a richer conditioning set. + +Tradeoffs: + +- **Pro**: no per-decile boundary artefacts; the joint distribution + comes out smooth in all dimensions. +- **Con**: KDE bandwidth choice is tricky in the tail; large gains + remain noisy unless we supplement with a tail model. + +### B. Two-stage QRF + +Train a quantile-regression-forest (QRF) on the SPI donor set with +predictors = `(age, gender, region, employment_income, +self_employment_income, savings_interest_income, dividend_income, +total_wealth, gross_financial_wealth)` and output = annual capital +gains. This is the same machinery already used in +`policyengine-uk-data/datasets/imputations/income.py` and the +proposed second-stage QRF in [#1621](https://github.com/PolicyEngine/policyengine-uk/issues/1621) +/ [pipeline alignment plan](./uk-pipeline-alignment-plan.md). + +Tradeoffs: + +- **Pro**: the QRF naturally handles correlated predictors and + produces well-calibrated quantiles in the tail. Reuses existing + imputation infrastructure. +- **Con**: requires a clean SPI-linked donor set with all the + conditioning variables (currently the QRF in `income.py` doesn't + output capital gains). + +**Recommendation**: option B. The infrastructure is in place, the +calibration is testable against HMRC published gains-by-income-band +tables, and it consistently solves both #818 (overfitting) and #817 +(implausible zero-wealth gains) by making `total_wealth` a predictor. + +## What changes in this repo + +The model-side surface is small: + +- The `capital_gains_before_response` input variable stays the same. + All the changes are upstream in `policyengine-uk-data`. +- A regression test in the model that asserts **no positive capital + gains for households with zero total wealth** would catch + reintroductions of the #817 failure mode and live well in + `policyengine_uk/tests/`. + +## Open questions + +- Wealth in the FRS is incomplete and noisy; the WAS (Wealth and + Assets Survey) is the better wealth conditioning source but is on a + different sampling frame. Should the QRF be trained on a WAS-linked + donor, or do we condition on the FRS-imputed wealth and accept the + noise? +- HMRC's published CGT statistics break gains down by income, age, and + asset type but not by household wealth. Calibration targets will + need to be assembled across multiple HMRC and ONS sources. +- Behavioural response (`capital_gains_behavioural_response` in this + repo) currently uses a single elasticity. A multivariate model that + gets the distribution right opens the door to **elasticity by + income / wealth band** — useful for reform analysis but adds a + parameter surface. + +## References + +- Issue: [#818](https://github.com/PolicyEngine/policyengine-uk/issues/818) — original "model gains jointly across income groups". +- Related: [#817](https://github.com/PolicyEngine/policyengine-uk/issues/817) — avoid imputing CG to zero-wealth households. +- Reference implementation: [OG-USA bequest-transmission multivariate KDE](https://pslmodels.github.io/OG-USA/content/api/bequest_transmission.html). +- Reusable infrastructure: the QRF in [`policyengine_uk_data/datasets/imputations/income.py`](https://github.com/PolicyEngine/policyengine-uk-data) and the second-stage QRF plan in [pipeline alignment](./uk-pipeline-alignment-plan.md). +- HMRC, [Capital Gains Tax statistics](https://www.gov.uk/government/collections/capital-gains-tax-statistics) — calibration source. +- ONS, [Wealth and Assets Survey](https://www.ons.gov.uk/peoplepopulationandcommunity/personalandhouseholdfinances/incomeandwealth/bulletins/totalwealthingreatbritain/latest) — alternative conditioning source for wealth. +- Existing variables: [`capital_gains_before_response`](../../../policyengine_uk/variables/gov/hmrc/capital_gains_tax/capital_gains_before_response.py), [`capital_gains`](../../../policyengine_uk/variables/household/income/capital_gains.py), [`capital_gains_behavioural_response`](../../../policyengine_uk/variables/gov/hmrc/capital_gains_tax/capital_gains_behavioural_response.py). From 7ff30f4cfad898c3ac25381e6761ca7f84801e69 Mon Sep 17 00:00:00 2001 From: vahid-ahmadi Date: Thu, 8 Oct 2026 15:52:22 +0100 Subject: [PATCH 2/3] Update the capital gains page for Microcosm UK and the CGT components Describe the BADR, residential property and carried interest components (#1861) and the retention-rate elasticity, replace the per-decile description with the Microcosm stages that fit gains to HMRC Table 3 by size of gain and taxable income, and list what is left for #817 and #818. Type the changelog fragment. Co-Authored-By: Claude Opus 5.5 --- changelog.d/818.added.md | 1 + changelog.d/818.md | 1 - .../capital-gains-distribution-plan.md | 239 ++++++++---------- 3 files changed, 108 insertions(+), 133 deletions(-) create mode 100644 changelog.d/818.added.md delete mode 100644 changelog.d/818.md diff --git a/changelog.d/818.added.md b/changelog.d/818.added.md new file mode 100644 index 0000000000..ee8c0776c2 --- /dev/null +++ b/changelog.d/818.added.md @@ -0,0 +1 @@ +Documented how capital gains are modelled and imputed (#818, #817) at `docs/book/assumptions/capital-gains-distribution-plan.md`, including the Microcosm UK stages that now fit gains jointly to HMRC Table 3 and what is left to do. diff --git a/changelog.d/818.md b/changelog.d/818.md deleted file mode 100644 index 1e645121fe..0000000000 --- a/changelog.d/818.md +++ /dev/null @@ -1 +0,0 @@ -- Add a capital gains distribution planning docs page at `docs/book/assumptions/capital-gains-distribution-plan.md` documenting the current per-decile-independent imputation (in `policyengine-uk-data`) and proposing a two-stage QRF replacement that jointly conditions on income, wealth, age and region — closing both the #818 overfitting concern and the #817 zero-wealth-gains failure mode in one move. diff --git a/docs/book/assumptions/capital-gains-distribution-plan.md b/docs/book/assumptions/capital-gains-distribution-plan.md index 0d00ba6d44..792fc36290 100644 --- a/docs/book/assumptions/capital-gains-distribution-plan.md +++ b/docs/book/assumptions/capital-gains-distribution-plan.md @@ -1,139 +1,114 @@ -# Capital gains distribution plan +# Capital gains distribution ```{note} -**Planning page.** Tracks [#818](https://github.com/PolicyEngine/policyengine-uk/issues/818) -and the related zero-wealth imputation question raised in -[#817](https://github.com/PolicyEngine/policyengine-uk/issues/817). -PolicyEngine UK's capital gains imputation lives in -`policyengine-uk-data`, not in this repo — but the modelling -assumptions and the calibration constraints are documented here so the -cross-repo plan is discoverable from a single page. +**Planning page, updated October 2026.** Tracks +[#818](https://github.com/PolicyEngine/policyengine-uk/issues/818) +(model gains jointly across income groups) and +[#817](https://github.com/PolicyEngine/policyengine-uk/issues/817) +(don't impute gains to households with no wealth). The imputation lives +in the data pipeline, not in this repo. Most of what this page proposed +in May 2026 has since been built in +[Microcosm UK](https://github.com/PolicyEngine/microcosm), which is now +the UK data pipeline. What remains is listed at the +end of this page. ``` -## Current state - -PolicyEngine UK reads `capital_gains_before_response` as a person-level -input variable; the runtime variables under -[`variables/gov/hmrc/capital_gains_tax/`](../../../policyengine_uk/variables/gov/hmrc/capital_gains_tax) -then compute the elasticity-based behavioural response and the tax -liability against the published CGT bracket structure. - -The input itself is produced in `policyengine-uk-data` by: - -1. Splitting the population into income deciles. -2. Fitting a separate marginal distribution of capital gains within - each decile (against HMRC's *Capital Gains Statistics*). -3. Drawing values for each FRS row from the decile-conditional - distribution. - -This is the **independent per-decile model** that #818 flagged. - -## Limitations of the current approach - -### 1. Overfitting at the boundaries - -Per-decile fitting means each decile's tail is fit independently from -its neighbours. With HMRC's published CGT statistics binning gains by -income, the per-decile tails contain few observations — the fitted -upper tails are noisy, and the joint distribution of "income + capital -gains" can have spurious features at decile boundaries. - -### 2. No conditioning on wealth - -#817 reported a related failure mode: capital gains are imputed to -households with zero recorded wealth. That's structurally implausible -(you can't realise gains on assets you don't own) and arises because -the per-decile model conditions only on income, not on wealth holdings. -Many low-income retirees with substantial wealth would receive gains -the current model misses; many low-income tenants with zero wealth -incorrectly receive them. - -### 3. No covariance between income and gains beyond decile membership - -A higher-rate-band earner with £200k income and a lower-rate earner -with £40k income within the same decile (after weighting / SPI) -receive draws from the same marginal distribution. In reality the -correlation between income and gains is much stronger than that. - -## Proposed approach (#818) - -Switch to a **multivariate model over (income, wealth, age, gender)** -that produces capital gains as a derived dimension. Concrete options: - -### A. Multivariate KDE - -The [OG-USA bequest model](https://pslmodels.github.io/OG-USA/content/api/bequest_transmission.html) -referenced in #818 uses a multivariate Gaussian KDE over the relevant -conditioning variables. For UK gains the bandwidth + kernel choice -would need calibrating against HMRC's gains-by-income-by-age cross-tabs; -the SAS *Survey of Personal Incomes* extracts (where available via -Datalab) give a richer conditioning set. - -Tradeoffs: - -- **Pro**: no per-decile boundary artefacts; the joint distribution - comes out smooth in all dimensions. -- **Con**: KDE bandwidth choice is tricky in the tail; large gains - remain noisy unless we supplement with a tail model. - -### B. Two-stage QRF - -Train a quantile-regression-forest (QRF) on the SPI donor set with -predictors = `(age, gender, region, employment_income, -self_employment_income, savings_interest_income, dividend_income, -total_wealth, gross_financial_wealth)` and output = annual capital -gains. This is the same machinery already used in -`policyengine-uk-data/datasets/imputations/income.py` and the -proposed second-stage QRF in [#1621](https://github.com/PolicyEngine/policyengine-uk/issues/1621) -/ [pipeline alignment plan](./uk-pipeline-alignment-plan.md). - -Tradeoffs: - -- **Pro**: the QRF naturally handles correlated predictors and - produces well-calibrated quantiles in the tail. Reuses existing - imputation infrastructure. -- **Con**: requires a clean SPI-linked donor set with all the - conditioning variables (currently the QRF in `income.py` doesn't - output capital gains). - -**Recommendation**: option B. The infrastructure is in place, the -calibration is testable against HMRC published gains-by-income-band -tables, and it consistently solves both #818 (overfitting) and #817 -(implausible zero-wealth gains) by making `total_wealth` a predictor. - -## What changes in this repo - -The model-side surface is small: - -- The `capital_gains_before_response` input variable stays the same. - All the changes are upstream in `policyengine-uk-data`. -- A regression test in the model that asserts **no positive capital - gains for households with zero total wealth** would catch - reintroductions of the #817 failure mode and live well in - `policyengine_uk/tests/`. - -## Open questions - -- Wealth in the FRS is incomplete and noisy; the WAS (Wealth and - Assets Survey) is the better wealth conditioning source but is on a - different sampling frame. Should the QRF be trained on a WAS-linked - donor, or do we condition on the FRS-imputed wealth and accept the - noise? -- HMRC's published CGT statistics break gains down by income, age, and - asset type but not by household wealth. Calibration targets will - need to be assembled across multiple HMRC and ONS sources. -- Behavioural response (`capital_gains_behavioural_response` in this - repo) currently uses a single elasticity. A multivariate model that - gets the distribution right opens the door to **elasticity by - income / wealth band** — useful for reform analysis but adds a - parameter surface. +## How the model uses capital gains + +`capital_gains_before_response` is a person-level input, uprated by OBR +per-capita GDP growth. `capital_gains_tax` charges it at the main CGT +rates, with three components charged at their own rates (all added by +[#1861](https://github.com/PolicyEngine/policyengine-uk/pull/1861)): + +- `capital_gains_badr`: gains qualifying for Business Asset Disposal + Relief or Investors' Relief, at the relief rate up to the lifetime + limit; +- `capital_gains_residential_property`: gains on UK residential + property, at the residential rates; +- `capital_gains_carried_interest`: carried interest, at the carried + interest rates. + +Each is a component of the total, not an addition to it. + +Behavioural responses: `capital_gains_behavioural_response` changes +realisations using an elasticity with respect to the retention rate +(`relative_capital_gains_retention_rate_change`) or the marginal tax +rate. Gains qualifying for BADR respond at their own elasticity +(`capital_gains_badr_elasticity`); the rest use +`gov.simulation.capital_gains_responses.elasticity`. + +## How the gains are imputed + +### Before: one distribution per income decile + +The Enhanced FRS fitted a separate gains distribution within each +income decile and drew each household's gains from its decile. #818 +pointed out the problems: + +- each decile's upper tail was fitted on few observations, so the tails + were noisy and the joint distribution of income and gains had breaks + at decile boundaries; +- two people in the same decile drew from the same distribution however + different their incomes; +- gains depended on income only, not on wealth, so they could be + imputed to households with no assets (#817). + +### Now: Microcosm UK + +Microcosm builds gains in four stages (see the UK +[sources specification](https://github.com/PolicyEngine/microcosm/blob/75167a68/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml)): + +1. **Support split** (`cgt_support_split`). Within each income band of + HMRC Capital Gains Tax statistics Table 3, the households with the + most investable wealth (financial wealth, business wealth and + property other than the main home) are split into lighter copies, so + that there are enough rows to hold the largest gains. +2. **Who has gains** (`cgt_incidence_clone`). The set and order of + gainers come from the incidence distribution in Advani and Summers + (2020), *Capital Gains and UK Inequality* (CAGE Working Paper 465). +3. **How much** (`hmrc_cgt_gains_spine`). Amounts are redrawn so that + gains match HMRC Table 3 for 2024-25, which counts taxpayers and + gains **jointly by size of gain and taxable income**, conditioned on + Tables 1, 2.1a, 5 and 6. +4. **What kind** (`hmrc_cgt_asset_type_spine`). Gains are split by + asset type using Table 8 (residential property), Table 4.1 (BADR and + Investors' Relief) and Table 7 (gains by asset type), which fills + `capital_gains_residential_property` and `capital_gains_badr`. + +All the HMRC tables come from the Capital Gains Tax statistics July +2026 release, through Microcosm's pinned Chronicle feed. + +Against #818: gains are now fitted to the published joint distribution +of gain size and taxable income, not decile by decile. Against #817: +the largest gains are placed on the wealthiest households in each +income band. Microcosm's release checks also include a projection check +on people just below the annual exempt amount (`gates.json`), so that +uprating does not push implausible numbers of them into paying CGT in +later years. + +## What's left + +- **A zero-wealth test.** Add a test, here or in Microcosm, that no + positive gains sit on households with zero investable wealth. Neither + repo asserts this directly yet, so #817 should stay open until it + does. +- **Close #818** once the next certified Microcosm release confirms the + Table 3 fit, and link the release's diagnostics from the issue. +- **Elasticities by group.** Responses use one main elasticity and one + BADR elasticity. With the joint distribution in place, an elasticity + that varies by income or size of gain becomes possible, at the cost + of more parameters to justify. +- **Wealth source.** Investable wealth comes from Microcosm's Wealth + and Assets Survey imputation. Its quality limits how well #817 can be + met. + +The quantile regression forest approach proposed here in May is no +longer needed for this. ## References -- Issue: [#818](https://github.com/PolicyEngine/policyengine-uk/issues/818) — original "model gains jointly across income groups". -- Related: [#817](https://github.com/PolicyEngine/policyengine-uk/issues/817) — avoid imputing CG to zero-wealth households. -- Reference implementation: [OG-USA bequest-transmission multivariate KDE](https://pslmodels.github.io/OG-USA/content/api/bequest_transmission.html). -- Reusable infrastructure: the QRF in [`policyengine_uk_data/datasets/imputations/income.py`](https://github.com/PolicyEngine/policyengine-uk-data) and the second-stage QRF plan in [pipeline alignment](./uk-pipeline-alignment-plan.md). -- HMRC, [Capital Gains Tax statistics](https://www.gov.uk/government/collections/capital-gains-tax-statistics) — calibration source. -- ONS, [Wealth and Assets Survey](https://www.ons.gov.uk/peoplepopulationandcommunity/personalandhouseholdfinances/incomeandwealth/bulletins/totalwealthingreatbritain/latest) — alternative conditioning source for wealth. -- Existing variables: [`capital_gains_before_response`](../../../policyengine_uk/variables/gov/hmrc/capital_gains_tax/capital_gains_before_response.py), [`capital_gains`](../../../policyengine_uk/variables/household/income/capital_gains.py), [`capital_gains_behavioural_response`](../../../policyengine_uk/variables/gov/hmrc/capital_gains_tax/capital_gains_behavioural_response.py). +- Issues: [#818](https://github.com/PolicyEngine/policyengine-uk/issues/818), [#817](https://github.com/PolicyEngine/policyengine-uk/issues/817). +- CGT components: [#1861](https://github.com/PolicyEngine/policyengine-uk/pull/1861). +- HMRC, [Capital Gains Tax statistics](https://www.gov.uk/government/statistics/capital-gains-tax-statistics). +- Advani, A. and Summers, A. (2020), *Capital Gains and UK Inequality*, CAGE Working Paper 465. +- Microcosm UK [sources specification](https://github.com/PolicyEngine/microcosm/blob/75167a68/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml) (stages `cgt_support_split`, `cgt_incidence_clone`, `hmrc_cgt_gains_spine`, `hmrc_cgt_asset_type_spine`). From 544cb21434ab7e90d26980e6b859eaccfdb850d9 Mon Sep 17 00:00:00 2001 From: vahid-ahmadi Date: Mon, 12 Oct 2026 11:08:52 +0200 Subject: [PATCH 3/3] Bring the capital gains page up to date with main and Microcosm The Enhanced FRS is still the certified default. Describe the BADR elasticity switch added on 1 October (off by default), the six Microcosm CGT stages including the incidence anchor and residential split, and the income-band (not decile) spline in policyengine-uk-data. Co-Authored-By: Claude Opus 5.5 --- .../capital-gains-distribution-plan.md | 73 ++++++++++++------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/docs/book/assumptions/capital-gains-distribution-plan.md b/docs/book/assumptions/capital-gains-distribution-plan.md index 792fc36290..5e47427100 100644 --- a/docs/book/assumptions/capital-gains-distribution-plan.md +++ b/docs/book/assumptions/capital-gains-distribution-plan.md @@ -6,11 +6,13 @@ (model gains jointly across income groups) and [#817](https://github.com/PolicyEngine/policyengine-uk/issues/817) (don't impute gains to households with no wealth). The imputation lives -in the data pipeline, not in this repo. Most of what this page proposed +in the data build, not in this repo. Most of what this page proposed in May 2026 has since been built in -[Microcosm UK](https://github.com/PolicyEngine/microcosm), which is now -the UK data pipeline. What remains is listed at the -end of this page. +[Microcosm UK](https://github.com/PolicyEngine/microcosm), which builds +the replacement for the Enhanced FRS. The certified UK default dataset is +still the Enhanced FRS from +[policyengine-uk-data](https://github.com/PolicyEngine/policyengine-uk-data) +(release 1.58.0). What remains is listed at the end of this page. ``` ## How the model uses capital gains @@ -33,30 +35,38 @@ Each is a component of the total, not an addition to it. Behavioural responses: `capital_gains_behavioural_response` changes realisations using an elasticity with respect to the retention rate (`relative_capital_gains_retention_rate_change`) or the marginal tax -rate. Gains qualifying for BADR respond at their own elasticity -(`capital_gains_badr_elasticity`); the rest use -`gov.simulation.capital_gains_responses.elasticity`. +rate. Gains use `gov.simulation.capital_gains_responses.elasticity`, +which is 0 by default, so there is no response unless a user sets it. +When `gov.simulation.capital_gains_responses.separate_badr_elasticity` +is true (false by default), gains qualifying for BADR respond at +`badr_elasticity` instead (1.4, the value the OBR used for these gains +in its January 2025 costing), through `capital_gains_badr_elasticity`. ## How the gains are imputed -### Before: one distribution per income decile +### Enhanced FRS: one distribution per income band -The Enhanced FRS fitted a separate gains distribution within each -income decile and drew each household's gains from its decile. #818 -pointed out the problems: +The Enhanced FRS (policyengine-uk-data, the certified default) fits a +spline to the Advani and Summers gains percentiles within each income +band and draws each household's gains from its band. The spline alone +cannot produce gains above about £2m, so policyengine-uk-data main (not +yet in a release) also stacks 30 donor households per HMRC +size-of-gain band and calibrates to HMRC counts and amounts of gains by +band. #818 pointed out the problems with the +band-by-band fit: -- each decile's upper tail was fitted on few observations, so the tails +- each band's upper tail was fitted on few observations, so the tails were noisy and the joint distribution of income and gains had breaks - at decile boundaries; -- two people in the same decile drew from the same distribution however + at band boundaries; +- two people in the same band drew from the same distribution however different their incomes; - gains depended on income only, not on wealth, so they could be imputed to households with no assets (#817). -### Now: Microcosm UK +### Microcosm UK -Microcosm builds gains in four stages (see the UK -[sources specification](https://github.com/PolicyEngine/microcosm/blob/75167a68/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml)): +Microcosm builds gains in six stages (see the UK +[sources specification](https://github.com/PolicyEngine/microcosm/blob/main/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml)): 1. **Support split** (`cgt_support_split`). Within each income band of HMRC Capital Gains Tax statistics Table 3, the households with the @@ -70,30 +80,38 @@ Microcosm builds gains in four stages (see the UK gains match HMRC Table 3 for 2024-25, which counts taxpayers and gains **jointly by size of gain and taxable income**, conditioned on Tables 1, 2.1a, 5 and 6. -4. **What kind** (`hmrc_cgt_asset_type_spine`). Gains are split by - asset type using Table 8 (residential property), Table 4.1 (BADR and - Investors' Relief) and Table 7 (gains by asset type), which fills - `capital_gains_residential_property` and `capital_gains_badr`. +4. **Weight anchor** (`cgt_incidence_anchor`). Clones below the annual + exempt amount carry more weighted people than HMRC publishes, so the + excess weight is moved back to each clone's paired original. +5. **Residential property** (`cgt_residential_split`). Gains on UK + residential property are fitted to Table 8 (2024-25 residential + property disposals) by splitting households into weighted copies, + which fills `capital_gains_residential_property`. +6. **What kind** (`hmrc_cgt_asset_type_spine`). Of the remaining gains, + those qualifying for BADR or Investors' Relief are fitted to Table + 4.1, which fills `capital_gains_badr`, and the rest are given asset + types from Table 7 (gains by asset type, 2023-24). All the HMRC tables come from the Capital Gains Tax statistics July 2026 release, through Microcosm's pinned Chronicle feed. Against #818: gains are now fitted to the published joint distribution -of gain size and taxable income, not decile by decile. Against #817: +of gain size and taxable income, not band by band. Against #817: the largest gains are placed on the wealthiest households in each income band. Microcosm's release checks also include a projection check -on people just below the annual exempt amount (`gates.json`), so that +on people just below the annual exempt amount +(`uk_cgt_projection_entrants` in `gates.json`), so that uprating does not push implausible numbers of them into paying CGT in later years. -## What's left +## What is left - **A zero-wealth test.** Add a test, here or in Microcosm, that no positive gains sit on households with zero investable wealth. Neither repo asserts this directly yet, so #817 should stay open until it does. -- **Close #818** once the next certified Microcosm release confirms the - Table 3 fit, and link the release's diagnostics from the issue. +- **Close #818** once a Microcosm UK dataset is the certified default + and its diagnostics confirm the Table 3 fit; link them from the issue. - **Elasticities by group.** Responses use one main elasticity and one BADR elasticity. With the joint distribution in place, an elasticity that varies by income or size of gain becomes possible, at the cost @@ -111,4 +129,5 @@ longer needed for this. - CGT components: [#1861](https://github.com/PolicyEngine/policyengine-uk/pull/1861). - HMRC, [Capital Gains Tax statistics](https://www.gov.uk/government/statistics/capital-gains-tax-statistics). - Advani, A. and Summers, A. (2020), *Capital Gains and UK Inequality*, CAGE Working Paper 465. -- Microcosm UK [sources specification](https://github.com/PolicyEngine/microcosm/blob/75167a68/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml) (stages `cgt_support_split`, `cgt_incidence_clone`, `hmrc_cgt_gains_spine`, `hmrc_cgt_asset_type_spine`). +- Microcosm UK [sources specification](https://github.com/PolicyEngine/microcosm/blob/main/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml) (stages `cgt_support_split`, `cgt_incidence_clone`, `hmrc_cgt_gains_spine`, `cgt_incidence_anchor`, `cgt_residential_split`, `hmrc_cgt_asset_type_spine`). +- OBR (2025), [Costing of changes to the main, BADR and IR rates of capital gains tax](https://obr.uk/docs/dlm_uploads/CGT-supplementary-release-Jan-2025.pdf).