Commit 97735f0
authored
Fix EITC calibration bugs: 2-kid bucket, surviving-spouse mask, validation reference, stale SOI targets (#767)
1. EITC by-kids 2-kid bucket
The EITC-by-kids calibration in `build_loss_matrix` treated IRS SOI
rows 2 and 3 as nested (`>=`) when the source data is actually
exclusive per IRS Pub 1304 Table 2.5 (0, 1, 2, "3 or more"). The
2-kid bucket double-counted with the 3+ bucket, leaving the
calibrator no pressure on exact-2-kid EITC recipients and causing
a 27% aggregate undercount ($49B vs $67B Treasury target for TY2024).
Changing `<2` to `<3` makes rows 0/1/2 exact-match and leaves row 3
as `>=` (correct, since EITC caps qualifying children at 3).
2. SURVIVING_SPOUSE mask
The SOI loop masked the IRS "Married Filing Jointly/Surviving Spouse"
row to only PE's JOINT filing status, orphaning ~1.58M surviving-
spouse tax units (0.8% of total) from joint-filer AGI-band targets.
Fix matches both JOINT and SURVIVING_SPOUSE via `np.isin`, consistent
with `soi.py:302-303` and `ctc_diagnostics.py:19-20`.
3. EITC validation reference
`validate_national_h5.py` used `~$60B` as the sanity reference for
EITC, but the 2024 Treasury Tax Expenditure target is $67B.
Tightened so an underconverged calibration is less likely to
silently pass validation.
4. Stale SOI filer-count targets
SOI_FILER_COUNTS_2015 was a hardcoded dict of 7 TY2015 AGI-band
counts, uprated only by population growth. Replaced with a dynamic
read from `soi_targets.csv` at the latest SOI year ≤ calibration
year (currently TY2023, 19 granular bands). Population-only
uprating missed dramatic 2015→2023 distributional shifts: +64%
at the $100K+ band and −27% at $0–5K.
Fixes #766, #769.1 parent 0745788 commit 97735f0
3 files changed
Lines changed: 35 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
| 431 | + | |
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
603 | 606 | | |
604 | 607 | | |
605 | 608 | | |
| |||
627 | 630 | | |
628 | 631 | | |
629 | 632 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
643 | 651 | | |
644 | | - | |
645 | 652 | | |
646 | 653 | | |
647 | 654 | | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
652 | 658 | | |
653 | 659 | | |
654 | 660 | | |
655 | 661 | | |
656 | 662 | | |
657 | 663 | | |
658 | 664 | | |
659 | | - | |
660 | | - | |
661 | | - | |
| 665 | + | |
662 | 666 | | |
663 | 667 | | |
664 | 668 | | |
| |||
0 commit comments