Use time_period for ACA and Medicaid metric columns#777
Merged
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom Apr 17, 2026
Merged
Use time_period for ACA and Medicaid metric columns#777MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build_loss_matrix(dataset, time_period)threads atime_periodargument through its SOI, CBO, and demographic target loops, but several ACA and Medicaid metric-column calls hardcodedperiod=2025:aca_ptc(household)aca_ptc(person)aca_ptc(household, state)aca_ptc(person, state)is_aca_ptc_eligible(person)medicaid_enrolled(person)is_medicaid_eligible(person)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_periodto every PTC/medicaidsim.calculate(...)call, so each metric column reflects the target year.Test plan