Repository navigation
Add taxsim_v17, TAXSIM-35's itemized deductions in taxable income - #10012
PavelMakarchuk wants to merge 1 commit into
Conversation
TAXSIM-35 v17 is 'Itemized Deductions in taxable income', 0 for a filer who takes the standard deduction. The emulator maps v17 to itemized_taxable_income_deductions, the potential amount, which differs from TAXSIM in 12,308 of 15,000 CPS comparison records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10012 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 1 -3
Lines 76 13 -63
Branches 2 0 -2
=========================================
- Hits 76 13 -63
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hua7450
left a comment
There was a problem hiding this comment.
Approving. Read the three files at a91813c plus itemized_taxable_income_deductions, total_itemized_taxable_income_deductions, itemized_taxable_income_deductions_reduction, tax_unit_itemizes and taxable_income_deductions_if_itemizing, and the sibling taxsim_v* variables for conventions.
where(tax_unit_itemizes, itemized_taxable_income_deductions, 0) is the right alias: TAXSIM-35 lists v17 only as "Itemized Deductions in taxable income", and running the executable confirms it is 0 for standard-deduction filers and net of the section 68 phaseout (2017: v16 = 7,155, v17 = 42,845 on 50,000 of itemizable deductions), so the post-reduction Schedule A amount is the match, not taxable_income_deductions_if_itemizing, which also carries QBI and the 2025 Schedule 1-A items that sit on Form 1040 line 13, not line 12. Both 2024 Texas cases recompute: 7,000 under the 14,600 standard deduction gives 0, and 30,000 + 8,000 (SALT under the 10,000 cap) gives 38,000, matching the TAXSIM-35 build at state 0. Entity, period, unit, changelog fragment and the axiom: n/a line follow the folder's conventions; CI is green.
Nits, not blocking:
- The test-file comment says "TAXSIM has no sales tax deduction". It does at state 44 (Texas): the executable adds an IRS-table sales tax deduction and reports v17 = 39,608.11 for the second household, so the 38,000 expectation corresponds to state 0, which is also what the emulator pins through
state_and_local_sales_or_income_tax. Rewording the comment to say the expected values are state-0 results would keep it accurate. - Asserting
tax_unit_itemizesanditemized_taxable_income_deductionsin the second case would pin why 38,000 appears. - The label reads "Itemized deductions in taxable income in TAXSIM" (double "in"), and the
documentationstring restates the label; optional.
Follow-up for the emulator comparison rather than this PR: the TAXSIM build does not apply the 2026 section 68 limitation (2026 single, 1,000,000 wages, 60,000 mortgage interest: v17 = 60,000), while the model reduces it, so expect v17 and v18 differences for 37-percent-bracket itemizers from 2026.
Summary
Adds
taxsim_v17tocontrib/taxsim: TAXSIM-35's v17, "Itemized Deductions in taxable income" (TAXSIM-35 documentation, intermediate results). It isitemized_taxable_income_deductionswhen the tax unit itemizes and 0 otherwise.The policyengine-taxsim emulator maps v17 to
itemized_taxable_income_deductions, the potential amount whether or not the filer itemizes. In the TAXSIM-35 comparison of 15,000 CPS households per year, v17 differs in 12,308 records, and in every one TAXSIM reports 0 (the standard deduction was used). A follow-up emulator PR will map v17 to this variable.Tests
tests/policy/contrib/taxsim/outputs/taxsim_v17.yaml, two 2024 Texas households, expected values from the TAXSIM-35 executable for the same inputs (sales tax deduction set to 0, as TAXSIM has none):policyengine-core test policyengine_us/tests/policy/contrib/taxsim -c policyengine_us: 159 passed.axiom: n/a: TAXSIM output alias in contrib/taxsim, no policy change
🤖 Generated with Claude Code