Rate of Return

Suppose you invest amounts A1, A2 and A3 for periods T1, T2 and T3 (measured in years).
If your annualized Rate of Return is R (R = .123 means 12.3% return), then:
A1(1+R)T1 + A2(1+R)T2 + A3(1+R)T3
is the present value of your Portfolio, meaning that:
the investment A1 has grown to A1(1+R)T1 after T1 years of growth at the rate R
the investment A2 has grown to A2(1+R)T2 after T2 years of growth at the rate R
etc.

Example: Suppose your portfolio is now worth $12,345.
             The first $1,000 you invested was 3.315 years ago,
             then another $5,000 you invested 2.315 years ago,
             then you withdrew $1,000 just 1.312 years ago.
(Note: 1210 days is 1210/365 = 3.315 years)

We must have
(1)     1000(1+R)3.315 + 5000(1+R)2.315 - 1000(1+R)1.312 = 12,345
and the problem is to determine the value of R.

Note that the $1,000 withdrawal is stuck in as a negative number, since the final value of this $1,000, namely 1000(1+R)1.312, must be deducted from your current Portfolio. (That's money you DIDN'T make over the last 1.312 years!)

If the investments A1, A2, A3 etc. are made periodically (say every month) then the return R is called (I think!) the Internal Rate of Return (or IRR) ... tho' this may be extended to non-periodic investments via XIRR ... but IRR usually refers to the interest rate when computing the "Present Value" of a series of future, periodic payments, like maybe the "present balance" owing, for a mortgage which involves umpteen monthly payments in order to retire the mortgage.

Okay ... t'ain't easy to solve for R=.39803 (meaning 39.803%). It means finding where
1000(1+R)3.315 + 5000(1+R)2.315 - 1000(1+R)1.312 - 12,345
has the value 0 *.
The value of f(R) = 1000(1+R)3.315 + 5000(1+R)2.315 - 1000(1+R)1.312 - 12,345
versus R (expressed as a percentage) is shown below.

Newton does it by guessing (say 20% ... that's the RED DOT),
then moving along the tangent line (to the BLUE DOT), and using that as our next guesstimate, etc. etc.
(Note how much closer the BLUE DOT is to the point where the curve has a value 0.)

Tho' it ain't easy to find R, it IS easy to verify that this is your Return, simply by
substituting R=.39803 in the left-side of the equation (1), like so:
1000(1.39803)3.315 + 5000(1.39803)2.315 - 1000(1.39803)1.312
and getting (surprise!) 12,345 (to the nearest dollar).


* In case you want a formula, we let:
f(x) = 1000(1+x)3.315 + 5000(1+x)2.315 - 1000(1+x)1.312 - 12,345
and we want to solve f(x) = 0.
We calculate the derivative f'(x) = df/dx and generate the Expression:
x - f(x)/f'(x) which we'll call E(x).
If R0 is our guess at the exact value of R, then we improve upon this guess by computing
R1 = E(R0).
Then we improve upon R1 by computing:
R2 = E(R1).
Then we improve upon R2 by computing:
R3 = E(R2).

Then we improve upon R3 by computing:
R4 = E(R3).

... and how do we get the initial guess, R0?
First (to mimic what the spreadsheet does: click here to see what the spreadsheet looks like) we do the following:

  1. We write down the magic formula:
    f(x) = A1(1+x)T1 + A2(1+x)T2 + A3(1+x)T3 + ... + AN(1+x)TN - P

    where the various investment amounts are A1, A1, etc. (noting that a withdrawal from your portfolio is identified by making the amount negative). Also, the numbers T1, T1, etc. are the various lengths of time (in years) since the investments were made. Finally, P is the current value of your portfolio.
  2. Now replace terms like (1 + x)T by the approximation (1 + Tx)
  3. Rewrite the equation with these approximations in place:
    f(x) = A1(1+T1 x) + A2(1+T2 x) + A3(1+T3 x) + ... AN(1+TN x) - P

    where x is the Yearly Return ... and we want to solve f(x) = 0 for x!
  4. Uh ... for simplicity, lets use the notation Σ un to represent the sum u1 + u2 + u3 + ... + uN.

    Okay, we solve for the "Linear" approximation x and get:

    x = { P - Σ An} / ΣAnTn
  5. This'll give an approximation to your annual rate of return. (If it turns out that x = .123, it means your return is approximately 12.3%) This approximation is related to the a modified Dietz approximation and is some kind of "accepted standard" ... even tho' it's only an approximation - but it's easy, fast and pretty good. See Dietz.

    See also: Newton's Method

    to download the .ZIPd spreadsheet

    ... ain't Math wunnerful?