Add refundable credit conversion contrib reform#8219
Draft
DTrim99 wants to merge 1 commit intoPolicyEngine:mainfrom
Draft
Add refundable credit conversion contrib reform#8219DTrim99 wants to merge 1 commit intoPolicyEngine:mainfrom
DTrim99 wants to merge 1 commit intoPolicyEngine:mainfrom
Conversation
Adds gov.contrib.refundable_credit_conversion: a configurable Python reform that swaps the federal CTC, CDCC, EITC, standard deduction, itemized deductions, above-the-line deductions, and Head of Household filing status for a flat refundable credit (per-taxpayer, per-dependent, per-household, and wage-credit components). Repeal is performed at the federal computation level only: - standard_deduction, itemized_taxable_income_deductions, above_the_line_deductions, and head_of_household_eligible are overridden to early-return 0 / False when their respective repeal toggle is on. - income_tax_refundable_credits and income_tax_non_refundable_credits are overridden to filter the repealed credit names (eitc, refundable_ctc, non_refundable_ctc, cdcc) out of the federal credit lists, while the underlying eitc / ctc / cdcc variables continue to compute their baseline values so state programs that read them stay intact (mirrors the ECPA pattern from PR PolicyEngine#6831). Parameters under gov.contrib.refundable_credit_conversion: - in_effect (bool gate) - repeals.{itemized, standard_deduction, head_of_household, above_the_line_deductions, ctc, cdcc, eitc} (bool toggles) - credit.{per_taxpayer, per_dependent, per_household} (currency-USD) - credit.dependent_definition (int: 0=EITC child, 1=CTC child, 2=all dependents) - wage_credit.{rate (/1), cap (currency-USD)} (per-wage-earner) Includes YAML tests for flat credit math, individual repeal toggles, the dependent definition selector, the per-earner wage credit, and end-to-end integration. Co-Authored-By: Claude Opus 4.7 (1M context) <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
Adds a new structural contrib reform
gov.contrib.refundable_credit_conversionthat swaps the federal standard deduction, itemized deductions, above-the-line deductions, Head of Household filing status, CTC, CDCC, and EITC for a flat refundable credit composed of per-taxpayer, per-dependent, per-household, and wage-credit components. Each repeal is toggleable independently.The reform mirrors the ECPA pattern (PR #6831) so that repeals only affect the federal computation; the underlying
eitc,ctc,cdcc,standard_deduction,itemized_taxable_income_deductions,above_the_line_deductions, andhead_of_household_eligiblevariables continue to compute their baseline values for state programs to reference.Implementation
New parameters under
gov.contrib.refundable_credit_conversion/:in_effect.yaml— bool gate for the structural reform.repeals/{itemized, standard_deduction, head_of_household, above_the_line_deductions, ctc, cdcc, eitc}.yaml— bool toggles, default false.credit/{per_taxpayer, per_dependent, per_household}.yaml— currency-USD, default 0.credit/dependent_definition.yaml— int (0 = EITC-qualifying child, 1 = CTC-qualifying child, 2 = all claimed dependents).wage_credit/{rate, cap}.yaml—/1rate and currency-USD per-worker cap.Reform Python at
policyengine_us/reforms/refundable_credit_conversion/refundable_credit_conversion.py:flat_refundable_credit(TaxUnit) variable computestaxpayers * per_taxpayer + dependents * per_dependent + per_household + sum_over_persons(min(earned_income, cap) * rate).standard_deduction,itemized_taxable_income_deductions,above_the_line_deductions, andhead_of_household_eligibleare overridden to early-return 0 / False when their repeal toggle is on, and otherwise reproduce the baseline formula.income_tax_refundable_creditsandincome_tax_non_refundable_creditsare overridden to filtereitc,refundable_ctc,non_refundable_ctc, andcdccout of the federal credit lists when their toggle is on, then appendflat_refundable_creditto the refundable list.create_refundable_credit_conversion_reformis registered inpolicyengine_us/reforms/reforms.pyfollowing the streamlined-EITC and ECPA gating pattern (5-yearin_effectlookahead).Tests at
policyengine_us/tests/policy/contrib/refundable_credit_conversion/:flat_credit.yaml— credit math for single, MFJ, and MFJ-with-dependents shapes.repeals.yaml— one assertion per repeal toggle.dependent_definition.yaml— three cases switching the integer enum.wage_credit.yaml— per-wage-earner cap arithmetic.integration.yaml— full reform with all toggles on.Test plan
make formatpolicyengine-core test policyengine_us/tests/policy/contrib/refundable_credit_conversion/ -c policyengine_uspytest policyengine_us/tests/microsimulation/test_microsim.py(regression)🤖 Generated with Claude Code