This function returns the Macauley duration for an assumed par value of $100.
DURATION(settlement, maturity, coupon, yield, frequency, basis)
This function has these arguments:
Settlement date for the security
Maturity date for the security
Annual coupon rate
Annual yield for the security
Frequency of payment, number of coupon payments per year; must be 1, 2, or 4
[Optional] Integer representing the basis for day count (Refer to Day Count Basis.)
This function returns a #VALUE! error when settlement or maturity is invalid or a #NUM! error when frequency is a number other than 1, 2, or 4.
Settlement, maturity, frequency, and basis are truncated to integers.
The function returns an error in the following cases:
If coupon is less than 0 or yield is less than 0.
If basis is less than 0 or greater than 4.
If settlement is greater than or equal to maturity.
Accepts numeric and DateTime object data. Returns numeric data.