Finance[Convexity] - calculate the convexity of a set of cash flows or a bond
|
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
|
|
|
|
|
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:
|
|
|
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).
|
|
|
Compatibility
|
|
•
|
The Finance[Convexity] command was introduced in Maple 15.
|
|
|
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) |
|
|
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]
|
|