Perl Actuarial MonteCarlo Retirement Simulator
Perl Actuarial MonteCarlo Retirement Simulator
I have written what I am calling an actuarial MonteCarlo retirement simulator that I thought I would share and get some feedback on.
Shiller provides a wonderful data set of historical stock market returns. And the U.S. government provides actuarial data on the probability of death as a function of age, so the idea is to combine them, and instead of picking a fixed time period for which to run a MonteCarlo simulation, run it until both parties in a couple have died.
Two things I have learned from this simulator that really matter for retirement are how many additional years of work you intend to put in before retiring, and the average return you estimate for the stock market. The default value I have been using for the expected average stock market return (with characteristic excess precision) is 5.2% in a tax free account, or 3.6% in a taxable account. When using the simulator I would strongly recommend performing a sensitivity analysis to see what happens when these two parameters are varied by plausable amounts.
I guess I am interested in any warnings on the design of the simulator that may render it misleading (I'm trying to use it to help in my retirement planning, so any flaws matter). The two biggest weaknesses I am aware of are not simulating bonds more accurately (the simulator is most meaningful if like me you plan to primarily hold TIPS). And only having very crude ways to vary the asset allocation over time (rebalance each year, consume bonds first, consume stock first).
I've provide the technical description of the simulator below so you don't have to retrieve the code to provide feedback.
It is a Perl script, and doesn't provide a web interface. It can be downloaded here:
http://www.gordoni.com/economics/amcrs0.1.perl
Also use the above link if you want to see a list of the parameters that can be set in the simulator and their justifications.
I understand the caveats about garbagein garbageout. To me a though a montecarlo simulator is more like a sharp knife, dangerous in the wrong hands, but a useful tool when it comes to helping to skin this beast called retirement planning.
thanks,
gordon

This retirement simulator simulates an initial set of assets with a savings accumation phase followed by an income withdrawl retirement phase. The results associated with holding different ratios of bonds/stocks are reported.
The reported results show the probability of dying without running out of money (success), as well as various percentile levels of the amount of money still available at death for the different runs of the simulator. For a couple the death of one partner reduces the amount of income required to support the other partner, but simulation continues untill both partners are dead.
An actuarial model of longevity is employed, in which the probability of death each year is taken from the U.S. Life Tables. Separate tables are used for males and females.
A simulation parameter can be used to specify that whenever the total portfolio exceeds a certain limit, the amount over the limit will be given to charity or friends/relatives. The total amount given over the life of the simulation is reported.
Equity returns are based on the returns reported by Shiller, but with the mean return adjusted to match a specified simulation parameter. This is because it seems unlikely that the return values of the past will be repeated, but they are still informative in setting the volatility of future returns. By default the simulation uses returns from 1926 on, but if desired this parameter can be set as far back as 1872.
To simulate diversification beyond U.S. equities the simulation allows a second equity class with returns derived from the same time datapoints as the first, but in a different order, with a different standard deviation, and partially correlated to the first sequence. This can be used to simulate international holdings.
Bond returns are assumed to be a fixed amount per year after adjusting for inflation, and as such most closely model short term TIPS.
All input values and reported values are adjusted for inflation.
Shiller provides a wonderful data set of historical stock market returns. And the U.S. government provides actuarial data on the probability of death as a function of age, so the idea is to combine them, and instead of picking a fixed time period for which to run a MonteCarlo simulation, run it until both parties in a couple have died.
Two things I have learned from this simulator that really matter for retirement are how many additional years of work you intend to put in before retiring, and the average return you estimate for the stock market. The default value I have been using for the expected average stock market return (with characteristic excess precision) is 5.2% in a tax free account, or 3.6% in a taxable account. When using the simulator I would strongly recommend performing a sensitivity analysis to see what happens when these two parameters are varied by plausable amounts.
I guess I am interested in any warnings on the design of the simulator that may render it misleading (I'm trying to use it to help in my retirement planning, so any flaws matter). The two biggest weaknesses I am aware of are not simulating bonds more accurately (the simulator is most meaningful if like me you plan to primarily hold TIPS). And only having very crude ways to vary the asset allocation over time (rebalance each year, consume bonds first, consume stock first).
I've provide the technical description of the simulator below so you don't have to retrieve the code to provide feedback.
It is a Perl script, and doesn't provide a web interface. It can be downloaded here:
http://www.gordoni.com/economics/amcrs0.1.perl
Also use the above link if you want to see a list of the parameters that can be set in the simulator and their justifications.
I understand the caveats about garbagein garbageout. To me a though a montecarlo simulator is more like a sharp knife, dangerous in the wrong hands, but a useful tool when it comes to helping to skin this beast called retirement planning.
thanks,
gordon

This retirement simulator simulates an initial set of assets with a savings accumation phase followed by an income withdrawl retirement phase. The results associated with holding different ratios of bonds/stocks are reported.
The reported results show the probability of dying without running out of money (success), as well as various percentile levels of the amount of money still available at death for the different runs of the simulator. For a couple the death of one partner reduces the amount of income required to support the other partner, but simulation continues untill both partners are dead.
An actuarial model of longevity is employed, in which the probability of death each year is taken from the U.S. Life Tables. Separate tables are used for males and females.
A simulation parameter can be used to specify that whenever the total portfolio exceeds a certain limit, the amount over the limit will be given to charity or friends/relatives. The total amount given over the life of the simulation is reported.
Equity returns are based on the returns reported by Shiller, but with the mean return adjusted to match a specified simulation parameter. This is because it seems unlikely that the return values of the past will be repeated, but they are still informative in setting the volatility of future returns. By default the simulation uses returns from 1926 on, but if desired this parameter can be set as far back as 1872.
To simulate diversification beyond U.S. equities the simulation allows a second equity class with returns derived from the same time datapoints as the first, but in a different order, with a different standard deviation, and partially correlated to the first sequence. This can be used to simulate international holdings.
Bond returns are assumed to be a fixed amount per year after adjusting for inflation, and as such most closely model short term TIPS.
All input values and reported values are adjusted for inflation.
The Perl Actuarial Monte Carlo Retirement Simulator I mentioned 6 months ago has morphed into a PHP Actuarial Monte Carlo Retirement Simulator. Meaning that it is no longer necessary to download it to run it, you can now run it from the web. It is available at:
http://www.gordoni.com/economics/hars.php
Primary features: Rather than run for a fixed 30 years the simulator uses the U.S. Life Tables of mortality with separate tables used for men and women. Simulation is performed for a couple with reduced cost of living when one party has died. Ability to give assets above some threshold to charity/relatives/friends. Ability to hold a proportion of equity assets in a form that is only partially correlated to the primary assets, such as international stocks. Assets can be rebalanced, or depleted on a equity first or bonds first basis. Historical returns can be replayed at random (the more EMH approach) or in looped historical order (the more behavioralist approach since it exhibits reversion to the mean). This last feature makes a significant difference to achieving financial goals, with looped historical order being easier.
Feedback and especially any bug reports are most welcome.
http://www.gordoni.com/economics/hars.php
Primary features: Rather than run for a fixed 30 years the simulator uses the U.S. Life Tables of mortality with separate tables used for men and women. Simulation is performed for a couple with reduced cost of living when one party has died. Ability to give assets above some threshold to charity/relatives/friends. Ability to hold a proportion of equity assets in a form that is only partially correlated to the primary assets, such as international stocks. Assets can be rebalanced, or depleted on a equity first or bonds first basis. Historical returns can be replayed at random (the more EMH approach) or in looped historical order (the more behavioralist approach since it exhibits reversion to the mean). This last feature makes a significant difference to achieving financial goals, with looped historical order being easier.
Feedback and especially any bug reports are most welcome.
Last edited by gordoni2 on Tue Sep 22, 2009 3:36 pm, edited 1 time in total.
It seems evident that an MC model which requires specification of a mean (and standard deviation) for the return distribution cannot allow enough variability to properly represent the uncertainty in outcome. Perhaps someone can discuss the methodology that is appropriate to cases where precisely the expected return and expected variability in return is what is to be varied.
Last edited by dbr on Mon Sep 21, 2009 8:06 pm, edited 1 time in total.
 nisiprius
 Advisory Board
 Posts: 37645
 Joined: Thu Jul 26, 2007 9:33 am
 Location: The terrestrial, globular, planetary hunk of matter, flattened at the poles, is my abode.O. Henry
This is really a philosophical issue, and a generic one... this is just more brooding about systematic withdrawal plans in general. I start to feel my mind boggle whenever I confront it... like those old logical paradoxes.
What good does it do to know my statistical probability of "success" when in fact I have my sample size is 1? If I run out of money at age 95, does it do me any good to know that the chances of that happening were only 5%?
In the case of an insurance company offering a fixed annuity product, of course it does, because they are dealing with a large population and the average is meaningful. The average tells them how much money they must collect from a large group of people in order to pay it back to that same group and have none of them run out of money. Furthermore they are collecting a profit and have deep pockets and a margin of error, so if by chance their group is a bit healthier than they figured, due to sampling error, the longestlived people in that group still don't run out of money, the insurance company just makes a tad less profit.
In the case of a single individual, can someone actually say "I am consciously deciding to take a 5% risk of running out of money" and mean it?
Don't all these SWR systems need to be revamped, so that instead of running out of money, the worstcase scenario is a reduced income? For example, use the Vanguard withdrawal strategy embodied in their managed payout fund, and use the Monte Carlo simulation to show the probability distribution of the lowest year's payout... or something like that?
What good does it do to know my statistical probability of "success" when in fact I have my sample size is 1? If I run out of money at age 95, does it do me any good to know that the chances of that happening were only 5%?
In the case of an insurance company offering a fixed annuity product, of course it does, because they are dealing with a large population and the average is meaningful. The average tells them how much money they must collect from a large group of people in order to pay it back to that same group and have none of them run out of money. Furthermore they are collecting a profit and have deep pockets and a margin of error, so if by chance their group is a bit healthier than they figured, due to sampling error, the longestlived people in that group still don't run out of money, the insurance company just makes a tad less profit.
In the case of a single individual, can someone actually say "I am consciously deciding to take a 5% risk of running out of money" and mean it?
Don't all these SWR systems need to be revamped, so that instead of running out of money, the worstcase scenario is a reduced income? For example, use the Vanguard withdrawal strategy embodied in their managed payout fund, and use the Monte Carlo simulation to show the probability distribution of the lowest year's payout... or something like that?
Annual income twenty pounds, annual expenditure nineteen nineteen and six, result happiness; Annual income twenty pounds, annual expenditure twenty pounds ought and six, result misery.
I hadn't, but I have now. Perhaps MonteCarlo is the wrong name for the simulator I wrote. The simulator is using historical returns as recorded by Shiller to drive the financial component of the simulation, rather than returns generated from a probability distribution as is done in classical MonteCarlo simulators. On the other hand deciding whether an individual or couple are still alive each year is done using classical role the dice MonteCarlo techniques.livesoft wrote:Have you read Jim C. Otar's severe criticisms of MC simulators? How do you address those criticisms?
Turning to Jim's criticisms:
FLAW #1: The first flaw of the MC is how it generates randomness.
My simulator uses historical returns rather than some mathematical distribution.
FLAW #2: The second flaw of MC is that the outcomes it generates are random. It ignores the effects of secular trends.
My simulator can be run in one of two modes: looped historical sequence and random. When returns are simulated in looped historical sequence it will capture these secular trends, such as reversion to mean. Running in looped historical sequence does though limit the breadth of the input data to the number of start years, it is more of a historical replay mode. This strikes me as similar to the Otar Retirement Calculator.
FLAW #3: The third flaw of MC is that ignores the correlation between the market events.
Running in looped historical sequence mode would overcome this flaw.
FLAW #4: The fourth flaw of MC is the unrealistic sequence of outcomes.
This strikes me as a rephrasing of flaws 2 and 3.
To me MonteCarlo simulators are a tool used for retirement planning, and most of the value of MonteCarlo simulators comes not from a single run and a single answer, but from comparing runs as parameters are changed. How does depleting my equity first compare to annually rebalancing my portfolio? What if the expected return on equities is 1% lower than I forecast? What if I work another 5 years?
The simple answer would be to perform multiple runs in which you vary the expected return and expected variability, and see if and how the results change. My simulator allows you to vary the expected return, but not the expected variability in return. It probably wouldn't be hard to add though.dbr wrote:Perhaps someone can discuss the methodology that is appropriate to cases where precisely the expected return and expected variability in return is what is to be varied.
That would be good. There seems to be a paucity of studies where the result is actually published, however.gordoni2 wrote:The simple answer would be to perform multiple runs in which you vary the expected return and expected variability, and see if and how the results change. My simulator allows you to vary the expected return, but not the expected variability in return. It probably wouldn't be hard to add though.dbr wrote:Perhaps someone can discuss the methodology that is appropriate to cases where precisely the expected return and expected variability in return is what is to be varied.
Thanks for the feedback on "MC". I would suggest that since you use historical returns from Shiller that you not call this a "MonteCarlo retirement simulator". I gather from your explanation that the MC part is only a death simulator.
Also I want to point out that if one knows exactly when they are gonna die, then retirement planning is a lot simpler.
Also I want to point out that if one knows exactly when they are gonna die, then retirement planning is a lot simpler.

 Posts: 72
 Joined: Wed Sep 05, 2007 10:57 am
 Location: Denver, CO
Here it isdbr wrote:Somewhere that I can't currently find, Milevsky developed a closed form model for retirement ruin with longevity. Using that formula one could presumably run MC analysis to establish the sensitivity of the model to the inputs.
http://www.ifid.ca/pdf_newsletters/PFA_2007APR_RUIN.pdf
He also discusses it in his book Are you a Stock or a Bond?

 Posts: 72
 Joined: Wed Sep 05, 2007 10:57 am
 Location: Denver, CO
Can you explain why you need to know the future real, after tax return of equities if you're using historical returns and a loop back?gordoni2 wrote:livesoft wrote:
FLAW #1: The first flaw of the MC is how it generates randomness.
My simulator uses historical returns rather than some mathematical distribution.
FLAW #2: The second flaw of MC is that the outcomes it generates are random. It ignores the effects of secular trends.
My simulator can be run in one of two modes: looped historical sequence and random. When returns are simulated in looped historical sequence it will capture these secular trends, such as reversion to mean. Running in looped historical sequence does though limit the breadth of the input data to the number of start years, it is more of a historical replay mode. This strikes me as similar to the Otar Retirement Calculator.
FLAW #3: The third flaw of MC is that ignores the correlation between the market events.
Running in looped historical sequence mode would overcome this flaw.
I like the calculator. Simple and fast so that you can do just what you recommend  evaluate effect of results on different input parameters.
I don't find the "Worst case assets..." column to be meaningful. A rate of ruin will be more meaningful  what percentage of the runs ended up in ruin or the mean age at which the portfolio was depleted would be more useful to me.
The expected real returns input is used to determine the mean value for the simulated returns, while the historical returns are used to predict their variability. This is because it seems unlikely that the future mean return will mirror the past. An aging population and a declining birthrate are expected to shave around 0.9% off of GDP in the comming decades. And in the long term stock returns are tied to GDP. Generally I've tried to be conservative in the simulator and if their is a potential negative factor that could effect simulation results, have tried to expose it.walkinwood wrote:Can you explain why you need to know the future real, after tax return of equities if you're using historical returns and a loop back?
Deleted.walkinwood wrote:I don't find the "Worst case assets..." column to be meaningful.
That makes sense. Changed. It is now called HARS  Historical Actuarial Retirement Simulator.livesoft wrote:I would suggest that since you use historical returns from Shiller that you not call this a "MonteCarlo retirement simulator". I gather from your explanation that the MC part is only a death simulator.
http://www.gordoni.com/economics/hars.php
I vaguely recall reading this before (from Larry Swedroe or Jeremy Siegel?). From what I remember, this is not true. Can others confirm this?gordoni2 wrote:And in the long term stock returns are tied to GDP.
Ignore the market noise. Keep to your rebalancing schedule whether that is semiannual, annual or trigger bands.
You can ignore 3 and 4 due to how you did this, but now you have a new problem.gordoni2 wrote:I hadn't, but I have now. Perhaps MonteCarlo is the wrong name for the simulator I wrote. The simulator is using historical returns as recorded by Shiller to drive the financial component of the simulation, rather than returns generated from a probability distribution as is done in classical MonteCarlo simulators. On the other hand deciding whether an individual or couple are still alive each year is done using classical role the dice MonteCarlo techniques.livesoft wrote:Have you read Jim C. Otar's severe criticisms of MC simulators? How do you address those criticisms?
Turning to Jim's criticisms:
FLAW #1: The first flaw of the MC is how it generates randomness.
My simulator uses historical returns rather than some mathematical distribution.
FLAW #2: The second flaw of MC is that the outcomes it generates are random. It ignores the effects of secular trends.
My simulator can be run in one of two modes: looped historical sequence and random. When returns are simulated in looped historical sequence it will capture these secular trends, such as reversion to mean. Running in looped historical sequence does though limit the breadth of the input data to the number of start years, it is more of a historical replay mode. This strikes me as similar to the Otar Retirement Calculator.
FLAW #3: The third flaw of MC is that ignores the correlation between the market events.
Running in looped historical sequence mode would overcome this flaw.
FLAW #4: The fourth flaw of MC is the unrealistic sequence of outcomes.
This strikes me as a rephrasing of flaws 2 and 3.
To me MonteCarlo simulators are a tool used for retirement planning, and most of the value of MonteCarlo simulators comes not from a single run and a single answer, but from comparing runs as parameters are changed. How does depleting my equity first compare to annually rebalancing my portfolio? What if the expected return on equities is 1% lower than I forecast? What if I work another 5 years?
The world unfolded in one particular way. It could easily have unfolded differently. And it likely will unfold differently going forward. Using a random number generator (Gaussian, lognormal, Cauchy, whatever) allows you to explore in greater detail the what if history had turned out differently questions.
Both have real short comings.
You need to make assumptions about future tax rates, future inflation, future health care costs, future housing costs (Retirement community, assisted living, etc.)
If you write such a MCS (I have), and you play with the assumptions to gauge sensitives, ie to estimate error bars, and you have decades of possible life left, you find out the error bars are absolutely huge: maybe you be broke by 80, maybe you'll die a multimillionair!
At that point I decided that MCS are lot of fun, but really, you can do about as well with a calculator and a pencil (or at least an Excel spreadsheet and just plug in a modest return, if that work you are good to go, if it does not work, you are not good to go).
I never did get around to putting in actuarial tables, as it did not really make sense to plan for anything other than a long life: what pray tell do you conclude if it says your plan is great provided you die young enough?
It would be very interesting if I were an insurance company with a pool of people who wanted to buy an annuity.
We live a world with knowledge of the future markets has less than one significant figure. And people will still and always demand answers to three significant digits.
Shares represent a claim on the future output of the economy, while GDP attempts to measure the output of the economy. So one might naively expect the two to be related over a sufficiently long period. See William Bernstein's article "The TwoPercent Dilution"bob90245 wrote:I vaguely recall reading this before (from Larry Swedroe or Jeremy Siegel?). From what I remember, this is not true. Can others confirm this?gordoni2 wrote:And in the long term stock returns are tied to GDP.
http://www.efficientfrontier.com/ef/702/2percent.htm
in which he calculates stocks lag GDP by approximately 2% a year due to new share issuance.
Here is the description for Siegel's book The Future for Investors:
Source: http://www.jeremysiegel.com/index.cfm/f ... /books.cfmHis [Siegel's] surprising finding is that the new technologies, expanding industries, and fastgrowing countries that stockholders relentlessly seek in the market often leads to poor returns. In fact, growth itself can be an investment trap, luring investors into overpriced stocks and overly competitive industries.
Ignore the market noise. Keep to your rebalancing schedule whether that is semiannual, annual or trigger bands.
iorp.com is a retirement calculator that computes the after tax amount of money available for spending in retirement. instead of the year when the money will run out. In most calculators you specify a spending rate and the calculator computes when the money runs out. With ORP you specify life expectancy and the calculator computes the amount of money available for spending each year, with inflation and taxes part of the mix.nisiprius wrote:This is really a philosophical issue, and a generic one... this is just more brooding about systematic withdrawal plans in general. I start to feel my mind boggle whenever I confront it... like those old logical paradoxes.
What good does it do to know my statistical probability of "success" when in fact I have my sample size is 1? If I run out of money at age 95, does it do me any good to know that the chances of that happening were only 5%?
In the case of an insurance company offering a fixed annuity product, of course it does, because they are dealing with a large population and the average is meaningful. The average tells them how much money they must collect from a large group of people in order to pay it back to that same group and have none of them run out of money. Furthermore they are collecting a profit and have deep pockets and a margin of error, so if by chance their group is a bit healthier than they figured, due to sampling error, the longestlived people in that group still don't run out of money, the insurance company just makes a tad less profit.
In the case of a single individual, can someone actually say "I am consciously deciding to take a 5% risk of running out of money" and mean it?
Don't all these SWR systems need to be revamped, so that instead of running out of money, the worstcase scenario is a reduced income? For example, use the Vanguard withdrawal strategy embodied in their managed payout fund, and use the Monte Carlo simulation to show the probability distribution of the lowest year's payout... or something like that?

 Posts: 1157
 Joined: Fri Dec 12, 2008 8:02 pm
Indeed. Given the current accelerating rate of medical research it seems prudent to plan under the assumption that current actuarial tables are pessimistic.Rodc wrote:I never did get around to putting in actuarial tables, as it did not really make sense to plan for anything other than a long life: what pray tell do you conclude if it says your plan is great provided you die young enough?
For a simulator aimed at individual needs it makes more sense to continue each run until either some userspecified target age, or the money runs out (which ever comes first) and report something about the age distribution that results from multiple runs.
It might be interesting to calibrate your simulation results against Milevsky's probability of ruin formula. You can find a working spreadsheet here:
http://www.editgrid.com/explore/user/knox/ruin
If you do, I would appreciate it if you could post the results.
http://www.editgrid.com/explore/user/knox/ruin
If you do, I would appreciate it if you could post the results.
I attempted this, but I don't appear to be getting reasonable answers out of that spreadsheet. Here is a simple example: median lifespan=30, expected return=0, portfolio volatility=0, spending rate=4% gives a probability of ruin of 27%. Now increase the portfoilio volatility to 10% and the probability of ruin drops to 10%. Increase volatility further to 20% and the probability of ruin is 1%.Verde wrote:It might be interesting to calibrate your simulation results against Milevsky's probability of ruin formula. You can find a working spreadsheet here:
http://www.editgrid.com/explore/user/knox/ruin
If you do, I would appreciate it if you could post the results.
What gives? Provided the probability of ruin to begin with is closer to 0% than 100%, I would have expected increased volatility is associated with increased probability of ruin, but this spreadsheet very strongly shows the opposite.
I emailed Milevsky a while back with a similar question. Here is my question and the answer I got back.
Hello Prof. Milevsky
I have a question regarding your probability of ruin formula. (A neat piece of work I must add.) If I enter a mean rate of return of 2% and SD of 0% it calculates to a 16.5% ruin probability for a 65 year old withdrawing 4% p.a. This does not make sense. The 2004 US life table for males shows a probability of about 1.6% that a 65 year old will survive to age 100+. A riskless 2% return coupled with a 4% withdrawal is guaranteed to last 35 years. So if the money will last to age 100, and only 1.6% will be alive beyond that point, how can the ruin rate be 16.5%?
I would very much appreciate if you could take the time to address this question.
Regards
Hi
Good question.
Basically, the formula is an approximation that converges to the “truth” as volatility gets larger (sigma increases) and the individual gets younger (i.e. the hazard rate declines).
In your case you are going to the exact opposite limit and hence getting a lousy (although not completely out of the ball park) answer.
This is what happens with moment matching approximations. You need moments (i.e. variance).
The way to correct the formula so that it works – even in the case of small volatility – is to MATCH the hazard rate to the mortality table’s tail, as opposed to the mean/average value. In other words, use a higher hazard rate.
I hope this helps.
Moshe
Hello Prof. Milevsky
I have a question regarding your probability of ruin formula. (A neat piece of work I must add.) If I enter a mean rate of return of 2% and SD of 0% it calculates to a 16.5% ruin probability for a 65 year old withdrawing 4% p.a. This does not make sense. The 2004 US life table for males shows a probability of about 1.6% that a 65 year old will survive to age 100+. A riskless 2% return coupled with a 4% withdrawal is guaranteed to last 35 years. So if the money will last to age 100, and only 1.6% will be alive beyond that point, how can the ruin rate be 16.5%?
I would very much appreciate if you could take the time to address this question.
Regards
Hi
Good question.
Basically, the formula is an approximation that converges to the “truth” as volatility gets larger (sigma increases) and the individual gets younger (i.e. the hazard rate declines).
In your case you are going to the exact opposite limit and hence getting a lousy (although not completely out of the ball park) answer.
This is what happens with moment matching approximations. You need moments (i.e. variance).
The way to correct the formula so that it works – even in the case of small volatility – is to MATCH the hazard rate to the mortality table’s tail, as opposed to the mean/average value. In other words, use a higher hazard rate.
I hope this helps.
Moshe
I just had a look at the spreadsheet. It seems the problem is that Editgrid does not support the Ln function. You can use the instructions below to create your own Excel spreadsheet. Note the mean return is the real after inflation return.
rwwoods wrote:The input data and formulas are to be placed in column B. Note the two blank rows after Standard Deviation and the one blank row after beta. The blank rows are not required, but the formulas will have to be revised if you don't include them.Code: Select all
Input & Results Formulas Withdrawal rate (%) 4.0% Median Life Expectancy (years) 18.9 Mean return (%) 1.22% Standard Deviation (%) 0% Implied mortality rate 0.03667 =LN(2)/B3 alpha 3.66531 =(2*B4+4*B8)/(B5^2+B8)1 beta 0.01834 =(B5^2+B8)/2 Probability of ruin (%) 23.18% =GAMMADIST(B2,B9,B10,1)
Thank for the spreadsheet info. It works much better than the website containing the formula.
Here is what I get comparing my simulator to Milevsky's formula:
The life expectancy values used for each age come from the U.S. Life Tables, 2005, and are mean values, while Milevsky required median values. Hopefully this discrepancy will be small.
The discrepancy between Milevsky's formula and my simulator is quite large. Part of the discrepancy is due to the Milevsky formula assuming a constant probability of dying. As an experiment I modified my simulator to have a constant probability of dying instead of using death probabilities from the U.S. Life Tables, this is shown in the last column. As can be seen this explains some of the discrepancy, but much still remains to be explained.
I am reasonably confident of the accuracy of my simulator. To verify it I constructed a simple separate Monte Carlo simulator that shares no common code, and rather than estimate returns using the historical record, samples random variates from a log normal probability distribution. The two simulators give results that are in very close agreement:
This doesn't mean all of the bells and whistles of my simulator are correct, but it does mean that the core simulation engine is probably correct.
Here is what I get comparing my simulator to Milevsky's formula:
Code: Select all
< input params > < prob. of ruin >
withdrawal age / life mean standard Milevsky gordoni const.mort.
rate expectancy return deviation formula simulator simulator
1.0% 65 / 17.1 5.0% 20% 1% 0% 
2.0% 65 / 17.1 5.0% 20% 6% 1% 
3.0% 65 / 17.1 5.0% 20% 12% 4% 
4.0% 65 / 17.1 5.0% 20% 20% 9% 13%
5.0% 65 / 17.1 5.0% 20% 28% 16% 
varying some other parameters:
4.0% 20 / 56.2 5.0% 20% 50% 34% 
4.0% 65 / 17.1 4.0% 20% 26% 12% 
4.0% 65 / 17.1 5.0% 40% 77% 25% 
varying two parameters:
4.0% 20 / 56.2 5.0% 40% error[1] 51% 
Footnotes:
1  Milevsky's alpha is negative, so something must be wrong in the formula.
The discrepancy between Milevsky's formula and my simulator is quite large. Part of the discrepancy is due to the Milevsky formula assuming a constant probability of dying. As an experiment I modified my simulator to have a constant probability of dying instead of using death probabilities from the U.S. Life Tables, this is shown in the last column. As can be seen this explains some of the discrepancy, but much still remains to be explained.
I am reasonably confident of the accuracy of my simulator. To verify it I constructed a simple separate Monte Carlo simulator that shares no common code, and rather than estimate returns using the historical record, samples random variates from a log normal probability distribution. The two simulators give results that are in very close agreement:
Code: Select all
< input params > < prob. of ruin >
withdrawal mean standard fixed 30yr 30yr Monto Carlo
rate return deviation simulator simulator
1.0% 5.0% 20% 0% 0%
2.0% 5.0% 20% 3% 2%
3.0% 5.0% 20% 10% 9%
4.0% 5.0% 20% 21% 21%
5.0% 5.0% 20% 34% 34%
varying some other parameters:
4.0% 4.0% 20% 28% 28%
4.0% 5.0% 40% 42% 37%
 actuaryinvestor
 Posts: 150
 Joined: Mon Feb 26, 2007 2:33 pm
Simulator
Gordoni2,
Nice simulator! I don't fully understand the details, but here are some suggestions if you want to try some more things out.
1. Include mortality improvement. For example you can assume mortality improves by 1% per year to take into account medical advances and all that good stuff.
2. You can use the mortality rates to generate a vector of probability of surviving to each age, therefore removing stochastic mortality from your simulator. I think the only thing that should use random simulation is investment returns.
3. You could try adding some simple dynamic strategies like "age in bonds", or at least a "stop taking risk when future success is almost assured with bonds" line.
I think you mus have put a lot of work into it and it shows.
Nice simulator! I don't fully understand the details, but here are some suggestions if you want to try some more things out.
1. Include mortality improvement. For example you can assume mortality improves by 1% per year to take into account medical advances and all that good stuff.
2. You can use the mortality rates to generate a vector of probability of surviving to each age, therefore removing stochastic mortality from your simulator. I think the only thing that should use random simulation is investment returns.
3. You could try adding some simple dynamic strategies like "age in bonds", or at least a "stop taking risk when future success is almost assured with bonds" line.
I think you mus have put a lot of work into it and it shows.
Re: Simulator
Thanks for your feedback.actuaryinvestor wrote:1. Include mortality improvement. For example you can assume mortality improves by 1% per year to take into account medical advances and all that good stuff.
I have now included some comments suggesting people understate their age by 13 years if they wish to include the effect of medical advances. The impact on the results is likely to be small. (From 1901 to 2004 remaining life expectancy for a 65 year old in the US has only increased by 0.07 years per year).
It gets more complex when simulating a couple and wanting to reduce expenses when one party dies, A random Monte Carlo death simulation is the easiest way to simulate this.2. You can use the mortality rates to generate a vector of probability of surviving to each age, therefore removing stochastic mortality from your simulator. I think the only thing that should use random simulation is investment returns.
Good idea! I now simulate "age in bonds". For the test runs I performed "age in bonds" seems like a good strategy, never achieving, but consistently coming close to the fixed stock/bond ratio with the highest success probability.3. You could try adding some simple dynamic strategies like "age in bonds", or at least a "stop taking risk when future success is almost assured with bonds" line.
HARS  Historical Actuarial Retirement Simulator
The mean return referred to in the formula is the arithmetic mean (the median return is the geometric mean). I think you interpreted it as the geometric mean.
I recalculated the parameters set up by you entering a real rate of return in your simulator which results in the required arithmetic mean. The results are shown below. It is a pretty good fit considering the different methods used to generate returns data.
The genius of Milevsky’s formula is that he does not assume a constant probablity of dying. He uses the Gompertz distribution function.
Download the spreadsheet at this link labelled, “Lecture #2, Spreadsheet #4: "RP2000 Table v Gompertz v Exponential Approximation” (M.A. Milevsky) 31 KB, May 2006” to see how good the fit is between the function and actual mortality data.
http://www.ifid.ca/cri.htm
If the formula returns an error it should be interpreted as a 100% probability of ruin.
I recalculated the parameters set up by you entering a real rate of return in your simulator which results in the required arithmetic mean. The results are shown below. It is a pretty good fit considering the different methods used to generate returns data.
The genius of Milevsky’s formula is that he does not assume a constant probablity of dying. He uses the Gompertz distribution function.
Download the spreadsheet at this link labelled, “Lecture #2, Spreadsheet #4: "RP2000 Table v Gompertz v Exponential Approximation” (M.A. Milevsky) 31 KB, May 2006” to see how good the fit is between the function and actual mortality data.
http://www.ifid.ca/cri.htm
If the formula returns an error it should be interpreted as a 100% probability of ruin.
Thank you. You are correct I had been using the geometric mean and I should have been using the arithmetic mean. I agree the results are now in pretty good agreement considering the different methods used. In fact the difference between the two methods used is less than the difference reported by my simulator when you make a small change and change the gender from male to female.Verde wrote:The mean return referred to in the formula is the arithmetic mean (the median return is the geometric mean). I think you interpreted it as the geometric mean.