Skip to content

Decide NM Premium Assistance's income edges on the exact FPL ratio - #10328

Open
MaxGhenis wants to merge 9 commits into
mainfrom
nm-premium-assistance-exact-fpl-ratio
Open

MaxGhenis wants to merge 9 commits into
mainfrom
nm-premium-assistance-exact-fpl-ratio

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The cutoff fixes and household tests are complete. Full impact and Axiom parity are pending.

The November 18 merge retained both sets of joint-return tests. The later merge at b0f95d2 brought in main through 50756f2 without conflicts. The branch also passed a separate conflict-free merge check with main at 8e81d66.

  • The base ceiling, MIH floor, and PY2026 and PY2027 benchmark gross-up share a cutoff ratio. A supplied nm_premium_assistance_fpl_ratio controls the comparisons. Derived comparisons use ACA MAGI and the same aca_fpg guideline as the federal credit.
  • The 37 fixtures that pinned tax_unit_fpg for the prior year now pin aca_fpg for the coverage year. No expected value changed.
  • New cases cover a joint return with one claimable spouse, where the tax family of one is smaller than the tax unit of two:
    • Eligibility Case 17: $62,600 is base-eligible (400% of $15,650).
    • Eligibility Case 18: $62,600.47 is base-ineligible (400.003% of $15,650, though 296% of the whole unit's $21,150).
    • MIH Case 14: $62,600 is not above 400%.
    • MIH Case 15: $62,600.47 is MIH-eligible, and the amount is $678.96.
    • Amount Case 37: $31,300.47 gets no PY2026 gross-up (200.003% of $15,650, though 148% of $21,150).
    • Amount Case 38: $31,920 gets no PY2027 gross-up (200% of $15,960, though 148% of $21,640).
  • The Exchange rule uses the guideline last published as of the first day of annual open enrollment. The MAP manuals use Exchange household income under 45 CFR 155.305(f), which refers to federal premium tax credit eligibility. aca_fpg uses the associated section 36B tax family. The claimable-spouse cases exercise the difference between the tax family and the whole tax unit. Treat income exactly at 400% FPL as premium tax credit eligible #10312 has landed. Scenario 15 derives federal and state eligibility at exactly 400% and pays $913.96. Sources: 45 CFR 155.300(a), PDF p. 2; 45 CFR 155.305(f).
  • fpl_limit cites the final PY2027 MAP base formula on p. 5. The selected-plan cap, take-up defaults, Puente, and the tribal schedule remain follow-ups.

Bug

New Mexico Premium Assistance compared the truncated aca_magi_fraction (np.floor(100 * magi / fpg) / 100) with three income edges:

Edge Source Comparison on main Defect
Base program ceiling PY2026 MAP manual, p.6: "consumers with household income over 400% of the FPL do not qualify" <= 4.0 admits 400.00%-400.99% (the federal gate, which ends at 400%, hid it under current law)
Middle Income Household floor Addendum 1, Section I.A(3): "Have a household income above 400% of the FPL." > 4.0 excludes 400.00%-400.99%
PY2026 10% benchmark gross-up PY2026 MAP manual, p.5: "For eligible individuals up to 200% FPL"; the ungrossed formula covers "individuals between 200.01-400% FPL" <= 2.0 grosses up 200.00%-200.99%

The old whole-percentage calculation could exclude an otherwise eligible household just above 400% from both components. It could also apply the PY2026 gross-up just above 200%. Enrolled HB 2 gives the below-400% and federal-criteria-except-income clauses on pp. 4–5. The HCA manuals include exactly 400% in the base band, and MIH Addendum 1 starts MIH above 400%.

The single-filer table records a historical comparison using the 2025 one-person guideline of $15,650:

Income Exact % of FPL aca_magi_fraction Main Here
$31,300 200.000% 2.00 gross-up gross-up
$31,300.47 200.003% 2.00 gross-up none
$31,455.56 200.994% 2.00 gross-up none
$62,600 400.000% 4.00 base (gate alone), not MIH base, not MIH
$62,600.47 400.003% 4.00 neither (base gate alone: yes) MIH
$62,700 400.639% 4.00 $0, neither MIH, $2,670.50 on an $8,000 benchmark

Fix

Each cutoff checks finiteness and compares the same ratio. The base income test includes 400%, and the MIH income test starts above 400%. Each component also applies its own filing and coverage conditions. The 10% benchmark gross-up includes 200% in PY2026 and requires income below 200% in PY2027. Target-contribution interpolation uses aca_magi_fraction.

Invariants

Derived comparisons use a float64 quotient. Below $131,072, the model recovers a cent-denominated MAGI when the nearest cent casts back to the stored float32 value. At $131,072 and above, adjacent cents can share a stored value, and the comparison uses stored MAGI. A subcent input that shares a stored value with a cent input is also indistinguishable. The YAML tests cover exact and adjacent-cent inputs, supplied ratios, and the program’s interior bands.

Tests

  • Every case in the NM YAML files that supplied aca_magi_fraction without aca_magi now supplies aca_magi against an aca_fpg of $10,000.
  • Case 24 expected $0 for a $62,700 filer, with the comment "MIH-ineligible (not > 4.0)" and "May move when Federal ACA PTC income gate zeroes the credit at [400%, 401%) FPL (truncation boundary vs Form 8962) #9264 lands". $62,700 is 400.64% of $15,650, above 400%: it now expects MIH eligibility and $2,670.50 (8_000 - 0.085 * 62_700).
  • About twenty cases supplied a fraction that disagreed with their own aca_magi, found by re-deriving each fraction from its MAGI (for example "400% FPL" with $60,000, which is 383% of $15,650). With the gate reading MAGI, each would have judged eligibility and the target percentage on different incomes.
    • Amount Case 11 uses $39,000 / $15,600 and pays $0. Case 16 uses $60,150 / $15,000 and pays $10,000 − 8.5% × $60,150 = $4,887.25. Scenario 8 uses $39,125 / $15,650 and pays $0. Scenario 14 uses $31,300 / $15,650 and pays $2,000. Case 18 supplies a 5% target directly, clamps negative income to zero, and pays $5,900.
  • Scenarios 15–17 cover derived eligibility at 400%, MIH just above 400%, and a missing guideline. Scenarios 18–19, the isolated base pair, and amount Cases 43–44 cover exact and one-cent-above reforms at 401% and 213%. Scenario 20 and amount Cases 45–46 cover supplied ratios. Scenarios 21–22 and amount Cases 47–48 cover exact and adjacent-cent inputs at the synthetic 400.2% and 200.3% thresholds.
  • The branch and a merge with main each passed 234 YAML cases across 14 files. The branch passed all 14 tests in test_claimable_filer_ptc_invariants.py. Two mutations failed the new cases for supplied inputs and exact-cent cutoffs.

Impact

Pending: full-file microsimulation, 2026 and 2027.

Coordination

#10041 established aca_fpg as the denominator for aca_magi_fraction. #10312 landed and includes exactly 400% in the federal income test. This PR is part of the audit tracked in #10329.

axiom: needed

🤖 Generated with Claude Code

New Mexico's base program excludes "consumers with household income over
400% of the FPL", Addendum 1 covers Middle Income Households with income
"above 400% of the FPL", and the PY2026 manual grosses up the benchmark
"up to 200% FPL" (the next range starts at "200.01"). All three compared
the truncated aca_magi_fraction, which maps 400.00%-400.99% to 4.00 and
200.00%-200.99% to 2.00. So incomes just above 400% were in neither
component (the federal gate ends the base program at 400%, and MIH needed
a fraction above 4.00), and the PY2026 gross-up reached 200.99%. Test the
exact ratio of nonnegative ACA MAGI to the prior-year guideline instead.

Case 24 expected $0 for a $62,700 filer (400.64%) because of the gap; it
now expects the $2,670.50 MIH amount. About twenty cases supplied a
fraction that disagreed with their own MAGI. Where the case's arithmetic
assumed another guideline (often $15,000), its prior-year tax_unit_fpg is
pinned to that guideline; otherwise the income and expected amount are
recomputed. Case 29 now supplies MIH eligibility to reach the negative-
income clamp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 and others added 2 commits November 18, 2026 15:37
Both sides appended cases at the end of nm_premium_assistance.yaml and
nm_premium_assistance_mih_eligible.yaml. Keep this branch's boundary cases
and main's joint-return cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…overty line

Divide the exact ratio by aca_fpg, in float64, in the base ceiling, the Middle
Income Household floor and the benchmark gross-up. Pin aca_fpg in the fixtures
that pinned the prior-year tax_unit_fpg, and add joint returns with a claimable
spouse, where the tax family is smaller than the tax unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 marked this pull request as ready for review November 18, 2026 21:46
@DTrim99
DTrim99 requested a review from hua7450 November 18, 2026 21:46
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8999568) to head (c844b9e).
⚠️ Report is 410 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10328   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         5    +4     
  Lines           24       105   +81     
  Branches         0         1    +1     
=========================================
+ Hits            24       105   +81     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, David. The New Mexico edges check out: the base program stays "at or below 400%" (PY2026 manual p. 6, "over 400% of the FPL do not qualify"; PY2027 manual p. 5, "≥ 200 and ≤ 400%"), Middle Income Households start "above 400% of the FPL" (Addendum 1 p. 2), and the 10% gross-up covers incomes up to 200% in PY2026 and under 200% in PY2027. With <= and > on the same exact ratio, every income lands in exactly one component, which closes the old 400.003%-400.99% gap. No New Mexico source truncates the percentage, and the guideline year follows 45 CFR 155.300(a) through 8.401.2.7(G) NMAC, which aca_fpg matches. Two fixes before I approve.

Before merge

  1. The ratio is computed three times in one program. nm_premium_assistance.py (lines 54-57), nm_premium_assistance_eligible.py (48-52) and nm_premium_assistance_mih_eligible.py (57-61) repeat the same three lines and comment, and the amount variable also needs the ratio for the gross-up. One NM ratio variable (for example a TaxUnit nm_premium_assistance_fpl_ratio) read by all three keeps them from drifting. Same request as 10321 and 10323.
  2. Four cases changed main's income where pinning aca_fpg would have kept it. Your own rule in this PR is to pin aca_fpg when the arithmetic assumed another guideline; these four had clean guidelines:
    • nm_premium_assistance.yaml Case 16: main's $60,150 is exactly 4.01 × $15,000, and its pair Case 15 pins aca_fpg: 15_000. Restoring $60,150 with that pin returns the expected value to 4,887.25 instead of 4,665.70.
    • Case 11: $39,000 = 2.5 × $15,600 (pin 15,600).
    • integration.yaml Scenario 8: $39,125 = 2.5 × $15,650 (pin 15,650).
    • Scenario 14: $31,300 = 2 × $15,650 (pin 15,650); as changed, it duplicates the new Case 36.

Also, this branch predates 10312's merge, under which income exactly at 400% is federally eligible; please merge main so CI runs with it.

Optional

  • Tests. Under the exact ratio, the 0.003- and 0.994-point cases above each edge are the same class (eligibility Cases 15/16, MIH 12/13, amount 33/34), and amount Case 32 repeats Case 2 and Scenario 13. Drop the 0.994 cases or note them as markers for the old truncation.
  • Case 18 now pairs aca_magi: -10_000 (ratio 0 for the gross-up and eligibility) with a supplied 3.00 fraction for the target percentage. Supplying nm_premium_assistance_target_contribution_percentage instead would keep the clamp test without two inconsistent incomes.
  • Guideline-year comment. 8.401.2.8(D)(1)(a) NMAC and both manuals take income "as outlined in 45 C.F.R. § 155.305(f)", which sits under 155.300(a)'s definition of the poverty line, so the comment in nm_premium_assistance_eligible.py could cite it rather than saying no New Mexico source ties the year.
  • Zero guard (see below).

Series-wide (follow-up, not for this PR). The exact ratio max_(aca_magi, 0) / aca_fpg is computed inline across this series (plus two California copies on main), and only 10312 guards a zero poverty line. One guarded tax-unit variable for the untruncated ratio, read by every gate, would be a good follow-up PR.

MaxGhenis and others added 3 commits November 30, 2026 04:35
Read nm_premium_assistance_fpl_ratio in the amount formula and both
eligibility gates, and require a finite ratio so a zero guideline pays
nothing. Restore the fixtures' inputs to main's values, describe the two
income bands in the parameter comment, and add end-to-end scenarios at
400% FPL, just above it, the gross-up boundaries and a zero guideline.

Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 2 commits December 1, 2026 06:57
… cutoffs

Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

3 participants