Skip to content

Capital gains tax and pensions tax: port HMRC subtrees with behavioural elasticities #45

@vahid-ahmadi

Description

@vahid-ahmadi

Gap

Python:

  • policyengine_uk/variables/gov/hmrc/capital_gains_tax/ — CGT bands, residential vs non-residential rates, annual exempt amount, behavioural elasticity to rate changes (realisation response)
  • policyengine_uk/variables/gov/hmrc/pensions/ — annual allowance, tapered annual allowance, lifetime allowance (legacy), pension input amounts, salary-sacrifice-adjusted pensionable earnings, relief-at-source vs net-pay

Rust src/variables/wealth_taxes.rs has 4 functions and no CGT or pensions-tax logic.

Why it matters

  • Salary-sacrifice cap reform (existing notebooks: salary_sacrifice_cap_*.ipynb, including a published comparison vs OBR) — requires the pension-relief stack to model what 'capping at £2k/£10k' actually means for taxable income and NICs
  • CGT rate increases were a major Oct-2024 budget topic — the user's tax_reform_* and reeves_budget_2025_* notebooks need this; without behavioural elasticities, scores will be too high
  • Pensions tax changes (annual-allowance taper, removal of LSA) cannot be modelled

What to port

  1. CGT taxable gains, AEA, residential surcharge, basic-rate / higher-rate splits
  2. CGT behavioural elasticity (realisation response to rate changes — Python uses a configurable elasticity parameter)
  3. Pension input amount, employer + employee contributions, salary-sacrifice treatment
  4. Annual allowance + tapered annual allowance + carry-forward (or document any simplifications)
  5. Pension tax relief (relief at source vs net pay) and how it lands in income tax

Effort

Medium. The CGT calculation itself is small; behavioural-response infrastructure overlaps with the dynamics issue. Pensions are more complex due to the relief-mode interactions.

References

  • Python: policyengine_uk/variables/gov/hmrc/capital_gains_tax/, policyengine_uk/variables/gov/hmrc/pensions/
  • Python params: policyengine_uk/parameters/gov/hmrc/capital_gains_tax/, parameters/gov/hmrc/pensions/
  • Rust: src/variables/wealth_taxes.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions