Skip to content

Cover exported income inputs in PUF top-tail guard#169

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/puf-top-tail-actual-agi-20260602
Jun 2, 2026
Merged

Cover exported income inputs in PUF top-tail guard#169
MaxGhenis merged 1 commit into
mainfrom
codex/puf-top-tail-actual-agi-20260602

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • extend the PUF support-clone top-tail rough AGI proxy to count exported/formula input aliases that appear in the final H5, including employment_income_before_lsr, self_employment_income_before_lsr, disaggregated pension fields, and Social Security components
  • keep scaling limited to PUF-imputed investment/business components, so CPS wage/support fields remain fixed while the top-tail component is reduced enough to keep rough AGI below the open-ended SOI bin
  • add a regression test matching the failed post-Prefer capital gains components in PUF top-tail guard #168 H5 shape: exported LTCG alias plus employment_income_before_lsr and pension/Social Security inputs

Evidence

The post-#168 rebuild still missed state/MD/adjusted_gross_income/amount/1000000_inf:

  • MP latest-local loss: 1.2587150824491427
  • eCPS latest-local loss: 0.7685371816961414
  • largest target delta: state/MD/adjusted_gross_income/amount/1000000_inf, candidate estimate 0.6467862826845676 vs target 0.01419332389429203

A row-level check of the final H5 found the remaining Maryland top-tail tax unit at rough AGI about $79.069M: exported LTCG alias around $78.858M plus employment_income_before_lsr around $178k. The guard had capped the capital-gains component, but its rough AGI proxy did not count the exported LSR/base income fields used in the final dataset shape.

Validation

  • uv run ruff check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py
  • uv run ruff format --check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py
  • uv run --extra dev python -m pytest tests/pipelines/test_us.py -k 'puf_support_clone_top_tail_guard'
  • uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/pipelines/test_us.py (180 passed, expected warnings only)

@MaxGhenis MaxGhenis merged commit 940016a into main Jun 2, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/puf-top-tail-actual-agi-20260602 branch June 2, 2026 08:52
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