Inflation-adjust
Opened this issue · 4 comments
@MaxGhenis . OG-USA has a function in the wealth.py module called get_wealth_data(). This function gets wealth data from 1-to-5 past SCF surveys, adjusts them for inflation, and pools them together. I am currently working on a PR that allows the function to get 2019 SCF data as well as fixes the hard coded CPI numbers in lines 29-32 of the function.
The other function in that module compute_wealth_moments() computes selected wealth moments from the data and does not need any updating as far as I can tell.
I will try and submit the PR that updates this function in the next hour.
cc: @jdebacker
@MaxGhenis The OG-USA PR with the new wealth.py
module that incorporates SCF 2019 data and has updated annual CPI values for combining the datasets is PR #658.
@MaxGhenis After seeing your talk today, I think it'd make a lot more sense to include the inflation adjustment into the microdf
package rather than the scf
. That way, one can apply it to any survey data.
A nice method to do that without hardcoding values is to use the pandas-datareader
package and grab the price indices from FRED, then merge them onto your micro data. It'd be another dependency, but just two lines of code and you cover any year and can have an option to select which price index to use.