Skip to content

Add taxsim_v17, TAXSIM-35's itemized deductions in taxable income - #10012

Open
PavelMakarchuk wants to merge 1 commit into
mainfrom
taxsim-v17-v19
Open

PavelMakarchuk wants to merge 1 commit into
mainfrom
taxsim-v17-v19

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Collaborator

Summary

Adds taxsim_v17 to contrib/taxsim: TAXSIM-35's v17, "Itemized Deductions in taxable income" (TAXSIM-35 documentation, intermediate results). It is itemized_taxable_income_deductions when 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):

  • wages 50,000, mortgage interest 5,000, property tax 2,000: itemized 7,000 is below the 14,600 standard deduction, TAXSIM v17 = 0.
  • wages 200,000, mortgage interest 30,000, property tax 8,000: TAXSIM v17 = 38,000.

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

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

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (a91813c).
⚠️ Report is 314 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.
  2. Asserting tax_unit_itemizes and itemized_taxable_income_deductions in the second case would pin why 38,000 appears.
  3. The label reads "Itemized deductions in taxable income in TAXSIM" (double "in"), and the documentation string 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.

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.

2 participants