News for hackers. Stuff that matters.
Re:Show HN: Stochastic Retirement Simulator Weekend Project by RockyMcNuts on Tuesday July 07, 2015 @02:32PM (#9847264)
I did a little hack in this space a couple of years back, called it the 'Cat Food Calculator' -

http://blog.streeteye.com/calculator/

The issue with OP's calculator is, one has to enter an assumption for the rate of return after taxes and fees.

Also you can average 7% return in retirement, but you have a big market drop early in your retirement, you run out of money even if the market makes it up 10 years down the road. You can't spend an average.

I was trying to deal with the question of a safe spending rate based on historical returns.

Enter a stock/bond allocation, spending rate, couple of other assumptions, will show you, if you had retired using that gameplan in each year, 1928 up to the present, how long would it take to run out of money. And based on an actuarial life table, how likely you were to run out of money.

That should give some idea of how big a portfolio you need to have to spend the amount you want without running out of money. And then next step would be to figure out how much you need to save to get there.

If you hit the 'Visualize' button after running an initial simulation, you can drag some sliders around and see what happens...used Google's visualization API. Maybe I'll take another crack at a proper design.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by _dark_matter_ on Tuesday July 07, 2015 @03:41PM (#9847621)
Well really, as soon as you hit retirement, your savings should NOT be in such a volatile place where you'll eventually go bankrupt. Sure, some of it still in stocks, but you should be moving over to less return/lower risk portfolio options even as you start nearing retirement age. (In fact, this should be a gradual change as you rebalance your portfolio every year. You are rebalancing, right?)
Re:Show HN: Stochastic Retirement Simulator Weekend Project by RockyMcNuts on Tuesday July 07, 2015 @04:10PM (#9847770)
yes, assumes annual rebalancing, but static allocation eg. 60/40 stocks/bonds.

you're retiring for 30 years so you generally do better with a hefty allocation of stocks. try it, that's what the calculator is for :)

given an average return over your retirement, the order and volatility of returns has a significant impact on the amount it's safe to spend.

by choosing a less volatile portfolio you reduce risk allowing you to safely spend more, but you also reduce the return forcing you to spend less.

that's why I did the calculator, how to allocate and how much is safe to spend is not a question with an obvious answer.

there's a tradeoff between desire to spend as much as possible, on the one hand, and shortfall risk, on the other. interestingly, approaches that reduce equity allocation as you get older don't really improve the tradeoff much v. a static equity allocation.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by nsxwolf on Tuesday July 07, 2015 @03:14PM (#9847483)
This says I'm totally screwed and will be out of money in 5 years after I retire, while my retirement planner says I'm golden.

Oh well. This calculator also fails to take into account the effects of the singularity which everyone says is coming certainly before my retirement date, so I'm not sure if I should care.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by gommm on Tuesday July 07, 2015 @11:51AM (#9846178)
Very nice. One small nitpick though, the retirement income should be adjusted for inflation I think. Because otherwise, the retirement income in 40 years would pay for much less than at the time of retirement.
Re:Show HN: Stochastic Retirement Simulator Weekend Project by scottfr on Tuesday July 07, 2015 @01:25PM (#9846787)
The retirement income is adjust for inflation. All contributions and withdrawals are specified in today's dollars.

Internally, I model this be decreasing the Savings each time step to compensate for inflation.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by stevenmays on Tuesday July 07, 2015 @03:03PM (#9847427)
I think this is the wrong way to do it. I think you should probably increase spending. Decreasing savings reduces the income earned on compound interest, whereas spending has no effect.

Cool project though.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by kittenfluff on Tuesday July 07, 2015 @11:38AM (#9846087)
This is actually very cool! It's interesting to play around with strategies for using your retirement income, e.g.

  0.02 * [Savings]
with the idea of making your overall income path as stable as possible.
Re:Show HN: Stochastic Retirement Simulator Weekend Project by scottfr on Tuesday July 07, 2015 @01:29PM (#9846808)
Yep, that's why I built it!

There are some great retirement calculators out there (e.g. firecalc), but I wanted a sandbox where I could explore different strategies and heuristics.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by bkjelden on Tuesday July 07, 2015 @12:00PM (#9846239)
Very cool! I love it!

A couple small things:

* hitting the backspace key while editing any of the numbers seems to clear the entire box

* a cool expansion on this project would be to allow one input to be a variable - e.g. my current contribution rate, and draw some graphs showing how the value of that variable effects the the numbers in retirement - e.g. when I will run out of money.

* if you're looking for more audiences, /r/personalfinance and /r/financialindependence would love this.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by aggronn on Tuesday July 07, 2015 @12:22PM (#9846410)
Hopefully you've seen this:

https://networthify.com/calculator/earlyretirement

OP's tool is great, but this tool might address your second bullet point.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by scottfr on Tuesday July 07, 2015 @01:28PM (#9846800)
Thanks for the feedback!
Re:Show HN: Stochastic Retirement Simulator Weekend Project by elviiis04 on Tuesday July 07, 2015 @12:53PM (#9846592)
Great work. Thank you for sharing it. You'd be surprised how hard it is for big companies to make a tool like this.

Ideas to play with: 1) Have one of the outputs be a box and whisker output showing the percentiles of ages the person will run out of money.

2) Have a way a person could easily code a transition from an S&P500 portfolio to a fixed income portfolio over 5 to 10 years.

3) Add a generational mortality table on the back end and include a probability of death.

edited to clarify (2)

Re:Show HN: Stochastic Retirement Simulator Weekend Project by ForEnglandJames on Tuesday July 07, 2015 @03:58PM (#9847701)
>1) Have one of the outputs be a box and whisker output showing the percentiles of ages the person will run out of money.

This is essential, and I wish it hadn't been overlooked. The only power of stochastic modeling over deterministic modeling is in quantifying the likelihood of outcomes in the outcome space.

Unfortunately, this requires either crazy stochastic math, or multiple computations (monte carlo methods). I suspect the op is a great guy and just hasn't been exposed to these ideas yet. When he does, he's going have that head-slapping moment we all have when we first encounter it.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by scottfr on Tuesday July 07, 2015 @01:27PM (#9846793)
1) Love the idea. I think that would be a great visualization.

2) Agreed, a simple function for this would be nice. You can currently doing it using some math based on the year, but it is a pain.

3) I think this would require collecting more demographics data to have a reasonable level of accuracy. I think the added complexity in UI might not be worth the insights.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by Bostonian on Tuesday July 07, 2015 @01:20PM (#9846751)
Thanks for sharing. You allow the user to set the expected return (default of 7%) but assume zero volatility, which is unrealistic. I suggest adding an annualized volatility input -- for stocks you could use a default of say 18%. Ideally the output should show a range of outcomes, since stock returns are stochastic.

There is a forum called Bogleheads for financial planning by individual investors. I suggest presenting your calculator there.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by inetsee on Tuesday July 07, 2015 @01:43PM (#9846907)
There doesn't seem to be any place in the calculator for continuing income like pensions or Social Security payments. When I first ran the calculation I put what I'm drawing from my 401K plan and what I expect to get from pensions and Social Security into the retirement income field, and the calculator said my income will drop down to $0 by the time I am 70, which is incorrect.
Re:Show HN: Stochastic Retirement Simulator Weekend Project by vonmoltke on Tuesday July 07, 2015 @01:50PM (#9846959)
Defined benefit plans like that largely are what they are. Pensions are based almost entirely on how long you worked for the place offering the pension. Social Security is a bit more complicated, but is still based on how long you worked and how much you made.

This calculator is about modelling the effects of your savings rate, inflation, and return rate on the portion of your retirement income that is based on your savings. The defined benefit payments are constants for the purposes of this model.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by trisreed on Wednesday July 08, 2015 @06:58AM (#9850845)
An issue that I can imagine with modelling social security or pensions is that so much can change in the 20-40 years that many users would have until retirement - hence why I (and many others) don't plan based on it!
Re:Show HN: Stochastic Retirement Simulator Weekend Project by Nicholas_C on Tuesday July 07, 2015 @12:42PM (#9846518)
Very neat. What is interesting is how the market return affects the amount you have from retirement to 100. For the specifications I put in a 6% rate of return on the market would put me at about dead broke at 100, a 6.5% rate of return would put me at about even savings at 100, and at 7% I would gain savings from retirement until 100.
Re:Show HN: Stochastic Retirement Simulator Weekend Project by stygiansonic on Tuesday July 07, 2015 @12:34PM (#9846474)
Nice, great work! I liked the ability to use various random variables for a Monte Carlo simulation. I think this should be the default, like FIRECalc. [0]

0. http://www.firecalc.com/

Re:Show HN: Stochastic Retirement Simulator Weekend Project by pkaye on Tuesday July 07, 2015 @12:53PM (#9846594)
Very nicely done. What kind of tools does one use to create this.
Re:Show HN: Stochastic Retirement Simulator Weekend Project by icu on Tuesday July 07, 2015 @12:33PM (#9846468)
Hi, great job. Would you be so kind as to discuss your stochastic modelling?
Re:Show HN: Stochastic Retirement Simulator Weekend Project by abourbaki on Tuesday July 07, 2015 @01:06PM (#9846660)
Have you thought about a way to gather the data entered by users?
Re:Show HN: Stochastic Retirement Simulator Weekend Project by scottfr on Tuesday July 07, 2015 @01:19PM (#9846745)
The share button will embed your data in a url (Base64 Encoded JSON) that you can save or share with others. Your changes are also saved to local storage (use the Reset button to wipe that).

If you mean data harvesting for some sort of lead gen or analysis; absolutely not. I think this data is very private.

Re:Show HN: Stochastic Retirement Simulator Weekend Project by akshat_h on Tuesday July 07, 2015 @02:18PM (#9847144)
It is refreshing to see data not being collected for what is a free service. But as far as I know you are not collecting any personal information that may be used to identify a specific person. Can you clarify more on why you think data collection here is unethical?