Monday, August 13, 2007

Understanding IRR on Investment Assets

By Mike Benson

A major part of my programming and personal knowledge are in the area of finance and financial calculations. I have been in that space for pretty much all of my working adult life (15+ years). I have worked on several production systems for public use and numerous systems for internal (1 firm) use.

I decided that in this version of my blog I would start sharing some of the knowledge in both technical (programming terms) and some of it in personal or business terms. I am writing this post because IRR vs. TWR and when to use each one is confusing to many investors. I will start with IRR then go To TWR and then I may put some code up on how to calculate these. Now on to the post.

“Internal Rate of Return (IRR) discount rate at which the present value of the future cash flows of an investment equal the cash flows of an ivestment equal the cost of the investment.”
Barrons Dictionary of Finance and Ivestment Terms

This may look odd as when you receive the IRR on a mutual fund or from your financial advisor there are no “future cash flows” there are only past cash flows. The definition above is the one you will usually find when you are looking at the definition of IRR and it really applies to something like an annuity or expected income from a business.

When you are looking at the IRR for an investment asset, you need to reverse this definition. It is the constant rate of growth that given your deposits and withdrawals will equal your ending value.

How is it calculated? This is the hard part, it’s calculated by trial and error. To calculate the IRR you use a modified form of the net present value formula.

IRR Formula

BV = beginning value
EV = ending value
N = is the number of cash flows
cf[i] = the ith cash flow
t[i] = the time from the inital deposit to the ith cash flow
tt = the total time from beginning to end
r = the rate of growth per period

All cash flows are from the investor perspective. Any deposits into the asset are negative and withdrawals out of the asset are positive. That is, a deposit into the asset is a cash outflow ( - ) from the investor and a withdrawal from the asset is a cash infow ( + ) to the investor. The last term in the equation “+ EV / (1+r)^tt” turns the ending value into a cash flow at the end of the measurement period.

Lets do a quick example:

01/01/06 Deposit $12,000
06/30/06 Withdraw 4,000
06/30/06 Ending Value 9,000

Changing this into our mathematical formula, we get:
0 = -12,000 + [4,000 / (1+r)^180] + [9000 / (1+r)^180]

Now, remember that we are trying to solve for r. If you play around with this (or use the solver in excel like I did) you will find the answer is 0.000444780594724729.

Your first thought may be that this looks terribly low. If you look a little more closely at my formula you will see this “(1+r)^180″, I am raising the rate to the power 180; that means that this return is a daily rate since the total period is also 180.

To convert this into the form of an annual return you have to raise the result to the 360 (assuming 360 days in the year). [(1+r)^360]-1 = [(1+0.000444780594724729)^360]-1 = .17 or 17 percent. (1+r)^360 is your raw return, you then subtract the one out at the end to turn it into a percentage.

Thats not a bad return at all. You started with 12,000 took out 4,000 and ended at 9,000. So you made 1,000 on your investment. You can do a simple test to verify this. Take your initial investment times your annual rate of return. 12,000 * 1.17 = 2040. Remember though that we were only invested for 180 days or half the year. 2040 / 2 = 1020 pretty close to what we expect. Note: this quick method only works when there are no cash flows or the cash flow is at the beginning or end of the period.

Okay, now lets try a slightly more complex example.

01/01/06 Deposit $12,000
06/30/06 Withdraw 4,000
09/17/06 Deposit 18,000
11/03/06 Withdraw 2,000
12/30/06 Value 25,000

Here is what our formula ends up looking like:
0 = -12,000 + [4,000 / (1+r)^180] + [-18,000 / (1+r)^259] + [2,000 / (1+r)^306] + [25,000 / (1+r)^364]

Solving for r, we get 0.000179961. Turning this into an annual rate (using 364 days) we get (1+r)^364 = 1.067692544 or 6.76%.

In the beginning of this, I said that IRR is calculated by trial and error. If you cheated (like I did) and used excel or a financial calculator then this was trivial. But if you put the formula into excel and try to guess the answer you will end up doing something like this. Try 0%, too low, 1% too high, .05 too high etc… you basically have to go back and forth until you get the answer. This by the way is a bisection (or binary) search and there is a whole branch called iteration theory that deals with this. For more on that, recommend that you check out the book Analysis of Numerical Methods by Eugene Isaacson and Herbert Bishop Keller, ISBN: 0486680290.

There are several problems with the IRR as a measure of performance for a personal investment asset:


  1. IRR is cash flow sensitive. The amount or timing of deposits and withdrawals change the results. Plug in some different numbers and check it out. A lot of cash flows or highly variable cash flow, such as in a money market checking account can throw the formula way out of wack.

  2. There may be more than one solution to the problem. (Remember a negative times a negative is a positive)

  3. There may be no solution to the problem, this can happen when a lot of cash flows happen over a long period of time.

  4. The manager of the fund really has no control over the timing of your deposits or withdrawals. Your timing should not penalize or reward the manager. The same is true for your financial advisor, if you are making regular deposits or withdrawals to your account your timing is effecting the results and your advisor should not be penalized or rewarded for this.


So whats the answer to this problem? Use a Time Weighted Return.

No comments:

Google