Skip to content

Net spouses' self-employment losses in state EITC helper earned income (IL, CO, DC, IN) - #9820

Open
PavelMakarchuk wants to merge 3 commits into
mainfrom
state-eitc-helper-earned-income
Open

PavelMakarchuk wants to merge 3 commits into
mainfrom
state-eitc-helper-earned-income

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Collaborator

Fixes #9819.

Change

  • calculate_eitc_amount_from_parameters (policyengine_us/tools/state_eitc_helpers.py) now uses eitc_earned_income instead of filer_adjusted_earnings. This is the same earned income as the federal eitc_phased_in and eitc_reduction (Fix EITC earned income self-employment netting #8337). It combines both spouses' wages and net self-employment earnings and floors only the total, per Form 1040 EIC Worksheet B.
  • The Indiana decoupled branch of in_eitc (2011–2022) gets the same change.

The helper feeds il_eitc, co_eitc (ITIN and under-25 paths), dc_eitc_with_qualifying_child and in_eitc_eligible. The Washington credit imports other helper functions, not this one.

Tests

  • Four existing cases set filer_adjusted_earnings as an input. They now set eitc_earned_income with the same value and keep the same outputs.
  • Seven new cases have a joint return where one spouse has a self-employment loss. The expected values are TAXSIM-35 outputs for the same households (v39):
Test Year Expected TAXSIM v39
IL, 2 children, wages 10,000, spouse SE −4,000 2021 432 432
same 2023 480 480
IL 65+ couple, wages 7,000, SE −2,000 2023 76.50 76.50
CO under-25 couple, no children, wages 10,000, SE −4,000 2023 229.50 229.50
DC, 1 child, wages 10,000, SE −4,000 2023 1,428 1,428
IN, 2 children, wages 10,000, SE −4,000 2022 240 240
same 2021 216 216

Before this change, PE gave 720, 800, 107.10, 300, 2,380, 400 and 360.

Local runs: the IL, CO credit, DC, IN, WA and federal EITC test folders pass (2,218 tests).

Census effect

In the TAXSIM-35 census comparison for IL, CO, DC and IN (2021–2025), 15 household-years change, 12 now match TAXSIM, and none that matched before stop matching. The other 3 are 2021 Illinois households that still differ by the Illinois rebate.

🤖 Generated with Claude Code

The shared state EITC helper and the Indiana decoupled branch used
filer_adjusted_earnings, which floors each spouse at zero. The federal
eitc uses eitc_earned_income (#8337), which combines both spouses'
amounts per Form 1040 EIC Worksheet B. Fixes #9819.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (6232ba0).
⚠️ Report is 311 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9820   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         1    -3     
  Lines           76        40   -36     
  Branches         2         3    +1     
=========================================
- Hits            76        40   -36     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 03e3718. No calculation defect found in the static review: netting both spouses' wages and self-employment earnings before flooring the tax-unit total matches the IRS EIC Worksheet B treatment. I traced the helper's Illinois, Colorado, DC and Indiana callers, including Indiana's separate 2011–2022 calculation.

  • Please add the required axiom: parity declaration to the PR description, following CLAUDE.md's Axiom Parity section.
  • Optional regression coverage: add a spousal self-employment loss case in the state-credit phase-out range. The new cases primarily exercise phase-in and maximum-credit behavior.

Verification limits: I did not independently run the tests. All 37 check runs on this commit are successful as of October 6, 02:40 UTC. The source audit is partial: IRS and DC material was accessible, but some historical Illinois, Colorado and Indiana primary documents could not be retrieved.

PavelMakarchuk and others added 2 commits October 8, 2026 09:25
Both sides appended test cases to co_eitc.yaml and il_eitc.yaml; keep
both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…out range

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PavelMakarchuk

Copy link
Copy Markdown
Collaborator Author

Thanks. Merged main (both sides had appended cases to co_eitc.yaml and il_eitc.yaml; kept both) and added the phase-out range case you suggested:

  • Illinois 2023, joint, two children, head wages 40,000, spouse self-employment loss 5,000. Earned income and AGI are 35,000, above the 28,120 joint phase-out start (Rev. Proc. 2022-38, section 3.06). Federal EITC 6,604 − 0.2106 × 6,880 = 5,155.07; IL EIC 20% = 1,031.01. Without netting the old helper gives 820.41 (earned income 40,000). It fails on main and passes here.

The IL, CO, DC and IN tests pass (2,442). I will add the axiom: line separately.

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.

State EITC helper floors each spouse's earnings at zero instead of netting self-employment losses (IL, CO, DC, IN)

2 participants