Three-pass --disable-salt to align PE federal SALT with TAXSIM-35#934
Merged
Conversation
`--disable-salt` was added so PE-US state-tax computation could converge
without iterating against federal SALT, matching TAXSIM-35's missing
state↔federal SALT iteration. The single-pass implementation zeroed
`state_and_local_sales_or_income_tax` globally, which also stripped state
income tax from PE's federal Schedule A — producing a systematic federal
mismatch against TAXSIM (~90+ records in the 3K eCPS sample, median gap
$200-$2,400).
This change runs PE in two PE-Microsim invocations when the flag is set:
Pass A — state-side: state_and_local_sales_or_income_tax = 0,
producing state outputs that match TAXSIM's first-pass state tax.
Pass B — federal-side: state_and_local_sales_or_income_tax explicitly
set to Pass-A's per-record state_income_tax, so PE federal Schedule A
uses a fixed SALT value (no iteration), mirroring TAXSIM exactly.
Final result stitches state-side columns (siitax, v32-v44, etc.) from
Pass A and everything else from Pass B.
3K eCPS 2025 sample (|AGI|<$500K, no S-Corp), pre/post:
- Federal exact match: 89.8% → 91.1%
- Federal within $100: 93.1% → 95.5%
- Federal within $1K: 97.9% → 98.9%
- State match: unchanged
Runtime: ~22% more CPU, ~5% more wall time on the 3K case (Microsim
setup dominates).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`test_extract_does_not_iterate_states` enforces a ceiling on `_calc_tax_unit()` calls to catch regressions where state vars iterate per-state. With three-pass `--disable-salt` the runner invokes PE twice, doubling the expected count from ~85 to ~170. Raise the assertion ceiling from <100 to <200; per-state iteration would still be 470+ calls, so the regression guard still bites. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`test_benchmark_500_records` and `test_benchmark_cps_like` use `disable_salt=True`, which now invokes PE twice. Wall-time roughly doubles. Raise the ceilings from 60s/120s to 120s/240s respectively. 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
Run PE in two Microsim passes when
--disable-saltis set, so federal Schedule A keeps state income tax SALT (matching TAXSIM's single-pass methodology) while state-side computation remains SALT-disabled (existing intent).Background
--disable-saltwas added so PE-US state-tax computation could converge without iterating against federal SALT, matching TAXSIM-35's missing state↔federal SALT iteration. The single-pass implementation zeroedstate_and_local_sales_or_income_taxglobally, which also stripped state income tax from PE's federal Schedule A — producing a systematic federal mismatch against TAXSIM. In the 3K eCPS 2025 sample, ~90 records (more than half of post-otherprop realistic federal mismatches) traced to this.Mechanism
state_and_local_sales_or_income_tax = 0, producing state outputs that match TAXSIM's first-pass state taxstate_and_local_sales_or_income_taxexplicitly set to Pass-A's per-recordstate_income_tax, so PE federal Schedule A uses a fixed SALT value (no iteration), mirroring TAXSIM exactlyImpact on 3K eCPS 2025 (|AGI|<$500K, no S-Corp realistic subset)
Headline 3K (with $15 tolerance): federal 72.9% → 74.2% (+38 records).
Runtime
Test plan
tests/test_three_pass_disable_salt.py(federal SALT uses Pass-A state tax; idempotent; no-flag pass unchanged)