Skip to content

Split MFJ pension/SS 50/50 for both-young couples#994

Open
PavelMakarchuk wants to merge 1 commit into
mainfrom
fix-both-young-pension-split
Open

Split MFJ pension/SS 50/50 for both-young couples#994
PavelMakarchuk wants to merge 1 commit into
mainfrom
fix-both-young-pension-split

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Collaborator

Problem

The Microsimulation runner's age-gate allocated household pension and Social Security entirely to the primary filer whenever both spouses were under the elderly-eligibility threshold (_AGE_GATED_SPLIT_AGE = 55). For states whose pension exclusion is age-independent and per-person (e.g. KY $31,110/person, OK $10,000/person), this denied the second spouse's exclusion and overstated state tax.

This is the "exe.py agrees with TAXSIM, cli.py doesn't" pattern in:

  • #965 (KY, both age 45)
  • #966 (OK, both age 45)

Fix

Split 50/50 whenever both spouses are on the same side of the threshold (both qualify or both do not). The mixed-age rule — assign to the older spouse, per the agreements in #774 (pension) and #924 (gssi) — is unchanged.

Verification (NBER taxsimtest binary / TaxAct)

Issue Before After Reference
#965 KY $2,424.45 $1,180.05 binary $1,180.05
#966 OK $3,707.60 $3,232.60 TaxAct $3,232

Cross-state both-young check (pension $40k, both age 45) — no regression:

state binary 50/50 (new) all-primary (old)
DE 758.00 758.00 1,141.75
KY 0.00 0.00 224.80
OK 32.75 32.75 349.75
GA 830.40 830.40 830.40 (invariant)
CO 334.00 336.00 336.00 (invariant)
MD 0.00 1,168.25 1,225.25 (separate MD bug)

MD is off under either allocation due to a separate pre-existing PE-US pension bug, unrelated to this split.

Other changes

  • Updates the two both-young splitting unit tests to assert 50/50.
  • Documents the canonical spousal-allocation rule in CLAUDE.md so it stops being re-litigated.

Full suite: 142 passed.

Closes #965
Closes #966

🤖 Generated with Claude Code

The Microsimulation runner allocated household pension and Social
Security entirely to the primary filer whenever both spouses were under
the elderly-eligibility threshold, denying the second spouse's per-person
state exclusion. For states whose pension exclusion is age-independent
(e.g. KY $31,110/person, OK $10,000/person) this overstated state tax.

Change the age-gate so the income is split 50/50 whenever both spouses
are on the same side of the threshold (both qualify OR both do not); the
mixed-age rule (assign to the older spouse, per taxsim #774/#924) is
unchanged.

Verified against the NBER taxsimtest binary / TaxAct:
  - taxsim #965 (KY): $2,424.45 -> $1,180.05 (binary $1,180.05)
  - taxsim #966 (OK): $3,707.60 -> $3,232.60 (TaxAct $3,232)

Cross-state both-young check (pension $40k, both age 45) confirms no
regression: DE/KY/OK now match the binary, GA/CO are allocation-
invariant. (MD is off under either allocation due to a separate PE-US
pension bug, unrelated to this split.)

Updates the two both-young splitting unit tests to assert 50/50 and
documents the canonical spousal-allocation rule in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-taxsim Ready Ready Preview, Comment Jun 16, 2026 4:57am

Request Review

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.

OK 2025 sngl 25Kpwages 10Kswages 766Kpensions 1depx 5age1 KY sep/comb 2025 25Kpwages 10Kswages 66Kpensions

1 participant