Skip to content

Add structural mortgage interest data support#633

Open
MaxGhenis wants to merge 5 commits intomainfrom
codex/mid-data-support
Open

Add structural mortgage interest data support#633
MaxGhenis wants to merge 5 commits intomainfrom
codex/mid-data-support

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • convert imputed deductible_mortgage_interest and interest_deduction into structural mortgage inputs when the installed policyengine-us exposes the new federal MID variables
  • add SCF-backed tax-unit mortgage balance hints in Extended CPS so non-itemizer homeowners can carry structural first/second mortgage balances without changing current-law interest deductions
  • keep the path compatibility-gated, preserve residual non-mortgage interest through investment_interest_expense, and add focused tests for the conversion and SCF hint imputation

Testing

  • PYTHONPATH=/Users/maxghenis/.codex-worktrees/policyengine-us-mid uv run pytest policyengine_us_data/tests/test_calibration/test_mortgage_interest.py
  • PYTHONPATH=/Users/maxghenis/.codex-worktrees/policyengine-us-mid uv run ruff check policyengine_us_data/utils/mortgage_interest.py policyengine_us_data/datasets/cps/extended_cps.py policyengine_us_data/tests/test_calibration/test_mortgage_interest.py policyengine_us_data/datasets/puf/puf.py
  • PYTHONPATH=/Users/maxghenis/.codex-worktrees/policyengine-us-mid uv run python -m py_compile policyengine_us_data/utils/mortgage_interest.py policyengine_us_data/datasets/cps/extended_cps.py policyengine_us_data/tests/test_calibration/test_mortgage_interest.py policyengine_us_data/datasets/puf/puf.py

Notes

  • the new structural path is a no-op until policyengine-us includes the paired MID variables
  • this PR does not rebuild Extended CPS artifacts or rerun the full calibration pipeline

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.

1 participant