Add --assume-w2-wages flag for QBID alignment with TAXSIM#710
Merged
PavelMakarchuk merged 4 commits intomainfrom Feb 26, 2026
Merged
Add --assume-w2-wages flag for QBID alignment with TAXSIM#710PavelMakarchuk merged 4 commits intomainfrom
PavelMakarchuk merged 4 commits intomainfrom
Conversation
TAXSIM skips the Section 199A W-2 wage/UBIA cap when processing S-Corp income, applying a flat 20% QBID. PolicyEngine correctly implements the cap but w2_wages_from_qualified_business defaults to 0 (TAXSIM doesn't provide this data), which zeroes out QBID above the income threshold. This flag sets w2_wages_from_qualified_business to a large value so the cap never binds, matching TAXSIM's simplified calculation for validation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
w2_wages_from_qualified_business is a person-level variable, so set_input needs the person count (not tax-unit/record count). Use sim.get_variable_population() to get the correct array size. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ec23611 to
0f73e3f
Compare
Co-Authored-By: Claude Opus 4.6 <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
--assume-w2-wagesCLI flag topolicyengineandcomparecommandsw2_wages_from_qualified_businessto a large value so the Section 199A W-2 wage cap never bindsContext
TAXSIM deliberately skips the W-2/UBIA wage cap when processing
scorpinput, applying a flat 20% QBID. PE correctly implements the cap per IRS Pub 535 / Section 199A, but since TAXSIM doesn't provide W-2 wage data,w2_wages_from_qualified_businessdefaults to 0 — which zeroes out QBID for taxpayers above the income threshold ($170,050 single / $340,100 MFJ in 2023). This accounts for ~175 of 252 federal mismatches in CPS comparisons.Test plan
tests/test_assume_w2_wages.pycovering:policyenginecommand accepts flag🤖 Generated with Claude Code