Loading...

HOME MADE ANNUITY

Home Made Annuity

The math behind building an annuity from any investment, accounting for taxes, dividends, fees, and inflation.

The Home-Made Annuity is what I call an annuity made from another investment. For example, investing a lump sum of money into the S&P 500 and pulling out $X every year. The question I aim to answer is exactly how much should be deposited initially, given outflows of $X for n years — which is the present value of this annuity.

Simplifying Assumptions

This model makes the following assumptions:

  • The money received each year from the annuity is adjusted for inflation, but constant in base year dollars.
  • The present value of the annuity is positive.
  • The cash flows out are positive.

This model uses the following variable definitions:

  • is the return or interest in period i
  • is the inflation in period i
  • is the dividend payment in period i, after taxes (in dollars)
  • is the fee payment at period i (in dollars)
  • is the present value of the annuity for n periods
  • is the money required out of the fund, in base year dollars, every year
  • is the money required out of the fund after accounting for taxes, in base year dollars, every year

Let = and =

General Model

The basic definition of the present value of an annuity:

where n is the number of periods, and r is the rate (6% => r = 0.06). This model is the closed form of the sum of annuity payments discounted at rate r in each period; however, it won't be needed. The model takes into consideration the additional variates mentioned above.

The objective is to find out the amount that is needed to invest today, to pull out $X, adjusted for inflation, each year for n years. Let represent the annuity's value at period i; the initial investment, in 2 years, will be equal to:

This starts to get nasty quickly. What's happening is that every year the fund appreciates by value , dividends enter the fund, fees leave the fund, and A (some inflation) is withdrawn. For this model the end value must equal 0, so that only what is required to make the yearly withdrawals is deposited in the beginning. After doing this, the above formula can be solved in a more general sense to get an expression for .

For the 2-period scenario, this is a nice compact solution in the form of a sum. What about the n period scenario? A rigorous proof by mathematical induction would suffice, but I thought about it for a while and the n period sum makes sense logically, so I'll leave it as a proof by observations that

Not bad. This looks strikingly similar to the original Present Value of an annuity formula; this one cannot be made compact as all rates are variable and change in this model (like they do in real life). But there is still the problem of and ; recall that these numbers rely on the balance of the annuity lump sum in period i — meaning they rely indirectly on .

Dividends and Fees

How exactly is defined? Recall that it is the amount of money deposited in dividends at period i, not the percent return. This number is unknown! The dividend yield as a percent of the amount that is currently invested is, however, known. The dividends cannot be taken out as a percent return in period i in the model because taxes must be paid on them before re-investing, so they are defined to be cash payments. They also cannot be applied like the value A because they change in each period and are directly proportional to how much money is currently in the fund. The model fees are treated the same way, although the investor does not pay taxes on them.

To find , must first be derived — the balance of the annuity in the bank at period i. Assuming that : the dividend yield in period i and : the fee percent in period i are known:

Tax Function

Taxes, in the real world, are progressively calculated by tax brackets, and the tax function t() reflects this. The bracket function is a non-differentiable, not continuous, strictly increasing step function. The tax function takes dollars in the base year and returns the amount of dollars that would be paid in federal and state capital gains tax.

A vs P: P is defined as the amount desired each year, and A as the actual amount that must be pulled out of the fund to make that happen (both in base year dollars). So how is A defined in a formula?

Although, while taxes have been accounted for, tax on the taxes has not! If A is defined as above, less than P dollars will be returned. The real formula is:

This recurs infinitely — more, but a decreasing amount, of money will have to be pulled out of the fund to account for this difference; an approximation of A will have to suffice:

Accuracy around a tenth or hundredth of a cent is good enough.

Concise Model

With all the pieces in place, the exact form of the model comes into focus. Recall the general formula for the value of the annuity:

Let ; this is the function of the solution, and the RHS will remain constant with respect to the solution. The new formula to solve is:

Instead of trying to solve it explicitly, the proper may be found with logarithmic convergence using a (kind of) Newtonian algorithm for guessing the solution. This is possible because is strictly positive and our objective function is strictly increasing.

Algorithm

# first, calculate phi and psi (doable in o(n) time for number of periods), hold on to them
# next calculate C with this function, hold on to it as well.
def function1:
    C = 0
    for i in range(1,n+1):
        C += (A * phi[i])/psi[i]
    return C

# for our best guess, a_n
def function2:
    S2 = 0
    f = [0]
    d = [0]
    B = [alpha_1 * a_n]
    for i in range(1,n+1):
        B[i] = alpha[i]*(B[i-1] - A*phi[i-1] - f[i-1] + d[i-1])
        f[i] = B[i] * F[i]
        d[i] = B[i] * D[i] - t(B[i]*D[i]/phi[i])*phi[i]
        S2 += (f[i]-d[i])/psi[i]
    return S2

# make guesses until we get it right, narrow down choices logarithmically.
def function3:
    lowInitial = .01 # a reasonable lowest guess of the annuity's value
    highInitial = A * n * 10 # 10 times how much we're taking out.  Very high.
    lowGuess = function2(lowInitial)
    highGuess = function2(highInitial)
    while 1:
        newInitial = (highInitial + lowInitial)/2
        newGuess = function2(newInitial)
        if abs(newGuess-highGuess) > abs(newGuess-lowGuess):
            highInitial = newInitial
        else:
            lowInitial = newInitial
        # precision down to 1/1000 of a cent.  We can change this precision to improve performance
        if newGuess - C < .00001:
            return newGuess

The Quick and Easy Way

Wow, math sucks a lot. This is a cool formula, but it's abstract; I certainly don't have a real world interpretation of the constant C nor the function . After thinking about it, I decided there's a much simpler way to do this. The function used to logarithmically pick a good solution can be repurposed to find the root of a recursively defined function that finds the value of the annuity at time i. This is the same function from the general model:

Except re-defined recursively for period i:

When the true value of the annuity is correct, will hold. Let this new recursively defined objective function of be known as . Fortunately, f() is strictly increasing; the more one invests the more they receive. Guessing the that satisfies this is just as easy as finding the that satisfies .