home *** CD-ROM | disk | FTP | other *** search
- Realized Rates of Return Revisited
- By Robert Osterlund
- Computerized Investing, May 1987
-
- For the May 1985 issue of Computerized Investing, I wrote a BASIC program
- (RRR.BAS) to compute the realized rate of return, or internal rate of return
- (IRR), for any investment situation involving uneven, irregularly timed cash
- flows. For this issue I have rewritten the RRR program in spreadsheet form.
- This new version fixes the main defect of the earlier BASIC version--its lack
- of a data saving capability--and it improves upon the built-in spreadsheet IRR
- function, which only works for investments having regularly spaced cash flows.
-
- Before proceeding, I want to thank CI reader Kirk Randall, whose ideas served
- as both inspiration and outline for the resultant spreadsheet model.
-
- Also, I should define what is meant by "internal rate of return." For
- prospective investments, IRR is the uniform discount rate that equates the
- present value of an investment's expected returns with its cost--in other
- words, the discount rate that reduces the net present value (NPV) of an
- investment to zero. IRR may also be applied to past investments or investments
- in progress. Think of an investment as a continuously compounded savings
- account with the same pattern of deposits (inflows) and withdrawals (outflows)
- as the investment. Then its IRR is the compound effective interest rate that
- the account would have to earn in order to grow to its final, or current,
- value.
-
- The IRR model appears below. Formulas are provided for the two spreadsheet
- programs most popular with our readers: Lotus 1-2-3 and Microsoft Multiplan.
- (Owners of other spreadsheet programs should have no trouble designing their
- own templates using the versions given here as guides.) Copy the formulas in
- cells D5 (R5C4) and E5 (R5C5) down to cell ranges D6..D14 (R6:14C4) and E6..E14
- (R6:14C5). (If you need space for more than ten cash flows, insert as many
- rows as needed before row 15, then copy the formulas in D5 and E5 down their
- columns to the newly created blank cells.) Named cell ranges include three
- cells containing macros--A18 (R18C1), A20 (R20C1), and A22 (R22C1), invoked by
- ALT-R, ALT-C, and ALT-I respectively. (If your spreadsheet doesn't support
- named cell ranges, simply substitute the appropriate numbered cell reference
- for any name appearing in a formula.) The other cells are either left blank or
- filled with the text (alpha) labels shown.
-
-
- A/1 B/2 C/3 D/4 E/5
- 1 INTERNAL RATE OF RETURN
- 2 --------------------------------------------------------------------------
- 3 Date Description Amount V(I) V'(I)
- 4 --------------------------------------------------------------------------
- 5 9-Mar-82 1981 Contribution $2,000.00 $2,000.00 $0.00
- 6 23-Mar-83 1982 Contribution $2,000.00 $1,674.66 ($1,738.89)
- 7 25-Feb-84 1983 Contribution $2,000.00 $1,428.76 ($2,810.55)
- 8 15-Apr-85 1984 Contribution $2,000.00 $1,176.34 ($3,651.48)
- 9 27-Mar-87 1986 Contribution $2,000.00 $843.11 ($4,259.46)
- 10 20-May-87 Current Balance ($17,329.45) ($7,122.87) $37,038.93
- 11 $0.00 $0.00
- 12 $0.00 $0.00
- 13 $0.00 $0.00
- 14 $0.00 $0.00
- 15 ------------- -------------
- 16 Totals $0.00 $24,578.55
- 17 --------------------------------------------------------------------------
- 18 'RC'IF(ISN Iante: 0.00% Ipost: 17.10%
- 19 'QU
- 20 'VAWhat is IRRestimated: 0.00% IRRactual: 18.65%
-
-
-
-
- ------------ LOTUS 1-2-3 ------------ ------------- MULTIPLAN -------------
-
- Named Ranges-- Named Ranges--
-
- V: D16 T1: A5 V: R16C4 t1: R5C1
- VPRIME: E16 IANTE: C18 Vprime: R16C5 Iante: R18C3
- \R: A18 IPOST: E18 RUN: R18C1 Ipost: R18C5
- \C: A20 IRRESTIMATED: C20 CONT: R20C1 IRRestimated: R20C3
- \I: A22 IRRACTUAL: E20 INIT: R22C1 IRRactual: R20C5
-
- Formulas-- Formulas--
-
- D5: +C5*@EXP($IANTE*($T1-A5)/365) R5C4: RC[-1]*EXP(Iante*(t1-RC[-3])
- E5: +D5*($T1-A5)/365 /365)
- D16: @SUM(D5..D14) R5C5: RC[-1]*(t1-RC[-4])/365
- E16: @SUM(E5..E14) R16C4: SUM(R[-11]C:R[-2]C)
- C18: @IF(@ISNA($IRRACTUAL),$IPOST, R16C5: SUM(R[-11]C:R[-2]C)
- @LN(1+$IRRESTIMATED)) R18C3: IF(ISNA(IRRactual),Ipost,
- E18: +$IANTE-@IF(@ABS($VPRIME)<0.1, LN(1+IRRestimated))
- 0.01*($V/(@ABS($V)+0.0001))* R18C5: Iante-IF(ABS(Vprime)<0.1,
- ($VPRIME/(@ABS($VPRIME)+0.0001)), 0.01*SIGN(V)*SIGN(Vprime),
- $V/$VPRIME) V/Vprime)
- E20: @IF(@ABS($IANTE-$IPOST)< R20C5: IF(ABS(Iante-Ipost)<1E-08,
- 0.00000001,@EXP($IPOST)-1,@NA) EXP(Ipost)-1,NA())
- A18: '{calc}/xi@ISNA($IRRACTUAL)~ R18C1: 'RC'IF(ISNA(IRRactual))'
- /xg\r~ 'GORUN'
- A19: '/xq~ R19C1: 'QU
- A20: '/xnWhat is the estimated rate?~ R20C1: 'VAWhat is the estimated
- IRRESTIMATED~{goto}IANTE~ rate?'IRRestimated'gnIante
- @LN(1+$IRRESTIMATED)~{calc} 'RTvLN(1+IRRestimated)'RT'RC
- @IF(@ISNA($IRRACTUAL),$IPOST, vIF(ISNA(IRRactual),Ipost,
- @LN(1+$IRRESTIMATED))~/xg\r~ LN(1+IRRestimated))'RT'GORUN'
- A22: '/wgrm/wgrc/wgri1~ R22C1: 'CNon'TB'TBn'RT
-
-
- To ensure that you have set up the model correctly, enter the test data in the
- figure. (Note that, in this example, no contribution was made to the IRA in
- 1985.) Then, after solving for the rate of return, if all of your displayed
- values match those in the figure identically (or nearly so), you can blank all
- the data ranges and save the template to disk.
-
- You use the DATE function to enter the dates in column A (1). With Lotus 1-2-
- 3, for example, you would enter the formula @DATE(82,3,9) in cell A5. To
- display dates in the proper format, apply 1-2-3's /Range Format Date command to
- this and all other cells containing dates. (With Multiplan, the formula
- DATE(1982,3,9) would go in cell R5C1. Use the Format Time-Date Cells option to
- format all the date cells.) The text values in column B (2) are short
- descriptions of each transaction or cash flow. Cash flow amounts are entered
- in column C (3).
-
- Pay special attention to the question of sign as you enter cash flow amounts.
-
- When evaluating the historical performance of a stock portfolio or mutual fund,
- it makes sense to use the savings account analogy. Then "deposits"--the
- initial account balance and any other infusions of cash from the outside--
- should be positive in sign, while "withdrawals"--income not reinvested--should
- be negative in sign. The final, or current, account value should also be
- negative (as if you closed out the account at the end).
-
- When determining the yield-to-maturity for a bond, on the other hand, you might
- find it more sensible to think in terms of investment costs and benefits. Then
- the bond's purchase price would be a negative amount, while its face value and
- any interest received would be positive.
-
- The question arises: How do you handle income reinvestment? If interest or
- dividends are immediately reinvested in the same investment vehicle, just
- ignore them; they are accounted for implicitly in the final investment value.
- If you apply them to some other investment or take them in the form of a cash
- benefit (i.e., you "consume" them), you should record that as an external cash
- flow. Income reinvested after some delay should be counted as two separate
- cash flows--the first occurring when the income is earned and the second (which
- should be opposite in sign from the first) when it is reinvested.
-
- What about taxes and incidental costs, such as commissions and other service
- fees? If you pay for these out-of-pocket, then enter each instance of them as
- a separate cash flow. If, however, they take the form of deductions from the
- investment's value, then there is no need to account for them explicitly.
-
- Before solving for the IRR, make sure you set the recalculation parameters
- correctly! For Lotus 1-2-3, set the recalculation method to Manual, the order
- of recalculation to Columnwise, and the iteration count to 1. For Multiplan,
- automatic recalculation and iteration should both be turned off. If you press
- the ALT-I key combination, this invokes the initialization macro in cell A22
- (R22C1), which adjusts the recalculation parameters to their proper settings
- automatically.
-
- With all the cash flow data in place and the recalculation parameters properly
- set, the next thing to do is enter 0 (zero)--the best initial estimate for the
- IRR--in cell C20 (R20C3). Then, press the ALT-R key chord to start the program
- running. At first, the value NA (#N/A)--meaning "the answer is not yet
- available"--shows up in cell E20 (R20C5). Before too long, a percentage figure
- should appear in that cell. This figure is the calculated and actual (correct
- to the nearest basis point) internal rate of return.
-
- Most investments are "well-behaved" in the sense that given an initial IRR
- estimate of 0%, the model will produce the actual IRR within five to ten
- program iterations. For certain "ill-behaved" investments, however, the model
- will just keep looping and looping and never reach an answer. To break out of
- the endless loop, press CTRL-BRK (for Lotus 1-2-3; for Multiplan, just press
- the ESC key). To continue, press ALT-C. You will be asked to supply another
- estimated rate. This time, choose one different from 0%, say 50%. The program
- then resumes operation. If the second estimate fails also, keep interrupting
- the program and trying different estimated rates (possibly even negative ones,
- for unprofitable investments) until you find an estimate that works.
-
- If the program fails to converge on an answer, or if it halts due to an an
- error condition (overflow, for instance), bear in mind: You may have entered
- an amount (or amounts) as positive (negative) when it should have been negative
- (positive). It is a common mistake to get the sign of the final investment
- value wrong. Or it could be that you entered one or more formulas incorrectly.
- Double-check, also, to see that the recalculation parameters were set properly.
-
- In some rare investment situations, more than one IRR may be "correct," in the
- sense that it results in a zero NPV. Consider, for example, the following
- sequence of cash flows (with two changes of sign): 100, -300, 200, each one
- year apart. There are two different discount rates that reduce this sequence
- of cash flows to zero NPV:
-
- 2 1 0
- 0%: 100*(1+0) - 300*(1+0) + 200*(1+0) = 0
-
- 2 1 0
- 100%: 100*(1+1) - 300*(1+1) + 200*(1+1) = 0
-
- The greater the number of sign changes, the higher the likelihood of there
- being multiple "correct" rates of return. In unusual cases like these, if you
- get one answer but suspect there might be another, you can rerun the program
- with different estimated rates (100% or -50%, for example). Usually, though, a
- 0% estimated rate will result in a single, unique, and best answer.
-
- What if your spreadsheet doesn't support macros? First, enter the model minus
- the macros, then save it to disk. Next enter 0% as the estimated IRR. Then,
- press the "calc" key (F9 for 1-2-3; F4 or ! for Multiplan) as many times as
- necessary until an answer appears in cell E20 (R20C5). With luck, you will
- never encounter an "ill-behaved" investment. But if you do, and the value in
- D16 (R16C4) trends stubbornly away from zero or flip-flops between the same two
- nonzero values, then you will have to try the following: (1) enter a different
- estimated IRR in C20 (R20C3); (2) enter the formula @LN(1+IRRestimated) in C18
- (R18C3; for Multiplan, omit the "@"); (3) initiate one, and only one, manual
- recalculation; (4) now reenter the formula shown in the figure for cell C18
- (R18C3); and finally, (5) press the "calc" key as many times as necessary until
- the IRRactual figure appears in E20. If none appears after ten or so
- iterations, then you will have to go back to step (1) and start the process all
- over again with some other estimated rate. Do this enough times, and you'll
- soon be longing for a spreadsheet program with macros.
-
- (c) Copyright 1987 by the
- American Association of Individual Investors