Skip to content

Split capital loss carryover inputs into own and estate-or-trust leaves - #10211

Draft
MaxGhenis wants to merge 8 commits into
mainfrom
split-capital-loss-carryover-k1
Draft

MaxGhenis wants to merge 8 commits into
mainfrom
split-capital-loss-carryover-k1

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10021

Agent-written for Max, by a Codex cloud task and Claude Code for Max Ghenis; no person has reviewed it yet.

Split the long- and short-term capital loss carryover inputs into the person's own losses and losses received from a terminated estate or trust. Final Form 1041 Schedule K-1 box 11 uses code D for long-term losses and code C for short-term losses. This follows up on #9762.

Keep each person's carryover when a household mixes legacy totals and split inputs. Arizona Form 140PTC line D restores both terms before applying the $1,500 loss limit per household member.

axiom: needed

Migration

Before, enter the long-term carryover as a single amount in long_term_capital_loss_carryover.

After, use own_long_term_capital_loss_carryover and estate_or_trust_long_term_capital_loss_carryover to record the two origins. Use the corresponding own_short_term_capital_loss_carryover and estate_or_trust_short_term_capital_loss_carryover fields for short-term amounts. Continue to enter gains net of carryovers as reported on Schedule D lines 7 and 15.

PolicyEngine US continues to project legacy totals as the person's own carryover. A simulation built directly with PolicyEngine Core applies a legacy total only to its own person and year; use the split inputs to project carryovers there.

Test plan

  • Run the federal, Arizona, and dependent state household YAML files on the fixed branch and on a merge with main.
  • Verify mixed-person inputs, year-to-year projection, explicit zeros, and the Arizona loss limit.
  • Run the worksheet property tests and dataset-series metadata checks.
  • Verify that reverting each fix triggers its regression check.

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 13, 2026 15:05
long_term_capital_loss_carryover bundled a person's own carryover
(Schedule D line 14) with a terminating estate or trust's unused loss
passed through on the final Schedule K-1 (Form 1041), box 11, code D,
which 26 U.S.C. 642(h)(1) and Reg. 1.642(h)-1(a) allow to the
beneficiary. It now adds two leaf inputs:
own_long_term_capital_loss_carryover and
estate_or_trust_long_term_capital_loss_carryover. The K-1 has a
short-term counterpart (box 11, code C, Schedule D line 5), so
short_term_capital_loss_carryover adds the matching short-term leaves.

An amount entered as the sum is still used for that year, and the
microdata uprating overrides keep a dataset column holding either sum
on the series its leaves follow. Arizona's property tax credit adds the
short-term memo back on line D, as ITR 12-1 item (7) requires and as it
already does for the long-term one; d1107 keeps estate or trust losses
in that addback.

Fixes #10021

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1 on #10211:

- A sum entered for a simulation now becomes the person's own carryover
  when a Simulation or Microsimulation is built, as employment_income
  becomes employment_income_before_lsr. Core does not uprate a variable
  that adds others, so a 2024 sum read for 2026 (in a situation, or a
  dataset loaded by Core's variable-centric loader) would otherwise have
  dropped to zero. A sum entered for one person also zeroed every other
  person's leaves in that simulation; it no longer does.
- The sums cite 26 U.S.C. 642(h)(1) for the estate or trust part. Their
  references now follow the repo's page rules and cite the Schedule K-1
  (Form 1041) instructions.
- short_term_capital_gains and long_term_capital_gains now say they are
  Schedule D lines 7 and 15, net of the carryover the memo records.
- Arizona's code C add-back is marked as pending Max's confirmation
  (d1512); d1107 ruled on code D.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These six files held uncommitted changes from October 13. This commit
saves them as they stood. They have not been run or reviewed since.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
MaxGhenis and others added 5 commits November 30, 2026 12:20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
File aggregate inputs in year order and distinguish omitted amounts from explicit zeros. Route later writes to the same carryover inputs and refresh calculated results. Document direct Core projections and cover the Arizona addback for both terms.

Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

Split long-term capital-loss carryover inputs by loss origin

1 participant