analyzing and computing cash flows
introduction
financial toolbox™ cash-flow functions compute interest rates and rates of return, present or future values, depreciation streams, and annuities.
some examples in this section use this income stream: an initial investment of $20,000 followed by three annual return payments, a second investment of $5,000, then four more returns. investments are negative cash flows, return payments are positive cash flows.
stream = [-20000, 2000, 2500, 3500, -5000, 6500,...
9500, 9500, 9500];
interest rates/rates of return
several functions calculate interest rates involved with cash flows. to compute the internal rate of return of the cash stream, execute the toolbox function
ror = irr(stream)
ror = 0.1172
the rate of return is 11.72%.
the internal rate of return of a cash flow may not have a unique value. every time the
sign changes in a cash flow, the equation defining can give up to two additional answers. an irr
computation requires solving a polynomial equation, and the number of real roots of such an
equation can depend on the number of sign changes in the coefficients. the equation for
internal rate of return is
where investment is a (negative) initial cash outlay at time 0, cfn is the cash flow in the nth period, and n is the number of periods. finds the rate r such that the present value of the cash flow equals the initial investment. if all the cfns are positive there is only one solution. every time there is a change of sign between coefficients, up to two additional real roots are possible.
another toolbox rate function, , calculates the effective rate of return given an annual interest rate (also known as nominal rate or annual percentage rate, apr) and number of compounding periods per year. to find the effective rate of a 9% apr compounded monthly, enter
rate = effrr(0.09, 12)
rate = 0.0938
the rate
is 9.38%.
a companion function computes the nominal rate of return given the effective annual rate and the number of compounding periods.
present or future values
the toolbox includes functions to compute the present or future value of cash flows at
regular or irregular time intervals with equal or unequal payments: , , , and . the -fix
functions
assume equal cash flows at regular intervals, while the -var
functions
allow irregular cash flows at irregular periods.
now compute the net present value of the sample income stream for which you computed the internal rate of return. this exercise also serves as a check on that calculation because the net present value of a cash stream at its internal rate of return should be zero. enter
npv = pvvar(stream, ror)
npv = 5.9117e-12
the npv
is very close to zero. the answer usually is not
exactly zero due to rounding errors and the computational precision
of the computer.
note
other toolbox functions behave similarly. the functions that compute a bond's yield, for example, often must solve a nonlinear equation. if you then use that yield to compute the net present value of the bond's income stream, it usually does not exactly equal the purchase price, but the difference is negligible for practical applications.
depreciation
the toolbox includes functions to compute standard depreciation schedules: straight line, general declining-balance, fixed declining-balance, and sum of years' digits. functions also compute a complete amortization schedule for an asset, and return the remaining depreciable value after a depreciation schedule has been applied.
this example depreciates an automobile worth $15,000 over five years with a salvage value of $1,500. it computes the general declining balance using two different depreciation rates: 50% (or 1.5), and 100% (or 2.0, also known as double declining balance). enter
decline1 = depgendb(15000, 1500, 5, 1.5) decline2 = depgendb(15000, 1500, 5, 2.0)
which returns
decline1 = 4500.00 3150.00 2205.00 1543.50 2101.50 decline2 = 6000.00 3600.00 2160.00 1296.00 444.00
these functions return the actual depreciation amount for the first four years and the remaining depreciable value as the entry for the fifth year.
annuities
several toolbox functions deal with annuities. this first example shows how to compute the interest rate associated with a series of loan payments when only the payment amounts and principal are known. for a loan whose original value was $5000.00 and which was paid back monthly over four years at $130.00/month:
rate = annurate(4*12, 130, 5000, 0, 0)
rate = 0.0094
the function returns a rate of 0.0094 monthly, or about 11.28% annually.
the next example uses a present-value function to show how to compute the initial principal when the payment and rate are known. for a loan paid at $300.00/month over four years at 11% annual interest
principal = pvfix(0.11/12, 4*12, 300, 0, 0)
principal = 1.1607e 04
the function returns the original principal value of $11,607.43.
the final example computes an amortization schedule for a loan or annuity. the original value was $5000.00 and was paid back over 12 months at an annual rate of 9%.
[prpmt, intpmt, balance, payment] = ...
amortize(0.09/12, 12, 5000, 0, 0);
this function returns vectors containing the amount of principal paid,
prpmt = [399.76 402.76 405.78 408.82 411.89 414.97 418.09 421.22 424.38 427.56 430.77 434.00]
the amount of interest paid,
intpmt = [37.50 34.50 31.48 28.44 25.37 22.28 19.17 16.03 12.88 9.69 6.49 3.26]
the remaining balance for each period of the loan,
balance = [4600.24 4197.49 3791.71 3382.89 2971.01 2556.03 2137.94 1716.72 1292.34 864.77 434.00 0.00]
and a scalar for the monthly payment.
payment = 437.26
see also
| | | | | |