calculate the internal rate of return of a set of cash flows - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Finance : Cash Flow Analysis : Finance/InternalRateOfReturn

Finance[InternalRateOfReturn] - calculate the internal rate of return of a set of cash flows

 Calling Sequence InternalRateOfReturn(cashflows, price, opts) InternalRateOfReturn(bond, price, opts)

Parameters

 cashflows - data structure created using the SimpleCashFlow constructor or a list of such data structures; cash flows price - real constant; market price of the set of cash flows bond - fixed or floating rate bond data structure; bond opts - equations of the form option = value where option is one of evaluationdate, compounding, daycounter, maxiterations, tolerance, or guess; specify options for the InternalRateOfReturn command

Description

 • The InternalRateOfReturn command calculates the internal rate of return of a set of cash flows or a bond. This is the rate at which the present value of the set of cash flows or the bond is equal to the given price. For bonds the internal rate of return is the same as the yield (see YieldFromCleanPrice and YieldFromDirtyPrice).

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $\mathrm{SetEvaluationDate}\left("Jan-01-2005"\right):$
 > $\mathrm{paymentdate1}:="Jan-02-2007"$
 ${\mathrm{paymentdate1}}{:=}{"Jan-02-2007"}$ (1)
 > $\mathrm{cashflow1}:=\mathrm{SimpleCashFlow}\left(100,\mathrm{paymentdate1}\right)$
 ${\mathrm{cashflow1}}{:=}{\mathrm{100. on January 2, 2007}}$ (2)
 > $\mathrm{value1}:=\mathrm{NetPresentValue}\left(\mathrm{cashflow1},0.05\right)$
 ${\mathrm{value1}}{:=}{90.47134762}$ (3)
 > $\mathrm{InternalRateOfReturn}\left(\mathrm{cashflow1},\mathrm{value1}\right)$
 ${0.05000000001}$ (4)

The following will throw an error because the specified number of iterations is insufficient to achieve the required precision.

 > $\mathrm{InternalRateOfReturn}\left(\mathrm{cashflow1},\mathrm{value1},\mathrm{guess}=0.02,\mathrm{maxiterations}=5\right)$
 > $\mathrm{InternalRateOfReturn}\left(\mathrm{cashflow1},90\right)$
 ${0.05260819182}$ (5)

Here is another example.

 > $\mathrm{nominalamt}:=100$
 ${\mathrm{nominalamt}}{:=}{100}$ (6)
 > $\mathrm{rate}:=0.05$
 ${\mathrm{rate}}{:=}{0.05}$ (7)
 > $\mathrm{paymentdate2}:="Jan-01-2015"$
 ${\mathrm{paymentdate2}}{:=}{"Jan-01-2015"}$ (8)
 > $\mathrm{startdate2}:="Jan-01-2006"$
 ${\mathrm{startdate2}}{:=}{"Jan-01-2006"}$ (9)
 > $\mathrm{enddate2}:="Jan-01-2010"$
 ${\mathrm{enddate2}}{:=}{"Jan-01-2010"}$ (10)
 > $\mathrm{coupon2}:=\mathrm{FixedRateCoupon}\left(\mathrm{nominalamt},\mathrm{rate},\mathrm{startdate2},\mathrm{enddate2},\mathrm{paymentdate2}\right)$
 ${\mathrm{coupon2}}{:=}{\mathrm{20. on January 1, 2015}}$ (11)

Compute the value of this cash flow on January 1, 2005.

 > $\mathrm{value2}:=\mathrm{NetPresentValue}\left(\mathrm{coupon2},0.07\right)$
 ${\mathrm{value2}}{:=}{9.931706076}$ (12)
 > $\mathrm{InternalRateOfReturn}\left(\mathrm{coupon2},\mathrm{value2}\right)$
 ${0.06999999998}$ (13)

Here is an example using bonds.

 > $\mathrm{bond}:=\mathrm{FixedCouponBond}\left(100,5,\mathrm{Years},0.05\right)$
 ${\mathrm{bond}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (14)
 > $\mathrm{npv}:=\mathrm{NetPresentValue}\left(\mathrm{bond},0.03\right)$
 ${\mathrm{npv}}{:=}{108.9396460}$ (15)
 > $\mathrm{YieldFromDirtyPrice}\left(\mathrm{bond},\mathrm{npv}\right)$
 ${0.02999999994}$ (16)
 > $\mathrm{InternalRateOfReturn}\left(\mathrm{bond},\mathrm{npv}\right)$
 ${0.02999999994}$ (17)

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam