chriskelly / LifeFinances

Scripts for validating retirement plans using Monte Carlo analysis.
GNU Affero General Public License v3.0
9 stars 3 forks source link

Create more accurate inflation #1

Open chriskelly opened 2 years ago

chriskelly commented 2 years ago

Current inflation is symmetric Gaussian since it was based on the code that made stock returns. Actual inflation follows a more positively skewed distribution as shown in the image below. Need to change code to make more representative inflation.

Inflation histogram

chriskelly commented 2 years ago

Using this guys code (which I don't fully understand), I'm able to get a distribution that looks like this. It's certainly much closer, though if I'm being picky, it doesn't show the same kurtosis as the original data.

chriskelly commented 2 years ago

Been trying to use this skewnorm.rvs function, but can't figure out how to use it or any other package in stats to generate data with skew, mean, st dev, and kurt at the same time.

chriskelly commented 2 years ago

Made skewDist.py from B.Poe's code that returns a distribution of requested size. Doesn't take into account kurtosis and seeing about 25% of values being negative inflation, which seems higher than it should be, though I haven't checked. Distribution still looks more accurate than normal distribution.