James P Houghton

James Houghton - Endowments 1 - Run Randomized Monte Carlo


Endowments 1 - Run Randomized Monte Carlo

10 Sep 2013

In the last post, we looked at a simple model of an endowment, and showed how various interest and withdrawal rates lead to different balances in the account at the end of 50 years. In this post, we'll look at Monte Carlo Simulation as a method for predicting the likely end state of the account when we are uncertain what the average interest rate and withdrawal rate will be.

We'll start by specifying probability distributions for these two variables. We'll choose to represent our interest rate as a normal distribution with mean 0.05 and standard deviation 0.01, and our withdrawal rate as a normal distribution with mean 100 and standard deviation 10.
In our Monte Carlo calculation, we draw a value from each of the input distributions, and use them as parameters for the model (red and blue). Then we simulate the model over its 50 year time span, and measure the result at year 50 (purple).

In the animation that follows, we build up histograms for the input and output parameters by grouping both input parameters and outputs into bins. We can compare the input distribution with its histogram to get a sense for how well our calculation has recreated that distribution by taking samples from it.
For the output distribution, we only have a set of points - samples from an underlying, true distribution that would emerge if we took an infinite number of runs in our Monte Carlo. In the next two animations, we see how these distributions build up as we run more simulations.

As the number of simulations becomes large (into the thousands) we start to see good convergence between the ideal input distributions and the distributions represented by our samples. This gives us confidence that the output samples are likewise converging on the hidden true value of the expected output distribution.

Here's a link to the ipython notebook for generating these plots.




© 2016 James P. Houghton