Add tax-exempt interest and charitable deduction targets#881
Merged
Conversation
c6ed3ec to
654b9fc
Compare
654b9fc to
c0d610f
Compare
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
Context
The remaining outlier scan showed a few non-mortgage, non-LTCG variables that were still targetable. The locally available H5 has
tax_exempt_interest_incomeat about$82.6Bfor 2024 with a max record around$244M; the stored 2023 SOI exempt-interest aggregate is$66.1B. It also hascharitable_deductionat about$301.1B; the stored 2023 SOI charitable-contribution deduction aggregate is$212.0B.These are much less severe than mortgage interest or the prior capital-gains issue, but both are targetable with existing SOI rows. This follows the same logic as #868: a high-error soft target is preferable to leaving the aggregate unconstrained when the variable can affect downstream federal/state tax calculations.
Validation
uv run pytest tests/unit/calibration/test_target_config.py -quv run pytest tests/unit/calibration/test_target_config.py tests/unit/test_etl_irs_soi_overlay.py::test_load_national_geography_ctc_agi_targets_creates_capital_income_domains tests/unit/test_etl_irs_soi_overlay.py::test_workbook_domain_targets_include_charitable_deduction -quv run ruff format --check policyengine_us_data/db/etl_irs_soi.py tests/unit/test_etl_irs_soi_overlay.py tests/unit/calibration/test_target_config.pyuv run ruff check policyengine_us_data/db/etl_irs_soi.py tests/unit/test_etl_irs_soi_overlay.py tests/unit/calibration/test_target_config.py