Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 2 additions & 32 deletions reweighting/long_term.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,7 @@
# Trustees SingleYearTRTables_TR2025.xlsx, Tab VI.G9
# Intermediate scenario for row 69, for Intermediate Scenario, 2027, Cost is: $1,715 billion
ss_cost_b = 1_715
assert ss_total_b > ss_cost_b # 2 years of inflation


# Note: not our CPI-W: parameters.gov.bls.cpi.cpi_w("2026-01-05")
#
# CPI from Trustees SingleYearTRTables_TR2025.xlsx, Tab VI.G6
cpi_w_2025 = 100
cpi_w_2027 = 104.95

cpi_w_2025_b = parameters.gov.ssa.uprating("2025-01-01")
cpi_w_2027_b = parameters.gov.ssa.uprating("2027-01-01")

ratio = cpi_w_2027 / cpi_w_2025
ratio_b = cpi_w_2027_b / cpi_w_2025_b

assert round(ss_total_b) == round(ss_cost_b * ratio) # Fails, but close

assert round(ss_total_b) > ss_cost_b

# 2100
sim = Microsimulation(dataset = H5_PATH + "2100.h5")
Expand All @@ -46,21 +30,7 @@
# Trustees SingleYearTRTables_TR2025.xlsx, Tab VI.G9
# Intermediate scenario for row 143, for Intermediate Scenario, 2100, Cost is: $1,033,686.26 billion
ss_cost_b = 5809
assert ss_total_b > ss_cost_b # many years of inflation

parameters.gov.ssa.uprating# Note: not our CPI-W: parameters.gov.bls.cpi.cpi_w("2026-01-05")
#
# CPI from Trustees SingleYearTRTables_TR2025.xlsx, Tab VI.G6
cpi_w_2025 = 100
cpi_w_2100 = 592.78

cpi_w_2025_b = parameters.gov.ssa.uprating("2025-01-06")
cpi_w_2100_b = parameters.gov.ssa.uprating("2100-01-06")

ratio = cpi_w_2100 / cpi_w_2025
ratio_b = cpi_w_2100_b / cpi_w_2025_b

assert round(ss_total_b) == round(ss_cost_b * ratio) # fails, not close!
assert round(ss_total_b) == ss_cost_b

# Population count, total
ss_total_pop = 458_325_282
Expand Down