# Calculating the ideal initial capital value to optimize a growth model

I'm trying to work out a method for finding the initial capital value that allows someone to run out of money at the exact time they reach mortality. Currently, I'm graphing the annual total capital values through an iterative method. I have a pre-calculated list of the annual expenses (discrete values unique to each year), and I know the growth.

The iterative method I use when I know the initial capital value is simple, and works as follows
Given an initial value $x_0$ , the next year's total capital value is the growth of the previous year's value $x_0(1 + growth)$ minus the expenses for that year. This value, $x_1$ , is then used to determine the next year's total $x_1(1+growth) - expenses$, and so on until we reach the mortality date.

I now need to find the initial value $x_0$ given that the final value must be 0. I've tried implementing a type of binary-search simulation where I try find the starting value that gives the end value closest to 0, but that is both fairly computationally expensive for a live graphing application as well as quite an ugly solution.

Is there a better method for solving this problem? Or is this simply a boundary condition that cannot be inferred from the end result?

• Are the time of death, the spending rate and the growth rate deterministic? If so it seems like a simple difference equation which can be solved backwards in time... – noob2 Aug 10 '17 at 15:47
• You have to specify whether the growth rate and expense are stochastic, or deterministic or even constant. – Hans Aug 10 '17 at 16:55
• @noob2 I thought so too; however, the spending rate (expenses) is stochastic, and although the growth factor is constant, it depends on the capital value from the previous year which is related to expenses of that year. It's possible that I've become stuck in an iterative thinking rut, but I'm pretty sure that the discrete expense values necessitate a step by step solution rather than a simplified equation.. – Lunrtick Aug 10 '17 at 18:06
• @Hans the expenses are stochastic but their values are known in advance, and the growth factor is constant. – Lunrtick Aug 10 '17 at 18:07

At the end of each year you have wealth $X_t$ in an investment account which grows at the rate $r$.

At the beginning of each year you withdraw the amount $W$ and keep it in cash to pay for your expenses through the coming year.

For your investment to last $n$ years you need to start with $X=W+W\frac{1}{1+r}+\cdots+W\frac{1}{(1+r)^n}$. In this way you will be able to live for $n+1$ years

Using geomteric series summation formula this can be rewritten in closed form as $X=\frac{W}{r}[1+r-\frac{1}{(1+r)^n}]$

For example to live for 1 year ($n=0$) you need to start with $W$ (which you will immediately withdraw for spending)

To live for 2 years ($n=1$) you need $W\frac{2+r}{1+r}$

And so on.