NetPresentValue - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Finance

  

NetPresentValue

  

return the net present value of future cash flows

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

NetPresentValue(instrument)

NetPresentValue(cashflows, discountrate, opts)

Parameters

instrument

-

cash flow swap or an interest rate swap; financial instrument

cashflows

-

data structure created using the SimpleCashFlow constructor or a list of such data structures; cash flows

discountrate

-

non-negative constant or a yield term structure; discount rate

opts

-

equations of the form option = value where option is one of referencedate or daycounter; specify options for the NetPresentValue command

Options

• 

daycounter =  a string containing a date specification in a format recognized by ParseDate or a Date data structure -- This option specifies a day counter or day counting convention.

• 

referencedate =  a string containing a date specification in a format recognized by ParseDate or a Date data structure -- This option specifies the reference date, that is, the date when the discount factor is 1. By default this is set to the global evaluation date.

Description

• 

The NetPresentValue(instrument) calling sequence returns the net present value of the given instrument. The parameter instrument in this case can be either a cash flow swap or an interest rate swap. For bonds the net present value is the same as the dirty price (see DirtyPrice).

• 

The NetPresentValue(cashflows, discountrate, opts) calling sequence returns the net present value for the future cash flows discounted with respect to the given discount rate.

Examples

withFinance:

First set the global evaluation date.

SetEvaluationDateJanuary 01, 2005:

EvaluationDate

January 1, 2005

(1)

Calculate the net present value of 100 dollars to be paid on January 2, 2007.

paymentdateJan-02-2007

paymentdateJan-02-2007

(2)

cashflow1SimpleCashFlow100,paymentdate

cashflow1100. on January 2, 2007

(3)

NetPresentValuecashflow1,0.03

94.16871315

(4)

100DiscountFactor0.03,paymentdate

94.16871315

(5)

NetPresentValuecashflow1,0.03,referencedate=Jan-01-2004

91.38560707

(6)

100DiscountFactor0.03,paymentdate,referencedate=Jan-01-2004

91.38560707

(7)

Here is another example.

nominalamt100

nominalamt100

(8)

rate0.05

rate0.05

(9)

paymentdateJan-01-2015

paymentdateJan-01-2015

(10)

startdateJan-01-2006

startdateJan-01-2006

(11)

enddateJan-01-2010

enddateJan-01-2010

(12)

couponFixedRateCouponnominalamt,rate,startdate,enddate,paymentdate

coupon20. on January 1, 2015

(13)

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

NetPresentValuecoupon,0.03

14.81636441

(14)

Here is another way to compute this. First, compute the accrued interest.

accruednominalamtCompoundFactorrate,enddate,referencedate=startdate,compounding=Simplenominalamt

accrued20.0000000

(15)

This is the value to be received on January 1, 2010. Discount this value using the discount rate.

accruedDiscountFactor0.03,paymentdate

14.81636441

(16)

Compute with a difference day counter.

NetPresentValuecoupon,0.03,daycounter=DayCounterActual360

14.75229908

(17)

Compatibility

• 

The Finance[NetPresentValue] command was introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

Finance[CompoundFactor]

Finance[DiscountFactor]

Finance[FixedRateCoupon]

Finance[InArrearIndexedCoupon]

Finance[ParCoupon]

Finance[SimpleCashFlow]

Finance[UpFrontIndexedCoupon]

Finance[ZeroCurve]