# Documentation/Calc Functions/MDURATION

MDURATION

## Category:

Financial Analysis

## Summary:

Calculates the modified Macauley duration of fixed interest security in years.

## Syntax:

MDURATION(Settlement; Maturity; Coupon; Yield; Frequency[; Basis])

## Returns:

Returns a positive real number which is the modified Macaulay duration of fixed interest security in years

## Arguments:

Settlement is a date or a reference to a cell containing that date which is the date of purchase of the security.

Maturity is a date or a reference to a cell containing that date which is the date on which the security matures (expires).

Coupon is a positive real number or a reference to the cell containing that number which is the annual coupon interest rate (nominal rate of interest).

Yield is a positive real number or a reference to the cell containing that number which is the annual yield of the security.

Frequency is a positive integer or a reference to a cell containing that integer which is the number of interest payments per year (1, 2, or 4).

Frequency Frequency
1 Annual
2 Semiannual
4 Quarterly

Basis is a positive integer from 0 to 4 or a reference to a cell containing that integer which is chosen from a list of options and indicates how the year is to be calculated.

Basis Calculation
0 or missing US method (NASD), 12 months of 30 days each
1 Exact number of days in months, exact number of days in year, i.e. Actual/actual.
2 Exact number of days in month, year has 360 days, i.e. Actual/360.
3 Exact number of days in month, year has 365 days, i.e. Actual/365.
4 European method, 12 months of 30 days each, i.e. 30/360.

• If either Yield or Coupon is less than 0 then the function returns an error value.
• If either Settlement or Maturity are not valid dates then the function returns an value(#VALUE!) error.
• If Settlement date is after the Maturity date then the function returns an error value.
• If Frequency, and Basis are non-integer values, then the function uses their floor value, i.e. they are truncated to an integer value.
• After truncation if Frequency is any number except 1,2 or 4, then the function returns an error value.
• After truncation if Basis is ny number except 0,1,2,3,4 or missing(passed as empty argument or not passed at all),then the function will return an error value.

• The formula for MDURATION is:

here

## Examples:

Formula Description Returns
=MDURATION("2001-01-01";"2006-01-01";0.08;0.09;2;3) A security is purchased on 2001-01-01; the maturity date is 2006-01-01. The nominal rate of interest is 8%. The yield is 9.0%. Interest is paid half-yearly (frequency is 2). Using daily balance interest calculation (basis 3) the function calculates how long is the modified duration. 4.02068710841898
=MDURATION("2001-01-01";"2006-01-01";0.08;0.09;2) A security is purchased on 2001-01-01; the maturity date is 2006-01-01. The nominal rate of interest is 8%. The yield is 9.0%. Interest is paid half-yearly (frequency is 2). Using daily balance interest calculation (basis 0 by default) the function calculates how long is the modified duration. 4.01806536102434
=MDURATION("2001-01-01.05";"2006-01-01";0.08;0.09;2;3) The function returns an error value if either Settlement or Maturity are not valid dates. #VALUE!
=MDURATION("2007-01-01";"2006-01-01";0.08;0.09;2;3) The function returns an error when Settlement date is after the Maturity date. Err:502

DURATION

## ODF standard:

Section 6.12.26, part 2

MDURATION