A PROGRAM TO COMPUTE REALIZED RATES OF RETURN One of the most complex compound-interest problems, and a question frequently asked by our readers, is how to determine the realized rate of return, or time-weighted rate of return, on an investment portfolio where funds have been added and withdrawn subsequent to the initial investment. The problem is illustrated by the following example: $1,000 was invested two years ago. One year ago, $500 was withdrawn. Today, the investment is worth $1,000. What is the realized rate of return? You might think that because the current value is no greater than the initial value, the rate of return is zero. On second thought, you realize that this cannot be so. The simple procedure of subtracting the beginning amount from the ending amount and dividing by the beginning amount ignores the $500 cash flow (withdrawal) occurring in the middle of the investment period. (The true rate of return for the above example is 28.08%, by the way.) How does one go about incorporating intermediate cash flows into the analysis? One method, the so-called Dietz Algorithm, was described in the Investor Workshop of the October 1984 AAII Journal. This method of computing the time-weighted rate of return has several drawbacks, however. For one thing, the answer is only approximate. It assumes that the cash flows are more or less equal and evenly spaced throughout the investment period. The more unequal and irregularly timed are the cash flows, the more the given answer deviates from the true rate of return. Furthermore, the Dietz Algorithm requires you to know the value of the portfolio each time an addition or withdrawal occurred, information you might not now possess. A better method, indeed the only method if the portfolio values are not known prior to every cash flow, involves finding the internal rate of return (sometimes referred to as the dollar-weighted return). The internal rate of return (IRR) is the discount rate at which the net present value (NPV) of a series of cash flows reduces to zero. In a paper nearly 20 years ago, Lawrence Fisher of the University of Chicago formulated an efficient and elegant algorithm for determining IRR. The theory underlying the algorithm is too complicated to explain here. See the Journal of Business, January 1966 for elaboration. At the end of his article, Fisher supplied a small program, written in Fortran, to compute realized rates of return. The program given below is an adaptation of Fisher's original, with a number of significant changes: First, it has been converted to BASIC. Second, it incorporates Fisher's suggestion that the ending portfolio value be treated like any other cash flow. Third, Seymour Kaplan (Journal of Business, October 1967) has pointed out that, in certain common situations, Fisher's original algorithm fails to converge on any rate of return. Moreover, Fisher ignored the fact that in cash flows with two or more sign changes, there may be no single, unique rate of return. Consider for example, the following cash flows (with two changes of sign): 100, -300, 200, each one year apart. There are two different discount rates that reduce these cash flows to zero net present value: 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. To overcome these shortcomings, the program has been further modified to require the user to provide differing estimates of the realized rate of return (unlike Fisher's Algorithm, which always guesses zero at the outset). When you run the program, you are asked to enter up to 100 deposits or withdrawals. Deposits include the initial investment and any other additions to the portfolio. (Disregard reinvested interest and dividends, as they are accounted for automatically in the ending portfolio value.) All deposits should be positive amounts. Withdrawals are any disbursements from the portfolio, including interest and dividends not reinvested, and should be entered as negative amounts. The final, or current, portfolio value should also be negative (as if you liquidated the portfolio down to zero at the end). After entering "f" (for "finished"), you are asked to estimate the rate of return. Start out by guessing zero, and in most cases the program will converge on a single, unique answer. If the program tells you to "Try another estimated rate" (meaning it has failed to converge), or if you have one answer and you suspect there might be still others, you are invited to try additional estimates. Your estimates may be positive or negative, ranging from greater than -1 (i.e., -100%; under no circumstances should you guess as low as or lower than this) upward to 1 (100%) or more. If you encounter the error message "OVERFLOW," you probably entered an amount (or amounts) as positive when it should have been negative, or vice versa. Also, be sure you enter all four digits for the year, and the entire date exactly as follows: month (comma) day (comma) year. Many other programs exist to solve the IRR problem, but most of them (including those built into spreadsheets) assume fixed and/or regularly timed cash flows. This program is noteworthy for its flexibility and wide applicability. Besides using it to find the realized rate of return on an investment portfolio over time, you can use the program to find the promised yield on a bond or the annualized rate of return for any investment with no intermediate cash flows. It can also be used for project analysis (with costs negative and benefits positive)--indeed, any situation involving discrete cash flows where the dates are known. Robert Osterlund