Skip to content

Add IRS SOI long-term capital gains target#869

Merged
MaxGhenis merged 1 commit into
mainfrom
add-extra-capital-income-targets
May 4, 2026
Merged

Add IRS SOI long-term capital gains target#869
MaxGhenis merged 1 commit into
mainfrom
add-extra-capital-income-targets

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented May 4, 2026

Summary

  • add the IRS SOI long-term capital gains aggregate target to the legacy enhanced CPS loss matrix
  • load the same aggregate target into policy_data.db through etl_national_targets.py
  • add IRS Publication 1304 Table 1.4A LTCG-by-AGI-bin targets to policy_data.db
  • include the aggregate and AGI-bin LTCG targets in the default calibration target_config.yaml
  • cover the loss-matrix helper, target-config inclusion, and DB-build presence with tests

Notes

PR #868 already added AGI-bracket targets for net capital gains, dividends, and taxable interest. The additional source-backed targets here are:

  • calibration.gov.irs.soi.long_term_capital_gains, which resolves to about $1.681T for 2026
  • Publication 1304 Table 1.4A Net long-term capital gain by AGI bin, available through TY2023

I did not add short_term_capital_gains: the available parameter is PUF-derived "in the absence of a SOI target" and its 2026 value is negative, so it is not a comparable source-backed target.

Local comparison against the latest rebuilt enhanced_cps_2024.h5:

  • aggregate positive LTCG: $1.755T vs $1.686T target, 1.04x
  • aggregate net/default LTCG sum: $1.645T vs $1.681T uprated parameter, 0.98x
  • several AGI bins still differ materially, so the Table 1.4A rows add distributional guardrails even though the aggregate is close

Tests

  • uv run ruff check policyengine_us_data/db/etl_national_targets.py policyengine_us_data/db/etl_irs_soi.py policyengine_us_data/storage/calibration_targets/refresh_soi_table_targets.py policyengine_us_data/utils/loss.py tests/unit/calibration/test_loss_targets.py tests/unit/calibration/test_target_config.py tests/unit/test_etl_irs_soi_overlay.py tests/integration/test_database_build.py
  • uv run pytest tests/unit/test_etl_national_targets.py tests/unit/calibration/test_loss_targets.py
  • uv run pytest tests/unit/test_etl_irs_soi_overlay.py tests/unit/calibration/test_target_config.py
  • uv run pytest tests/integration/test_database_build.py::test_national_ltcg_agi_targets_loaded
  • subagent review: no blocking issues

@MaxGhenis MaxGhenis force-pushed the add-extra-capital-income-targets branch from f02bcdd to 958bd37 Compare May 4, 2026 12:08
@MaxGhenis
Copy link
Copy Markdown
Contributor Author

Local check against the latest rebuilt enhanced_cps_2024.h5 suggests this PR should not materially move the current fixed dataset. For 2026, the rebuilt file has LTCG at $1.645T versus the IRS SOI LTCG target at $1.681T (0.978x, -$36.3B / -2.2%).

That target is not raw 2026 SOI; it is the PolicyEngine-US IRS SOI LTCG parameter, with a 2020 SOI base of $1.137T uprated to 2026 via calibration.gov.cbo.income_by_source.net_capital_gain.

So this PR is mainly adding an explicit guardrail to the legacy loss matrix and target DB. Since the latest rebuilt file is already close to the uprated SOI LTCG target, I would not expect much impact from this PR on the current capital-gains aggregates or reform revenue.

@MaxGhenis MaxGhenis force-pushed the add-extra-capital-income-targets branch from 958bd37 to 54ec295 Compare May 4, 2026 12:36
@MaxGhenis
Copy link
Copy Markdown
Contributor Author

Yes, IRS Publication 1304 Table 1.4A has Net long-term capital gain by AGI bin, available through TY2023. I added those to this PR as national domain targets for adjusted_gross_income,long_term_capital_gains:

  • 19 AGI-bin long_term_capital_gains amount targets
  • 19 matching tax_unit_count targets for returns with LTCG in each bin

Local comparison against the latest rebuilt enhanced_cps_2024.h5 shows the aggregate positive LTCG total is close overall ($1.755T vs $1.686T target, 1.04x after uprating), but several AGI bins differ materially. So these should act as distributional guardrails rather than a large aggregate correction.

@MaxGhenis MaxGhenis force-pushed the add-extra-capital-income-targets branch from 54ec295 to cec27f2 Compare May 4, 2026 13:44
@MaxGhenis MaxGhenis merged commit 67b01c5 into main May 4, 2026
10 checks passed
@MaxGhenis MaxGhenis deleted the add-extra-capital-income-targets branch May 4, 2026 14:19
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