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

withFinance:

SetEvaluationDateJan-01-2005:

paymentdate1:=Jan-02-2007

paymentdate1:=Jan-02-2007

(1)

cashflow1:=SimpleCashFlow100,paymentdate1

cashflow1:=100. on January 2, 2007

(2)

value1:=NetPresentValuecashflow1,0.05

value1:=90.47134762

(3)

InternalRateOfReturncashflow1,value1

0.05000000001

(4)

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

InternalRateOfReturncashflow1,value1,guess=0.02,maxiterations=5

Error, (in Finance:-InternalRateOfReturn) maximum number of function evaluations (5) exceeded

InternalRateOfReturncashflow1,90

0.05260819182

(5)

Here is another example.

nominalamt:=100

nominalamt:=100

(6)

rate:=0.05

rate:=0.05

(7)

paymentdate2:=Jan-01-2015

paymentdate2:=Jan-01-2015

(8)

startdate2:=Jan-01-2006

startdate2:=Jan-01-2006

(9)

enddate2:=Jan-01-2010

enddate2:=Jan-01-2010

(10)

coupon2:=FixedRateCouponnominalamt,rate,startdate2,enddate2,paymentdate2

coupon2:=20. on January 1, 2015

(11)

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

value2:=NetPresentValuecoupon2,0.07

value2:=9.931706076

(12)

InternalRateOfReturncoupon2,value2

0.06999999998

(13)

Here is an example using bonds.

bond:=FixedCouponBond100,5,Years,0.05

bond:=moduleend module

(14)

npv:=NetPresentValuebond,0.03

npv:=108.9396460

(15)

YieldFromDirtyPricebond,npv

0.02999999994

(16)

InternalRateOfReturnbond,npv

0.02999999994

(17)

See Also

Finance[CompoundFactor], Finance[DiscountFactor], Finance[FixedRateCoupon], Finance[InArrearIndexedCoupon], Finance[ParCoupon], Finance[SimpleCashFlow], Finance[UpFrontIndexedCoupon], Finance[YieldFromCleanPrice], Finance[YieldFromDirtyPrice], Finance[ZeroCurve]


Download Help Document

Was this information helpful?



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