Skip to content

Fix ACA PTC state calibration targets#892

Merged
MaxGhenis merged 2 commits into
mainfrom
codex/aca-ptc-soi-state-targets
May 5, 2026
Merged

Fix ACA PTC state calibration targets#892
MaxGhenis merged 2 commits into
mainfrom
codex/aca-ptc-soi-state-targets

Conversation

@daphnehanse11
Copy link
Copy Markdown
Collaborator

Summary

  • Correct the IRS SOI geography mapping for aca_ptc from 85530 to 85770 so it targets total premium tax credit instead of Additional Medicare Tax.
  • Add aca_ptc_state.csv from IRS SOI Historical Table 2 (N85770/A85770) plus a refresh script and loader that applies the checked-in 2022-to-target-year ACA PTC multipliers.
  • Use the SOI/uprated ACA PTC targets in the enhanced CPS takeup override, legacy loss matrix, and ACA diagnostic CLI, while keeping CMS enrollment targets for APTC person counts.
  • Store local-H5 county enums as integer indices in publish_local_area.py, matching entity_clone.py, so non-ASCII counties like DOÑA_ANA_COUNTY_NM do not fail dataset loading.

Fixes #805.

Diagnostics

Baseline all-state diagnostic on the staged 1.89.1 state files showed Florida as the only major enrollment impossibility: target 4.47M APTC people vs 2.96M modeled positive-PTC potential people (-33.8%). New Mexico failed to load because the staged H5 stored DOÑA_ANA_COUNTY_NM as UTF-8 bytes.

After applying the SOI/uprated target path, the 17-state problem slice shows NY/DC/MN are no longer the scary cases under assigned takeup spending:

state enrollment error assigned spending error
NY +0.1% +0.3%
DC -0.3% +2.4%
MN -0.0% +11.0%
FL -33.8% -55.4%
TX -0.0% -34.6%
GA +0.0% -30.7%

So the remaining work is concentrated in real modeled composition/potential gaps, especially FL/TX/GA, rather than NY/MN/BHP target-definition weirdness.

Tests

  • .venv/bin/ruff check ...
  • .venv/bin/python -m pytest tests/unit/test_aca_ptc_targets.py tests/unit/calibration/test_publish_local_area.py tests/unit/calibration/test_entity_clone.py tests/unit/test_refresh_aca_ptc_state_targets.py tests/unit/test_enhanced_cps.py tests/unit/calibration/test_loss_targets.py tests/unit/test_etl_irs_soi_overlay.py -q
  • uv run pytest tests/integration/test_build_h5.py -q

Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the Towncrier fragment path and rechecked the rerun. All PR checks are green, including integration.

@MaxGhenis MaxGhenis merged commit 271b13b into main May 5, 2026
10 checks passed
@MaxGhenis MaxGhenis deleted the codex/aca-ptc-soi-state-targets branch May 5, 2026 17:17
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.

Replace per-state CMS APTC target with IRS SOI Net Premium Tax Credit (A11560/N11560)

2 participants