Repository navigation
Conversation
The national-total uprating series under calibration.gov.irs.soi had no values between 2015 and their next year, so each held its 2015 value through the gap. Their per-capita siblings drifted down with population and then jumped, and any input dated in or before the gap was uprated past it by the wrong factor. - Fill every missing year from IRS SOI Publication 1304 Table 1.4 (all returns) or Table 1.4A, using the same column as the series' existing values, and cite each tax year's file. - Correct values keyed to the wrong tax year or misread: partnership and S corporation income at 2022 was the tax-year 2021 total; Social Security at 2021 was the tax-year 2020 total; farm rental income at 2021 subtracted the number of returns with a loss, not the loss. - Restate rounded totals (partnership 2015, rental 2015 and 2021, unemployment 2021) and alimony 2015 exactly. - Replace the short-term capital gains placeholder (a PUF figure and a backcast) with Table 1.4A net short-term capital gain less loss (Schedule D line 7). - 2018 pensions: the 2018 Form 1040 combined IRA distributions with pensions, so SOI has no separate figure; estimate and say how. - Fill gov.ssa.uprating for 2015-2021 with third-quarter CPI-W; 2016 keeps the 2014Q3 level because no COLA was payable. - Guard: every series an input follows has a January 1 value for every year from its first to its last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The long-term capital gains series uses Table 1.4A's net long-term capital gain: returns with a gain, net losses left out. The short-term series netted gains against losses and carryovers, a large negative total that moves against gains (x4.1 from 2021 to 2022, the year gains fell 63%). Use the gain column, so both series measure the same thing and the index stays positive. List the 2018 taxable pension estimate alongside the tax-exempt one in the citation test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
The national-total uprating series under
calibration/gov/irs/soi/had no values between 2015 and their next year (2020, 2021, 2022 or 2023), soparameter(instant)held the 2015 value through the gap. Each series' per-capita sibling (total / population, built bytools/per_capita_uprating.py) therefore drifted down with population across the gap and then jumped, and any dollar input dated in or before the gap was uprated past it by the wrong factor. Employment income per capita, for example:This PR fills every gap with IRS SOI actuals, fixes three existing values that were keyed to the wrong tax year or misread, and adds a guard so a gap can't come back.
gov.ssa.uprating(the Social Security COLA index that veterans' benefits follow) had the same problem for 2016-2021 and is filled with third-quarter CPI-W.Sources and method
Every value comes from IRS SOI Publication 1304, all returns, "All returns, total" row: Table 1.4 (
YYin14ar.xls) for income items, Table 1.4A (YYin14acg.xls) for capital gains. Columns were located by their header labels in each year's file, never by position: the layouts change across years (TY2018 combined IRA distributions with pensions; TY2021 split partnerships from S corporations; TY2022 renamed wages). Each file now cites one reference per tax-year file, per the repo's references rule, and has a header comment naming the column.Each series uses the column its existing values came from. I checked every existing value against the tables first (the CBO AGI series' 2015 value turned out to be tax-year 2013 data, #10114):
Corrections to existing values
Judgment calls (reviewers: please check these)
gov.ssa.uprating2015-2021. On main it starts at 2022 andbackdate_parameterscopies 2022's value back to 2015, so a veterans' benefit dated 2021 got no uprating through 2022 (the 2022 COLA was 5.9%). I checked whether that was intentional: the file never had pre-2022 values on main, and the one attempt to add them (Extend economic uprating parameters to 2100 using SSA Trustees data #6744, which rebased the index) was closed unmerged. The new values are third-quarter CPI-W averages from SSA's published monthly CPI-W, the same method as the existing values. 2016 keeps the 2014Q3 level: 2015Q3 (233.278) fell below 2014Q3 (234.242), so no COLA was payable for 2016 (42 U.S.C. 415(i)). 2016Q3 / 2014Q3 - 1 = 0.35% reproduces the 0.3% COLA for 2017, where comparing with 2015Q3 would give 0.8%.start_instant. It was there because CBO's outlays start in 2022, a year after the old last SOI value. With TY2022 in the file it is the default behaviour, so it is removed.Effect
Full parameter tree (every leaf after system init, before vs after;
dump_params.py/diff_params.pyfrom #10114): 35 parameters change, the 17 SOI totals, their 17 per-capita siblings andgov.ssa.uprating. Nothing else moves, including the SSI amounts and other parameters that uprate bygov.ssa.uprating, and the variable-to-series map is unchanged. Core parameter uprating grows a series from its last authored value, so:gov.ssa.uprating).microcosm-frameuprating_series, base year 2024) uses each total's growth from the base year, so it is unaffected. The SPM threshold paper's uprating analysis covers 2024 to 2025 only. ACA-Calc reads employment income at 2026, which is unchanged. In this repo, the Trustees long-run extension grows each series from its 2036 level, so ratios carry through.Household inputs dated 2015-2022 projected later are what change. Factor to 2025 for an input dated in year Y, old to new (selected; full table in the session notes):
(Unemployment compensation was the worst: the pandemic-year totals were carried forward, so a 2019 input was multiplied by 8.6 by 2025.)
Blast radius
Static scan of all 4,998 YAML files (34,302 cases): an input of a variable that follows a changed series, dated year Y, with an output or case period in a later year T where index(T)/index(Y) changes. No formula requests a later period than the one it runs in (only
last_yearand negative offsets), so dated inputs are the only way these factors reach a test. Two cases match, and neither asserts a value that changes:medicare_cost.yaml"unit test 5 - 2021 data, premium-free":tax_exempt_interest_income2019 to 2021 (factor 0.770 to 0.773), but the input is 0.medicare_irmaa_magi_two_years_prior.yamlCase 5:tax_exempt_interest_incomedated 2015, period 2017, but the variable is read at 2015 (two years prior), so it is never uprated.Instrumented runs (a sitecustomize hook that logs every runtime uprating on a changed series) of the HHS, SSA, IRS and household shards and the uprating Python tests are queued under heavy_run; results to follow.
Tests and invariants
Invariants, each enforced exhaustively over the finite set of series and years (not sampled):
test_series_has_a_january_value_for_every_year, parametrized over_series_that_inputs_follow()). On the parent commit it fails for all 17 SOI series,gov.ssa.upratingand CBO AGI. It subsumes Fill CBO total AGI for 2015-2018 with IRS SOI actuals #10114's CBO-only test.test_soi_series_follows_its_projection_from_its_last_authored_year).test_soi_series_cite_the_table_for_each_tax_year). The long-term gains test now requires one Table 1.4A file per value year.test_soi_corrected_values_hold_their_table_1_4_totals).scripts/series_new.py; the 2018 pension estimates are not table values and were skipped).The new guard fails for
calibration.gov.cbo.income_by_source.adjusted_gross_incomeuntil #10114 merges; this PR rebases after it.Review
Independent review by GPT-6.1 Sol (
subfleet run --task review --tier hard), two rounds:uprate_parameterappends only after the last authored value; variable uprating divides the index at the target by its value at the latest earlier known period). The finding was the short-term capital gains concept (judgment call 1).git diff --stat 03838777 c96ccb7shows exactly the three intended files. policyengine-us-data, which it could not see, is archived and has no reference tocalibration.gov.irs.soiin its tracked Python, YAML or TOML.Remaining condition from the review: merge after #10114.
axiom: n/a: calibration and uprating data, no policy rule
Follow-ups filed separately: CPI-W monthly series switches from not seasonally adjusted to seasonally adjusted values in January 2024; extend the SOI series to tax year 2023 (moves projections, so kept out of this gap fill).
🤖 Generated with Claude Code