Use loss-limited net capital gain in Delaware pension exclusion basket#8852
Open
PavelMakarchuk wants to merge 2 commits into
Open
Use loss-limited net capital gain in Delaware pension exclusion basket#8852PavelMakarchuk wants to merge 2 commits into
PavelMakarchuk wants to merge 2 commits into
Conversation
The Delaware pension exclusion eligible-retirement-income basket summed the raw, unlimited capital_gains variable. A large capital loss could therefore drive each spouse's basket sharply negative and clamp the exclusion to $0, even with ample eligible interest/dividends/pensions. Delaware taxable income begins with federal AGI, where IRC 1211(b) caps a joint filer's deductible net capital loss at -$3,000. PIT-RES Line 6 counts "capital gains net of capital losses" as it appears on the return, i.e. the federally loss-limited figure. Swap capital_gains for the person-level loss_limited_net_capital_gains_person. Fixes #8836. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI requires the newly-added fragment to be a flat changelog.d/<name>.<type>.md file, not a changelog.d/fixed/<n>.md subdirectory path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Delaware pension exclusion eligible-retirement-income basket
(
de_pension_exclusion_income, viagov.states.de.tax.income.subtractions.exclusions.pension.income_sources)summed the raw, unlimited
capital_gainsvariable (short-term + long-termnet, with no loss limit). A large capital loss flowed in at full magnitude,
drove each spouse's basket sharply negative, and
min(cap, max(0, eligible_income))in
de_pension_exclusionthen clamped the whole exclusion to $0 — even for a60+ filer with far more than $12,500 of otherwise-eligible interest/dividends/pensions.
This PR replaces
capital_gainswith the person-level, federally loss-limitedvariable
loss_limited_net_capital_gains_person.Why raw capital gains is wrong here
Delaware taxable income begins with federal AGI. By IRC § 1211(b) a joint
filer's deductible net capital loss is capped at −$3,000/year (excess carries
forward), so no Delaware PIT-RES return ever reflects a multi-million-dollar loss.
The 2025 Form PIT-RES, Line 6 pension-exclusion worksheet defines eligible
retirement income to include "capital gains net of capital losses" — the figure
as it appears on the return, i.e. the federal Schedule D loss-limited net, not the
raw unlimited sum of transactions. Delaware does not decouple from the § 1211 limit.
A capital loss can therefore reduce the basket by at most $3,000 and cannot wipe out
an otherwise-eligible balance exceeding $12,500.
Statutory / form basis:
eligible retirement income (dividends, capital gains, interest, rental income,
qualified plans).
PR #8502 (issue #8501) fixed only the bleed of a negative exclusion into other DE
subtractions; it left the raw, unlimited
capital_gainsin the basket. This PRaddresses that residual.
Impact (originating TAXSIM case, out2psl/916)
DE joint, primary age 75, spouse age 40, TY 2025: ~$85,793 interest, a large net
capital loss, spouse $10,000 wages.
§ 1211 limits the joint net capital loss to −$3,000, so the basket
(≈$85,793 interest − $3,000) is well above the $12,500 cap and the filer keeps the
full exclusion.
Tests
de_pension_exclusion.yamltest that encoded the buggy$0 behavior from a raw −$1.4M loss (a loss that cannot appear on a DE return) to
the loss-limited treatment (full $12,500 exclusion).
above the cap →
de_pension_exclusion: [12_500, 0].policyengine-core test .../de_pension_exclusion.yaml -c policyengine_us: 8 passed.Originating TAXSIM issue: PolicyEngine/policyengine-taxsim#916
Fixes #8836.
🤖 Generated with Claude Code