Skip to content

Split the Schedule D route of capital gain distributions out of long-term gains (US)#282

Open
MaxGhenis wants to merge 1 commit into
mainfrom
us-capital-gain-distributions
Open

Split the Schedule D route of capital gain distributions out of long-term gains (US)#282
MaxGhenis wants to merge 1 commit into
mainfrom
us-capital-gain-distributions

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Part of #274. Engine-side variable: PolicyEngine/policyengine-us#8850 (the column this stage fills). Companion engine fix: PolicyEngine/policyengine-us#8839.

What

Adds a capital_gain_distributions US source stage (after puf_tax_detail) producing schedule_d_capital_gain_distributions — the Schedule D line 13 route of capital gain distributions, as a memo component of long-term gains. This is the column that lets reforms treating fund distributions differently from other realized gains (the GROWTH Act, H.R. 2089 / S. 1839) act on the data.

The data reality that shapes the design

The IRS publishes no by-AGI series for capital gain distributions. The Sales of Capital Assets study (latest: TY2015; discontinued since) reports a standalone CGD line only nationally — its by-AGI cross-tab merges CGD into "Other asset types." The only AGI-resolved CGD series anywhere (Pub 1304 Table 1.4) covers only the direct-1040 route (E01100 = non_sch_d_capital_gains, already a PUF-stage output), ~15% of the dollars.

So v1 is deliberately deterministic and proportional — no fabricated band parameters:

  • Anchor (TY2015, re-derived at resource load): SOCA all-route CGD $79.62B − direct-route $11.56B = $68.05B Schedule-D route, over LT net gains ex-direct $690.71B → share 9.85%.
  • Eligibility is structural: positive long_term_capital_gains_before_response and no direct-route distributions — the two reporting routes are mutually exclusive on a real return (this also prevents the impossible-overlap class flagged in Impute the Schedule-D-routed share of capital gain distributions within long_term_capital_gains (US) #274 from propagating into the new column).
  • The packaged resource ships the by-AGI tables that do exist (direct-route TY2015/TY2022/TY2023; the "other assets" LT-gain envelope) plus caveats, so a banded/participation v2 has its data in-repo.

Pieces

  • split_component_by_share manifest operation kind (allowlisted) + US runtime handler with strict parameter/column validation (unknown params, unknown resource/share-field, overwrite, missing columns all refuse).
  • us/soca_capital_gain_distribution_shares.json resource — generated programmatically from the downloaded SOI tables, never hand-transcribed; anchor arithmetic re-derived and refused on drift at every load.
  • Stage entry in source_stages.json + donor citation in US_DONORS + stage order.
  • 8 tests: anchor re-derivation, manifest-driven stage run (proportional split, zero/negative gains, route exclusivity, source column untouched, bound by source, exact national reconstruction), and the refusal suite.

packages/populace-build: 694 passed, 6 skipped; ruff clean.

Documented follow-ups (in the resource caveats)

Participation margin and AGI-band tilt (no published series pins them); year-specific levels via the ICI Fact Book Table 30 paid/reinvested series; the RIC vs REIT split (Schedule D line 13 includes REIT capital gain dividends, which the GROWTH Act does not cover) — sourced series for both now attached to #274.

🤖 Generated with Claude Code

Adds a capital_gain_distributions US source stage producing
schedule_d_capital_gain_distributions as a memo component of long-term
gains. No by-AGI CGD series exists in published SOI data (the SOCA
study reports distributions only nationally and merges them into
'Other asset types' in its AGI cross-tab), so the v1 split applies the
national Schedule-D share of LT net gains — $68.1B over $690.7B
(TY2015, 9.85%) — proportionally within eligible records. Records
with direct-route distributions (non_sch_d_capital_gains, PUF E01100)
are excluded: the two reporting routes are mutually exclusive on a
real return.

New split_component_by_share manifest operation kind + US handler; the
packaged resource carries the anchor arithmetic (re-derived at load),
the by-AGI tables that do exist (direct-route TY2015/22/23, the
'other assets' envelope), and documented follow-ups (participation
margin, AGI tilt, year-specific ICI levels, RIC/REIT split).

Part of #274. Engine-side variable: PolicyEngine/policyengine-us#8850.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant