Skip to content

Drop prior-year ASEC earnings lookback; fall back to current earnings#204

Merged
MaxGhenis merged 1 commit into
mainfrom
claude/drop-prior-year-lookback
Jun 3, 2026
Merged

Drop prior-year ASEC earnings lookback; fall back to current earnings#204
MaxGhenis merged 1 commit into
mainfrom
claude/drop-prior-year-lookback

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Drop the prior-year ASEC earnings lookback and fall back to current-year earnings.

The EITC/CTC prior-year-earnings election (the COVID-era "lookback") expired after 2021, so employment_income_last_year, self_employment_income_last_year, and previous_year_income_available feed no live PolicyEngine-US formula. They were recently added (export population) by loading and PERIDNUM-panel-joining the prior ASEC — an extra survey-year dependency that only covered the ~50% rotation overlap, churned the processed-cache version, and would require the build to fetch ASEC year-1 in addition to the spine year.

Changes

  • Remove _load_previous_cps_asec_persons_raw and the panel-join in _attach_previous_year_income.
  • _attach_previous_year_income now sets *_income_last_year to current-year earnings (WSAL_VAL / SEMP_VAL), and previous_year_income_available to whether the row has any earnings — keeping the three export columns populated and varying (no support-gate regression) without the prior ASEC.
  • Bump CPS_ASEC_PROCESSED_CACHE_VERSION (logic changed).

These are placeholders to remove entirely once the export contract no longer requires the columns.

Blast radius

_load_previous_cps_asec_persons_raw and the 3-arg _attach_previous_year_income had a single call site each (both in cps.py); no other references. Removes the ASEC year-1 download/parse from load_cps_asec.

Tests

  • Replaced test_load_cps_asec_attaches_previous_year_income_from_prior_asec with test_load_cps_asec_falls_back_last_year_income_to_current_earnings (last-year income == current WSAL_VAL/SEMP_VAL; available == has-earnings). Passes.
  • The 2 unrelated local failures in test_cps_source_provider.py (…repeat_loads_are_deterministic…, …ssn_card_type…) are pre-existing on origin/main — they need raw CPS ASEC data / a fixture predating the export-support columns, not affected by this change.

Context: #200 (post-collapse calibration/target fixes). Surfaced while auditing why a prior-year ASEC was being loaded.

The EITC/CTC prior-year-earnings election (the COVID-era "lookback") expired
after 2021, so employment_income_last_year / self_employment_income_last_year
/ previous_year_income_available feed no live PolicyEngine-US formula.

Remove the prior-ASEC load + PERIDNUM panel-join (an extra survey-year
dependency that only covered the ~50% rotation overlap) and set last-year
income to current-year earnings (WSAL_VAL / SEMP_VAL) as a placeholder.
previous_year_income_available now tracks whether the row has any earnings,
keeping the export columns populated/varying until they are removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis marked this pull request as ready for review June 3, 2026 20:02
@MaxGhenis MaxGhenis merged commit 758b339 into main Jun 3, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the claude/drop-prior-year-lookback branch June 3, 2026 23:19
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