Skip to content

Add capital gains basis indexation reform#8427

Draft
MaxGhenis wants to merge 3 commits into
mainfrom
prototype-cg-indexation-policy
Draft

Add capital gains basis indexation reform#8427
MaxGhenis wants to merge 3 commits into
mainfrom
prototype-cg-indexation-policy

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Adds the PolicyEngine-US side of capital gains basis indexation, stacked on #8423's new basis and holding-period inputs.

This PR adds:

  • IRS capital gains indexation parameters for activation, minimum holding period, acquisition-year threshold, no-loss cap, and chained-CPI transition year
  • a tax-unit-level basis indexation adjustment, computed from the collapsed tax-unit representation
  • person-level allocation of the tax-unit adjustment so existing person-level long_term_capital_gains consumers continue to work
  • prospective, retrospective, and retrospective-losses-allowed reform helpers for benchmark comparisons
  • YAML tests covering inactive baseline behavior, prospective/retrospective eligibility, no-loss capped gains, mixed-spouse collapsed tax-unit behavior, and the losses-allowed Yale benchmark axis

Notes

This intentionally computes the adjustment at the tax-unit level first. The data imputation PR stores basis and holding period at person level for compatibility, but the collapsed imputation is conceptually one representative transaction per tax unit.

The default reform helpers use a no-loss cap. A separate capital_gains_indexation_retrospective_losses_allowed helper is included for benchmarking against the public Yale runscript, which appears to leave index_kg_no_loss = 0.

Stacked on #8423. Related data issue: PolicyEngine/policyengine-us-data#1126.

Tests

  • uv run ruff check policyengine_us/variables/gov/irs/tax/federal_income/capital_gains/tax_unit_long_term_capital_gains_indexation_adjustment.py policyengine_us/variables/household/income/person/capital_gains/long_term_capital_gains_indexation_adjustment.py policyengine_us/reforms/capital_gains_indexation.py policyengine_us/variables/household/income/person/capital_gains/long_term_capital_gains.py
  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/contrib/capital_gains_indexation.yaml -c policyengine_us
  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/irs/tax/federal_income/capital_gains policyengine_us/tests/policy/baseline/gov/irs/integration/capital_gains_losses.yaml policyengine_us/tests/variables/household/income/person/capital_gains -c policyengine_us
  • uv run pytest policyengine_us/tests/test_parameter_files.py policyengine_us/tests/test_system_import.py -q

@MaxGhenis MaxGhenis force-pushed the add-capital-gains-indexation-inputs branch from d51b237 to 827c7e1 Compare May 24, 2026 17:36
@MaxGhenis MaxGhenis force-pushed the prototype-cg-indexation-policy branch from 7043379 to 2a09ae8 Compare May 24, 2026 17:39
Base automatically changed from add-capital-gains-indexation-inputs to main May 25, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant