Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
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:
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).
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.
For more information on Maple 15 changes, see Updates in Maple 15.
Examples
Here is another example.
Compute the value of this cash flow on January 01, 2005.
Here is an example using bonds.
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