Skip to content

Fix get_irs_cpi 12-month CPI window - #9198

Open
saisharan0103 wants to merge 2 commits into
PolicyEngine:mainfrom
saisharan0103:mergepath/issue-9105-get-irs-cpi-averages-augustjuly-but
Open

Fix get_irs_cpi 12-month CPI window#9198
saisharan0103 wants to merge 2 commits into
PolicyEngine:mainfrom
saisharan0103:mergepath/issue-9105-get-irs-cpi-averages-augustjuly-but

Conversation

@saisharan0103

Copy link
Copy Markdown
Contributor

Issue #9105 reports that get_irs_cpi documents and intends to follow IRS practice by averaging chained CPI-U over the 12 months ending in August, but the implementation starts 12 months before the August instant and iterates 12 values. That selects August of the prior year through July of the target year, excluding the target year's August value.

This changes the loop start to 11 months before the August instant so the averaged window is September of the prior year through August of the target year, inclusive.

A regression test now computes the expected average from explicit September-August monthly C-CPI-U values and verifies get_irs_cpi matches that window, while demonstrating the result differs from the old August-July window.

Modified files:

  • policyengine_us/parameters/uprating_extensions.py
  • policyengine_us/tests/policy/baseline/parameters/test_uprating_extensions.py

ruff check policyengine_us/parameters/uprating_extensions.py policyengine_us/tests/policy/baseline/parameters/test_uprating_extensions.py reports no new findings on the changed files.

Mergepath and others added 2 commits August 2, 2026 01:12
… documents (and IRS practice uses) the 12 months ending August

Closes PolicyEngine#9105
…ow; format

The Sep-Aug window correction shifts gov.irs.uprating-projected values by a
few dollars, so: RI 2027 SS-modification boundary cases move to the corrected
projected limits (single 112,750, joint 140,950 — inputs shifted, intent
preserved: at-limit stays ineligible, one dollar below stays eligible); RI
high-earner, RI integration, MN HF4890, and CA AB2591 projected-value pins
updated to the corrected-window outputs; ruff format on the new window test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants