Skip to content

Use the not seasonally adjusted CPI-W for 2024 onward - #10133

Open
MaxGhenis wants to merge 1 commit into
mainfrom
fix-cpi-w-nsa
Open

MaxGhenis wants to merge 1 commit into
mainfrom
fix-cpi-w-nsa

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Independent review in progress (subfleet 20261011-174158-cpiw-review-r1).

What

gov.bls.cpi.cpi_w was two series spliced together. From 1913-01 to 2023-12 (1,332 months) every value equals BLS CWUR0000SA0, the not seasonally adjusted (NSA) CPI-W. SSA publishes the same series on its CPI-W page and computes the cost-of-living adjustment from it. From 2024-01 to 2026-06, all 29 published months (BLS never published October 2025) held seasonally adjusted (SA) values:

Months Added in What the file held
2024-01 to 2025-08 (20) #6672 Matches neither series exactly. Each value is within 0.26 of today's SA series (CWSR0000SA0) and up to 2.1 from NSA. 2025-04 equals today's SA value.
2025-09 to 2026-06 (9) #9100 (cited CWSR0000SA0) Exactly today's SA series.

BLS recomputes seasonal factors every year and can revise the past five years of SA indexes when it does (BLS seasonal adjustment). That is why SA values copied at different times disagree. The NSA series is the one SSA's table and gov.ssa.uprating use.

This PR:

  1. Replaces the 29 months with CWUR0000SA0. All 29 match both the BLS API (pulled 2026-10-11) and SSA's CPI-W table.
  2. Re-derives the 35 CBO-based projection points (2026Q3–2035Q1). They used CBO CPI-U quarter × 316.530 / 323.364, the SA-vintage August 2025 CPI-W/CPI-U ratio. They now use the NSA June 2026 ratio, 327.075 / 333.952, where June 2026 is the last actual (CUUR0000SA0 for CPI-U). Each point moves +0.0553%.
  3. Updates the description and references: CWUR0000SA0, SSA's table, and CUUR0000SA0 for the anchor.
  4. Adds test_cpi_w_third_quarter_averages_reproduce_ssa_uprating. For every year whose July–September the CPI-W file lists, the quarterly mean has to reproduce gov.ssa.uprating to SSA's three decimals under 42 U.S.C. 415(i)(1)(A)(i), (B), (D) and (G). When the increase, rounded to a tenth of a percent, is not above zero, the level must carry forward. The test reads the YAML's listed values, so backdating to 2015 doesn't create a phantom 2015 entry.

Readers and effect

git grep cpi_w finds two readers. Neither changes.

  • WA millionaires tax standard deduction (extend_wa_millionaires_standard_deduction, ESSB 6346 §316). Its factor is a ratio of two CPI-W projection points (2029-08 over 2028-08, and so on), which share the anchor, so the anchor change cancels up to the three-decimal rounding of the projection points (for example, the 2029 factor moves from 1.02281601245 to 1.02281509977). After rounding to dollars, the deduction amounts are unchanged through 2100, and the parameter is unchanged in the tree diff.
  • The long-run CPI-W extension (extend_parameter_values, 2035+). It grows at the 2033→2034 rate, so the extended values move by the same +0.055%, plus up to 0.005 percentage points by 2100 (+0.0602%) from three-decimal rounding of the projection points.

No YAML parameter or variable uprates with gov.bls.cpi.cpi_w. No formula reads gov.bls.cpi by name. Microcosm, policyengine.py, policyengine-api and policyengine-api-v2 don't reference it on main.

Full parameter tree diff (every leaf after system init, uprating and extensions included): 1 of 105,634 parameters changes, gov.bls.cpi.cpi_w. The variable uprating map (384 entries) is identical. Since no formula reads the one parameter that changed, household and microsimulation outputs are unchanged. I didn't run a microsimulation because nothing in the model consumes the changed values.

Invariants

  • Every CPI-W monthly value from 1913-01 to 2026-06 equals BLS CWUR0000SA0. I checked this offline against the full BLS flat file. The test pins 2024-01, 2025-10 (September carried forward), 2026-02 and 2026-06.
  • The CPI-W Q3 averages reproduce gov.ssa.uprating's actual values under 415(i). This is a differential check between two published series and is enforced by the new test.
  • Each projection point equals the CBO CPI-U quarter × 327.075 / 333.952, rounded half up to three decimals. The arithmetic is in each line's comment.
  • No other parameter changes (tree diff).

No Hypothesis test, because this PR changes data, not logic. The SSA differential test is the property that would have caught the bug.

Follow-ups (not in this PR)

  • cpi_u.yaml has the same splice. It is NSA through 2023-12 and SA from 2024-01 to 2026-06 (29 months, same two PRs), and it has many more readers. Draft Index IRS parameters to the 12-months-ending-August chained CPI-U, with CBO's tax-year projections #9621, which is on hold, touches the same file and adds cpi_u_nsa.yaml. Being split into its own task.
  • gov.ssa.uprating projections (2027+) still use the ratio 306.199 / 310.989 and older CBO values. BLS has published July and August 2026 NSA CPI-W (327.104, 328.481), and the 2027 COLA follows the September release. Once Q3 2026 is complete, the new test will require the 2027 entry to match.

axiom: n/a: BLS CPI-W index data, not a rule. rulespec-us main has no CPI-W series; its COLA modules (e.g. us/statutes/42/1382f/a) take the increase percentage as an input.

Evidence: ~/reviews/cpi-w-nsa/ on the host has the BLS API pulls, the BLS flat-file CPI-W rows, the SSA table rows, the main-vs-BLS table, the rewrite script and the parameter-tree diff.

🤖 Generated with Claude Code

Hub microsimulation impact (current head)

A real microsimulation on the default dataset, main at the merge base 065d0e9560 against this PR's head 9bc56e4707, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.

Output 2025 change 2026 change 2025 records changed (weighted) 2026 records changed (weighted)
social_security +0 +0 0 (0) 0 (0)
ssi +0 +0 0 (0) 0 (0)
taxable_social_security +0 +0 0 (0) 0 (0)
snap +0 +0 0 (0) 0 (0)
state_income_tax +0 +0 0 (0) 0 (0)
income_tax +0 +0 0 (0) 0 (0)
household_net_income +0 +0 0 (0) 0 (0)
household_benefits +0 +0 0 (0) 0 (0)

No record changes in either year, which confirms the parameter-tree comparison above: no formula reads gov.bls.cpi.cpi_w.

Comparison files are in fixes/10133-impact/ on the hub host.

The CPI-W file matched BLS CWUR0000SA0 (not seasonally adjusted, the
series SSA uses for cost-of-living adjustments) through December 2023.
From January 2024 it held seasonally adjusted values: #6672 added
January 2024-August 2025 and #9100 added September 2025-June 2026,
citing CWSR0000SA0. Replace those 29 months with CWUR0000SA0 and
re-anchor the CBO-derived projections on the not seasonally adjusted
June 2026 CPI-W/CPI-U ratio (327.075 / 333.952).

Add a test that the CPI-W July-September averages reproduce
gov.ssa.uprating's actual values under 42 U.S.C. 415(i), which the
seasonally adjusted months failed (2024Q3: 307.931 vs 308.729).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 11, 2026 21:42
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

The CI run on this pull request was cancelled at 23:27Z on 2026-10-11 to free the organization's shared GitHub runners for an urgent fix in another repository. The US + core hub will re-run it automatically (cancelled jobs only; jobs that had passed are kept). Nothing in this pull request changed. Please don't push or reopen just to restart CI.

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.

1 participant