IMSL Mathematics Reference Guide > Special Functions > DURATION_MAC Function (PV-WAVE Advantage)
  

DURATION_MAC Function (PV-WAVE Advantage)
Evaluates the modified Macauley duration of a security.
Usage
result = DURATION_MAC(settlement, maturity, coupon_rate, yield, frequency, basis)
Input Parameters
settlementThe date on which payment is made to settle a trade. For a more detailed discussion on dates see Chapter 8, Working with Date/Time Data in the PV‑WAVE User’s Guide.
maturityThe date on which the bond comes due, and principal and accrued interest are paid. For a more detailed discussion on dates see Chapter 8, Working with Date/Time Data in the PV‑WAVE User’s Guide.
coupon_rateAnnual interest rate set forth on the face of the security; the coupon rate.
yieldAnnual yield of the security.
frequencyFrequency of the interest payments. It should be 1, 2, or 4.
*1One payment per year (Annual payment)
*2Two payments per year (Semi-annual payment)
*4Four payments per year (Quarterly payment)
basisThe method for computing the number of days between two dates. It should be 0, 1, 2, 3, or 4.
*0Actual/Actual
*1US (NASD) 30/360
*2Actual/360
*3Actual/365
*4European 30/360
Returned Value
resultThe modified Macauley duration of a security is returned. The security has an assumed par value of $100. If no result can be computed, NaN is returned.
Input Keywords
DoubleIf present and nonzero, double precision is used.
Discussion
Function DURATION_MAC computes the modified Macauley duration for a security with an assumed par value of $100.
It is computed using the following:
where duration is calculated from the function DURATION.
Example
In this example, DURATION_MAC computes the modified Macauley duration of a security with the settlement date of July 1, 1995, and maturity date of July 1, 2005, using the Actual/365 day count method.
settlement = VAR_TO_DT(1995, 7, 1)
maturity = VAR_TO_DT(2005, 7, 1)
coupon = .075
yield = .09
frequency = 2
basis = 3
PRINT, DURATION_MAC(settlement, maturity, coupon, yield, $
   frequency, basis)
; PV-WAVE prints: 6.73871

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.