Returns the Macauley's duration of a security where the security has
periodic interest payments.
Namespace: Imsl.FinanceAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntaxpublic static double Duration(
DateTime settlement,
DateTime maturity,
double coupon,
double yield,
BondFrequency frequency,
DayCountBasis basis
)
Public Shared Function Duration (
settlement As DateTime,
maturity As DateTime,
coupon As Double,
yield As Double,
frequency As BondFrequency,
basis As DayCountBasis
) As Double
public:
static double Duration(
DateTime settlement,
DateTime maturity,
double coupon,
double yield,
BondFrequency frequency,
DayCountBasis^ basis
)
static member Duration :
settlement : DateTime *
maturity : DateTime *
coupon : float *
yield : float *
frequency : BondFrequency *
basis : DayCountBasis -> float
Parameters
- settlement
- Type: SystemDateTime
The DateTime settlement date of the security.
- maturity
- Type: SystemDateTime
The DateTime maturity date of the security.
- coupon
- Type: SystemDouble
A double which specifies the security's annual coupon rate.
- yield
- Type: SystemDouble
A double which specifies the security's annual yield.
- frequency
- Type: Imsl.FinanceBondFrequency
A int which specifies the number of coupon payments per year
(1 for annual, 2 for semiannual, 4 for quarterly).
- basis
- Type: Imsl.FinanceDayCountBasis
A DayCountBasis object which contains the type of day count
basis to use.
Return Value
Type:
Double
A
double which specifies the annual duration of a security
with periodic interest payments.
Remarks
The Macauley's duration is the weighted-average time to the payments,
where the weights are the present value of the payments. It is
computed using the following:
In the equation above,

represents the
number of days starting with the settlement date and ending with the
next coupon date.

represents the number of
days within the coupon Frequency.

represents
the number of coupons payable from the settlement date to the
maturity date.

represents the
frequency of the coupon payments annually.
See Also