Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Finance[Duration] - calculate the duration of a set of cash flows or bonds
Calling Sequence
Duration(cashflows, rate, opts)
Duration(bond, rate, opts)
Parameters
cashflows
-
cash flow data structure or a list of cash flow 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 evaluation, compounding, or daycounter; specify options for the Duration command
Description
The Duration command calculates the duration of a set of cash flows or a portfolio of bonds.
For a set of cash flows the simple duration is defined as
where is the discount at time implied by the given interest rate. There are at least two ways to calculate . One can either use a yield term structure or an internal rate of return of the set of cash flows. In the latter case one would obtain the Macaulay duration.
A bond's duration is defined in a similar way. It can also be interpreted as the weighted first derivative of the price:
Duration is useful as a measure of sensitivity of a bond's or cash flows' price to interest rate movements.
The parameter cashflows is a cash flow data structure or a list of cash flow data structures.
The parameter bond must be a fixed- or floating-rate bond data structure.
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 = Actual360, Actual365Fixed, AFB, Bond, Euro, Historical, ISDA, ISMA, OneDay, Simple, Thirty360BondBasis, Thirty360EuroBondBasis, Thirty360European, Thirty360Italian, Thirty360USA, or a day counter data structure created using the DayCounter constructor -- This option provides a day counter that will be used to represent the period between two dates as a fraction of the year. The default day count convention can be set using the Settings command.
evaluationdate = a string containing a date specification in a format recognized by ParseDate or a date data structure -- This option specifies the evaluation date. This is set to the global evaluation date by default (see EvaluationDate).
Compatibility
The Finance[Duration] 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 1, 2005.
Compute the Macaulay duration for the previous cash flow.
Here is an example using bonds.
See Also
Finance[CompoundFactor], Finance[Convexity], Finance[DiscountFactor], Finance[FixedRateCoupon], Finance[InArrearIndexedCoupon], Finance[NetPresentValue], Finance[ParCoupon], Finance[SimpleCashFlow], Finance[UpFrontIndexedCoupon], Finance[ZeroCurve]
Download Help Document