If you would like to run the code yourself, you can find it on my Github here.
And this example is for illustrative purposes only. It should not be regarded as financial advice in any way, shape, or form.
"I estimate with 20% confidence that there is a 75% chance that your money will be enough to fund your retirement."
Wait, what? That’s so confusing.
No financial advisor would actually say that to you – but I wish they would. Customers demand confidence and certainty from the people they hire and Finance professionals are trained from day one to deliver their message with confidence (after all, they are trying to sell a service).
But the truth is that quantitatively modeling someone’s retirement is extremely difficult and fraught with uncertainty and unknowns.
The main drivers of this variance are uncertainty around:
- Investment returns
- Inflation
- How much you will spend annually in retirement
- How long you will live (and how healthy you will be)
- Black swans – hard to predict events such as financial crises, wars, white walkers, etc.
- Model error (error from incorrect estimates and assumptions)
- Changes to Social Security, income tax rates, capital gains tax rates, etc.
We will use Monte Carlo Simulation to quantitatively explore drivers 1 through 4 in detail below. The others are important as well but I don’t think you want to read a 45 minute blog post 😉 so we will save them for another time.
By the end of this post, we will better understand why despite significant advances in analytics and computing power, answering the age old question of "how much Money do I really need?" remains as challenging as ever.
Assumptions of Our Example

Let’s pretend that we work for a financial firm called Lazy Advisors, LLC. One of our relatively more financially savvy clients, Randy, has come in for his retirement assessment. Here are his stats:
Gender & Age: Male, 55
Marital Status: Single (and ready to mingle)
Target Retirement Age: 60
Portfolio Value: $500,000 (and he will not be saving any more money)
The portfolio that we manage for Randy is reasonably conservative – 60% invested in stocks (U.S. Large Cap and Emerging Market) and 40% invested in U.S. Treasury bonds.
Since our firm is lazy (hence the name), we only invest in 5 assets: Treasury Bills (basically cash), Treasury Bonds, the S&P 500, commodities, and Emerging Market Stocks (China, Brazil, Russia, etc.).
We use mean variance portfolio optimization to estimate the investment weights of the optimal portfolio (highest bang for buck) with the following constraints:
- Weights must sum to 1
- Weights must be between 0 and 1 (no short selling)
- Allocation to S&P 500, commodities, and EM Stocks must sum to 0.6
Our optimizer produces a portfolio with the following allocations: 40% in Treasury Bonds, 35% in the S&P 500, and 25% in EM Stocks. The expected annual nominal return is 5.1% and the expected annual standard deviation is 10%.
I won’t go into detail on this today but keep in mind that the optimal portfolio weights are extremely sensitive to our estimate of each asset class’ expected return, volatility, and correlation with other assets.
For the curious, here are our estimates of expected return and volatility (standard deviation). These estimate came out of this report from BNY Mellon.

Finally, here are our estimates of the asset class correlations:

Uncertainty Around Investment Returns
The first thing Randy asks us when he sits down is, "I don’t plan to save anymore money before retirement. Based on what I have now, how much money do you think I will have when I retire in five years?"
Since we know Randy’s portfolio has an expected return of 5.1% and we are lazy, we just show him the plot below and tell him that the median value of his portfolio at retirement (in five years) will be $630,000.

But Randy demands more information. He knows that the median is just one out of many potential outcomes and wants to know how much variation he can expect. Itching to go play golf, we call in our intern and make him crunch the numbers. After some slick Python coding, he shows us this plot:

What!? Our intern is going to make us miss our tee time! We ask our intern how he generated this graph and he tells us that:
He used Monte Carlo Simulation to run 5,000 simulations of Randy’s portfolio and then plotted the median wealth over time (blue line) as well as the 5th and 95th percentile wealths over time (the bottom of the blue shaded area is the 5th percentile wealth and the top is the 95th percentile wealth).
He also mentions that he assumed the returns of the investments in Randy’s portfolio follow a normal distribution (a potentially dangerous assumption that we will explore in a future post) and are correlated to each other according to the correlation heat map we shared previously (Mr. Smartypants intern used Cholesky Decomposition to make his random normal shocks correlated, details in the code).
A Brief Aside on Monte Carlo Simulation
In Monte Carlo simulation, we run an experiment over and over collecting the result each time (in this case, Randy’s portfolio value at age 60). The key is that we inject randomness through some of our inputs. Here, we use correlated random normal shocks to model the volatility of investment returns.

You can think of Monte Carlo simulation like rolling a bunch of magic dice with each input whose value we are uncertain about represented by one dice. I call them magic dice because depending on what you need they may take on non-uniform distributions or some dice rolls might be correlated (magically!) with the rolls of other dice. So each individual simulation is just the result of a roll of all our magical dice. And the Monte Carlo Simulation is just the process of rolling our magical dice a large number of times (and once we are done, we can use the Monte Carlo Simulation results to approximate the probability distribution of the thing we were trying to model, e.g. Randy’s portfolio).
Back to Randy
Previously, our intern had thoroughly confused us with his explanation so we glare at him and demand, "Explain in plain English please!"
Our diligent (and good natured) intern replies,
"In 90% of the simulations that I ran, Randy’s portfolio ended up being worth between $435,000 and $884,000."
Now Randy is worried, "If one of the bad scenarios is realized, will the resulting wealth be enough for me to live on?"
Just as we are about to tell him not to be such a worrywart, our intern pipes up, "Mr. Randy, you also need to remember to account for inflation. What you spend now may not be indicative of what you need to spend in the future."
Doh! Out intern is such a goody goody…
Uncertainty Around Inflation
A quick refresher – inflation is the tendency for stuff (everything from the price of a latte to the rent you pay your landlord) to increase in price over time.
In retirement simulations, inflation is usually modeled as a drag on the portfolio return. For example, if Randy’s portfolio earned 6% in nominal terms (nominal = before inflation) and inflation was 3% during that year, his inflation adjusted return would be 6%-3%=3%. Inflation just stole half of the return!
Stepping away from our chat with Randy for one second, let’s get a sense of how inflation drives retirement uncertainty. The following plot shows that just varying our inflation assumption (and not changing investment returns at all), we get a significant variation in outcomes. And while 2% may seem like a reasonable estimate for future inflation, the other values are within the realm of possibility as well (for example, Japan experienced deflation for decades and the U.S. experienced double digit inflation throughout the 1970s and severe deflation during the Great Depression).

Digression over, let’s get back to our client, Randy. Unfortunately, he now wants us to model how his inflation adjusted wealth changes in retirement. Such a taskmaster… He also gives us some more information. Randy expects to get some money from Social Security each year so he estimates that he will only need to fund spending of $28,000 from his portfolio each year to maintain his current lifestyle. This $28,000 is an inflation adjusted value – meaning that if inflation were 1% for the year, then next year Randy would need $28,280 in nominal terms.
Annual Portfolio Withdrawal (Inflation Adjusted): $28,000
Expected Age at Death: 85
So we jump on our laptops and start coding. We decide to model inflation as a normally distributed variable with an expected value of 2% and a standard deviation of 1%. Also, we ignore the correlation between inflation and investment returns in order to simplify the analysis. After some number crunching we come up with the following chart:

Our intern explains it to Randy, "Mr. Randy, our median estimate of your wealth at age 85… when we expect you to umm… pass away is $81,000. So in our median scenario, you did have enough money. We also included the no inflation case (the red line) to show you how our estimate of inflation negatively impacts your wealth."
"However, in 40% of the simulations that we ran (and we ran 5,000 btw), you ran out of money! If your portfolio runs dry, you would have only Social Security to live on for the rest of your days…"
And he continues "I also made you this histogram to better visualize your wealth outcomes." (Our intern is such a showoff)

Uncertainty Around Living Expenses and Age of Death
Now Randy wants to know what are some things he absolutely must avoid if he wants to stay in the black throughout his retirement.
Our intern pipes up again (sigh…) and says, "There is no guarantee that you will be able to maintain an inflation adjusted spending level of $28,000 throughout your entire retirement. You could get hit with unforeseen medical expenses, higher taxes, etc. So we should take a look at how our projections change if you end up spending more."
"Mr. Randy, we simulated what would happen if you spent $38,000 in retirement (instead of $28,000). Just like before we ran 5,000 simulations. Now you end up running out of money (besides Social Security) in 76% of the simulations we ran! Previously you ran out in just 40%.

"And if you end up living longer than expected by 5 years (passing away at age 90 instead), you end up running out of money in 56% of the simulations that we ran for you, up significantly from only 40% previously (when we assumed you would pass away at age 85).

Conclusion
Finally Randy is satisfied. Very worried but satisfied.
He looks at us and says.
"I learned something today. You can run thousands of simulations for me (which already have their own variance due to investment returns and inflation), yet a slight tweak of the assumptions and everything changes again! So it’s like variance stacked on top of even more variance! So much uncertainty…
We have no idea what he is talking about but our intern shows Randy the following chart.

"Mr. Randy, we can split the variance into two parts: the known and unknown. The known sources of variation, which we explored in detail earlier, come from volatility in investment returns, inflation, age of death, spending etc. Each of these sources of variation stack on top of each other and compound each other. But there are also the ‘unknown unknowns’ – things that contribute hidden variation that we are unable to model because either we just don’t know about it or what we know is wrong."
Randy says he needs a few days to digest all the findings but sets up a meeting with our intern in a week to go over next steps. Seems like our intern has stolen our client. We resolve to think harder before hiring any more interns in the future (we originally only hired him because his latte art is incredible).
Source: 10-Year Capital Market Return Assumptions, BNY Mellon