Skip to content

Use time_period for ACA and Medicaid metric columns#777

Merged
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis:fix-aca-medicaid-period-hardcode
Apr 17, 2026
Merged

Use time_period for ACA and Medicaid metric columns#777
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis:fix-aca-medicaid-period-hardcode

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

build_loss_matrix(dataset, time_period) threads a time_period argument through its SOI, CBO, and demographic target loops, but several ACA and Medicaid metric-column calls hardcoded period=2025:

Line Variable Period used
564 aca_ptc (household) hardcoded 2025
570 aca_ptc (person) hardcoded 2025
817 aca_ptc (household, state) hardcoded 2025
835 aca_ptc (person, state) hardcoded 2025
838 is_aca_ptc_eligible (person) hardcoded 2025
863 medicaid_enrolled (person) hardcoded 2025
865 is_medicaid_eligible (person) hardcoded 2025

Any calibration run for a year ≠ 2025 mixed 2025-valued PTC / 2025 enrollment flags with the requested time_period's spending and enrollment targets.

Fix

Pass time_period to every PTC/medicaid sim.calculate(...) call, so each metric column reflects the target year.

Test plan

  • CI passes.

`build_loss_matrix` threads a `time_period` argument through its
SOI, CBO, and demographic target loops, but several ACA and Medicaid
metric-column calls hardcoded `period=2025`:

- National ACA spending and enrollment (lines 564, 570)
- State ACA PTC spending-by-state (line 817)
- State ACA enrollment flags (lines 835, 838)
- State Medicaid enrollment and eligibility (lines 863, 865)

Any calibration run for a year != 2025 therefore mixed 2025-priced
PTC / 2025 enrollment flags with the requested time_period's
spending/enrollment targets.

Pass `time_period` to every PTC/medicaid calculation so each
metric column reflects the target year.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit a4e3d4d into PolicyEngine:main Apr 17, 2026
8 of 9 checks passed
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