Fix WATCA alternative maximum tax implementation#7773
Fix WATCA alternative maximum tax implementation#7773DTrim99 wants to merge 13 commits intoPolicyEngine:mainfrom
Conversation
Updates WATCA to match Yale Budget Lab analysis: - Change from deduction to alternative maximum tax cap mechanism - Tax liability capped at 25.5% of MAGI above cost-of-living exemption - Binary eligibility at 175% of exemption (not gradual phase-out) - Add inflation indexing to millionaire surtax brackets Closes PolicyEngine#7772 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implementation DetailsKey Changes
New Variables
Removed Variables
Parameter Changes
Note on Surtax Bracket RoundingThe $50,000 rounding interval for surtax bracket uprating is an assumption - the actual bill text has not been released yet. This can be refined when official text is available. |
- Change uprating from chained CPI to CPI-U (Section 1A(c)(2) and 59B(b)) - Remove rounding (not specified in bill) - Update references to actual bill text Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All parameters and reform now reference the official bill text PDF. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add watca_alternative_tax_magi: AGI + foreign income exclusions + non-taxable SS (Section 1A(d)) - Add watca_surtax_magi: AGI - investment interest deduction (Section 59B(d)) - Add dependent exclusion: exclude those claimed on another return (Section 1A(b)(2)) - Update all variables to use proper MAGI definitions - Add tests for MAGI calculations and dependent exclusion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All Bill Provisions Now ImplementedUpdated to implement the full bill text: Section 1A - Alternative Maximum Tax
Section 59B - Millionaire Surtax
Not Implemented
These edge cases affect very few filers and can be added later if needed. |
Use employment_income instead of adjusted_gross_income with explicit entities. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| @@ -0,0 +1 @@ | |||
| Fix WATCA alternative maximum tax implementation to match Yale Budget Lab analysis: use 25.5%% tax cap on MAGI above exemption instead of deduction, implement binary eligibility at 175%% threshold, and add inflation indexing to millionaire surtax brackets. | |||
There was a problem hiding this comment.
| Fix WATCA alternative maximum tax implementation to match Yale Budget Lab analysis: use 25.5%% tax cap on MAGI above exemption instead of deduction, implement binary eligibility at 175%% threshold, and add inflation indexing to millionaire surtax brackets. | |
| Fix WATCA alternative maximum tax implementation to match bill text use 25.5%% tax cap on MAGI above exemption instead of deduction, implement binary eligibility at 175%% threshold, and add inflation indexing to millionaire surtax brackets. |
| def formula(tax_unit, period, parameters): | ||
| agi = tax_unit("adjusted_gross_income", period) | ||
| investment_interest = add(tax_unit, period, ["investment_interest_expense"]) | ||
| return agi - investment_interest |
|
|
||
| def formula(tax_unit, period, parameters): | ||
| agi = tax_unit("adjusted_gross_income", period) | ||
| foreign_earned_income = tax_unit("foreign_earned_income_exclusion", period) |
- Use adds list for watca_alternative_tax_magi instead of manual formula - Cap watca_surtax_magi at 0 to prevent negative values - Fix changelog: reference bill text instead of Yale Budget Lab, fix %% escaping Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Program Review: WATCA Alternative Maximum Tax (PR #7773)Source Documents
Critical (Must Fix)
Should Address
Suggestions
PDF Audit Summary
Confirmed values: 25.5% rate, $46K/$64.4K/$92K exemptions, 175% threshold, $1M/$2M/$5M single surtax brackets (5%/10%/12%), $1.5M/$3M/$7.5M joint surtax brackets (derived), 2026-01-01 effective date, CPI-U indexing. Mismatches: (1) gross vs. allowed investment interest deduction, (2) surtax uprating may apply to 2026 when bill fixes values for that year, (3) cost-of-living exemption uprating base year anchor is implicit. Unmodeled: (1) dependent exclusion uses approximation, (2) foreign resident threshold reduction (Sec 59B(e)(1)), (3) charitable trust exemption, (4) surtax not treated as chapter 1 tax for credits, (5) surviving spouse / separate filer exemptions are assumed (reasonable). Validation Summary
Review Severity: REQUEST_CHANGESRationale: The unused Next StepsTo auto-fix issues: Priority fixes:
|
…ument proxy - Remove unused `instant` import (lint failure) - Add comment documenting investment_interest_expense as proxy for Sec 163(d) deduction - Add 3 integration tests for income_tax_before_credits convergence point Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The eligible filer test now asserts income_tax_before_credits = 3,570, verifying the alternative max tax cap flows through the full pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change surtax descriptions from "adjusted gross income" to "modified AGI" - Add #page=XX anchors to all PDF reference URLs - Simplify alternative_tax_rate description to one sentence - Add blank line before values: in income_limit_multiple Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Top-level uprating on marginal_rate parameters incorrectly inflates both thresholds AND rates. The 5%/10%/12% surtax rates were being uprated to 5.13%/10.26%/12.31% in 2027. Removing uprating keeps rates fixed, matching the CRFB surtax pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 new tests covering all previously untested code paths: - Eligibility: JOINT/HOH exact thresholds, SEPARATE, SURVIVING_SPOUSE - Alt max tax: HOH, SEPARATE, SURVIVING_SPOUSE, joint below exemption - Surtax: 12% bracket, $1M boundary, HOH uses single brackets, joint below $1.5M - MAGI: specified_possession_income, puerto_rico_income components - Surtax MAGI: floor at zero when investment interest > AGI - Dependent: spouse_is_dependent_elsewhere - Toggle: surtax.in_effect=false disables surtax in tax calculation Total: 41 tests (was 22) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Program Review: PR #7773 -- Fix WATCA Alternative Maximum Tax ImplementationSource Documents
Critical (Must Fix)
Should Address
Suggestions
PDF Audit Summary
Details on unmodeled items: Surtax threshold uprating (critical, see #1 above), surtax creditability (critical, see #2 above), investment interest deduction specifics, estate/trust provision, foreign-income threshold adjustment, charitable trust exemption, SURVIVING_SPOUSE/SEPARATE extrapolations, Sec 15 inapplicability, and two MAGI proxy variable mappings (sec 931/933 and sec 86(d)) that need verification. Validation Summary
Review Severity: COMMENTRationale: The core implementation is substantially correct -- all 11 audited parameter values match the bill text exactly, the bracket structures and MAGI definitions are faithful to the statute, and 33 tests provide solid coverage across all filing statuses and bracket ranges. The most significant issue (missing surtax CPI-U uprating) is a concrete omission that should be fixed but is non-blocking for 2026 analysis (it only affects years after 2026). The surtax creditability issue (Sec 59B(e)(3)) is a known architectural limitation requiring broader design discussion. The missing Next StepsTo auto-fix issues: |
…ge case tests - Add reference metadata to both in_effect.yaml files (Sec 2(c), 3(d)) - Document surtax threshold CPI-U indexing as known limitation in bracket files - Document surtax creditability (Sec 59B(e)(3)) as known architectural limitation - Document surviving spouse/separate filing status interpretive assumptions - Add comment explaining in_effect gating asymmetry - Fix changelog to remove false claim about surtax indexing - Add 6 edge case tests: zero income, negative AGI, MAGI pushing over eligibility, investment interest eliminating surtax, combined add-backs, both dependents Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use per-threshold metadata uprating (following ND/WI/VT pattern) to index surtax dollar thresholds by CPI-U without inflating rates. Thresholds now adjust for inflation after 2026 as required by the bill. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Fixes the WATCA (Working Americans' Tax Cut Act) implementation to match the Yale Budget Lab analysis:
Yale Budget Lab Description
Closes #7772
Test plan
🤖 Generated with Claude Code