Convexity - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

Finance

  

Convexity

  

calculate the convexity of a set of cash flows or a bond

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Convexity(cashflows, rate, opts)

Convexity(bond, rate, opts)

Parameters

cashflows

-

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

bond

-

fixed or floating rate bond data structure; bond

rate

-

non-negative real number; interest rate

opts

-

equations of the form option = value where option is one of evaluationdate, compounding or daycounter; specify options for the Convexity command

Options

• 

compounding = Simple, Continuous, Annual, Semiannual, EveryFourthMonth, Quarterly, Bimonthly, Monthly, SimpleThenAnnual, SimpleThenSemiannual, SimpleThenEveryFourthMonth, SimpleThenQuarterly, SimpleThenBimonthly, or SimpleThenMonthly -- This option specifies the compounding type for the given interest rate.

• 

daycounter = a name representing a supported day counter (e.g. ISDA, Simple) or a day counter data structure created using the DayCounter constructor -- This option provides a day counter which will be used to convert the period between two dates as a fraction of the year.

• 

evaluationdate =  a string containing a date specification in a format recognized by ParseDate or a Date data structure -- This option specifies the evaluation date. By default this is set to the global evaluation date (see EvaluationDate).

Description

• 

The Convexity command calculates the convexity of a set of cash flows or a bond.

• 

For a set of cash flows  the convexity is defined as

  

where  is the discount factor at time  implied by the given interest rate.

• 

A bond's convexity is defined as the weighted second derivative of the price function with respect to the interest rate:

• 

The parameter cashflows is a cash flow or a list of cash flows (see FixedRateCoupon, InArrearIndexedCoupon, ParCoupon, SimpleCashFlow, or UpFrontIndexedCoupon).

• 

The parameter bond must be a fixed- or floating-rate bond data structure (see FixedCouponBond, FloatingRateBond, ZeroCouponBond).

Examples

(1)

(2)

(3)

(4)

Here is another example.

(5)

(6)

(7)

(8)

(9)

(10)

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

(11)

Here is an example using bonds.

(12)

(13)

(14)

(15)

Compatibility

• 

The Finance[Convexity] 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[Duration]

Finance[EvaluationDate]

Finance[FixedRateCoupon]

Finance[InArrearIndexedCoupon]

Finance[NetPresentValue]

Finance[ParCoupon]

Finance[SetEvaluationDate]

Finance[SimpleCashFlow]

Finance[UpFrontIndexedCoupon]

Finance[ZeroCurve]

 


Download Help Document