Prob.Set 4, problem 4. I think I am reading this problem incorrectly. Is it the max amount to withdraw during retirement only, or both retirement and working years?
Right now my result is 1213.35... if I make the total term to calculate == post+pre retirement. So I am off by about 16$.
what language are you coding in and where do you get your problem sets?
the problem deals with savings, not total income. The idea is that you save a certain amount every year after expenses, and don't start withdrawing until you retire, after which you withdraw the same amount each month.
sasogeek: Using Python 2.7. Problem sets are from the Opencourseware.
Sorry, I meant to use consistent units of time.
In that case, if I start withdrawing at Retirement, then by the problem, that would make the amount of time I retire == 5 years -> 1 for each value in PostRetireGrowthRates. In that case, my maxexpenses boost to 2335.53, which is more than double what is marked in the ps.assignments...because I need to withdraw enough each year, where at the end of my retirement I am left with nothing. That is how I am reading it...but then my result doesn't match the ps.set. handout.
@Somnamniac: I was thinking about what you said and realized I had to use my function for problem 2, within this new function., as my salary for the maxexpenses. Once I did that - my code spat out 1229.95 as indicated. Thanks for getting me to think a little!
Join our real-time social learning platform and learn together with your friends!