Models inflation as a persistent but mean-reverting process: high inflation tends to be followed by high inflation, while gradually returning toward a long-term average. In annual discrete time, this becomes an autoregressive model with one lag, or AR(1), rather than independent white-noise draws. section 5.7
A practical implementation proceeds by:
- Download monthly CPI-U data from FRED, resample it to annual observations, and calculate year-over-year inflation. section 5.7
- Regress inflation on its lagged value to estimate the intercept, persistence parameter, and residual volatility. section 5.7
- Generate inflation paths with the estimated parameters and random shocks, then feed them into retirement wealth simulations. 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()
Use the CPI-U download and annual year-over-year transformation as the data-preparation starting point. section 5.7
