Inflation risk threatens retirement sustainability by raising future spending and reducing the real value of savings. Monte Carlo analysis represents it as persistent but mean-reverting uncertainty rather than independent annual noise. section 5.0 section 5.7
A practical inflation-risk model proceeds as follows:
- Download CPI-U data from FRED, resample monthly observations annually, and calculate year-over-year percentage changes. section 5.7
- Estimate an AR(1) process by regressing inflation on its lagged value; the lag captures persistence while mean reversion pulls rates toward a long-term level. section 5.7
- Generate inflation paths with the estimated intercept, autoregressive coefficient, residual volatility, and independent simulation shocks. section 5.7
- Apply each path to retirement spending and count simulations that end in bankruptcy to estimate the probability of running out of money. section 5.13 section 5.7
Historical inflation and simulated retirement paths
The year-over-year CPI-U rate rose from 1.4% at the end of 2020 to 7.0% in 2021, then declined to 6.5% in 2022 and 3.5% in 2023. A simulation can begin with 3.5% inflation, $1.2 million in wealth, $60,000 spending, and 30 years of projected paths. section 5.7 section 5.7
Listing 5.6 Downloading inflation data
import pandas_datareader.data as web
start = '01-01-1947'
end = '12-30-2023'
data = web.DataReader(name='CPIAUCNS', data_source='fred', start=start,
end=end) #1
data = data.resample('Y').last() #2
data['yoy'] = data['CPIAUCNS'].pct_change() #3
data.tail()
Inspect the Python workflow for downloading CPI-U data, creating annual inflation rates, and preparing the series for modeling. section 5.7
