Skip to content

Conversation

@baogorek
Copy link
Collaborator

Summary

  • Adds --use-tob flag to enable GREG calibration against TOB (Taxation of Benefits) revenue targets
  • Calibrates to both OASDI TOB (tob_revenue_oasdi) and HI TOB (tob_revenue_medicare_hi) trust fund revenue

Motivation

The baseline microsimulation shows significant deviation from SSA projections for 2025:

Variable Baseline SSA Target Error
tob_revenue_oasdi $18.5B $60.5B -69%
tob_revenue_medicare_hi $73.1B $40.7B +80%

Changes

  • ssa_data.py: Add load_oasdi_tob_projections() and load_hi_tob_projections()
  • calibration.py: Add TOB constraint parameters to calibrate_greg and calibrate_weights
  • run_household_projection.py: Add --use-tob CLI flag with debug output
  • social_security_aux.csv: Clean hi_tob_billions_nominal_usd column (convert millions → billions)
  • README.md: Document new constraint type

Usage

python run_household_projection.py 2100 --greg --use-ss --use-payroll --use-tob --save-h5

Test plan

  • Run projection with --use-tob flag and verify calibration error < 0.1%
  • Verify debug output shows baseline vs target comparisons

Closes #459

🤖 Generated with Claude Code

@baogorek baogorek marked this pull request as draft December 16, 2025 04:18
@baogorek baogorek marked this pull request as ready for review December 19, 2025 13:03
baogorek and others added 9 commits December 22, 2025 10:55
Adds calibration targets for Taxation of Benefits (TOB) revenue:
- OASDI TOB: tob_revenue_oasdi (tier 1 taxation)
- HI TOB: tob_revenue_medicare_hi (tier 2 taxation)

Changes:
- Add load_oasdi_tob_projections() and load_hi_tob_projections() to ssa_data.py
- Add TOB constraint parameters to calibration.py
- Add --use-tob CLI flag to run_household_projection.py
- Clean hi_tob_billions_nominal_usd column in social_security_aux.csv
- Update README.md documentation

Closes #459

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Document source URLs and file details for:
- SSA 2025 OASDI Trustees Report (SingleYearTRTables_TR2025.xlsx)
- CMS 2025 Medicare Trustees Report (tr2025-tables-figures.zip)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Shows "H6 reform not active until 2045" for years before the reform takes effect.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add 'calibration' optional dependency group for samplics package
- Improve error message when samplics not installed for GREG calibration
- Add debug output showing negative weight count and magnitude during calibration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@baogorek baogorek merged commit 9649e4b into main Dec 23, 2025
6 checks passed
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.

Add TOB (Taxation of Benefits) revenue calibration targets

2 participants