Fduration()

Description:

The function equals the Excel DURATION function.

Syntax:

Fduration (settlement,maturity;coupon,yld)

Note:

The function returns the modified duration of a security that pays periodic interest with an assumed par value of 100. The duration is the weighted average of the present value of the cash flows and is used to measure the sensitivity of the price of the security to the interest rates. Annually. The day count basis method is US (NASD) 30/360.

Parameters:

settlement

The security's settlement date

maturity

The security's maturity date

coupon

The security's annual coupon rate

yld

The security's annual yield

Options

@2

Semi-annually. It corresponds to the Excel frequency parameter.

@4

Quaterly. It corresponds to the Excel frequency parameter.

@1

Specify the day count basis method Actual/Actual. It corresponds to the Excel basis parameter.

@0

Specify the day count basis method Actual/360. It corresponds to the Excel basis parameter.

@5

Specify the day count basis method Actual/365. It corresponds to the Excel basis parameter.

@e

Specify the day count basis method European 30/360. It corresponds to the Excel basis parameter.

Example:

Fduration@21(date("2008-1-1"),date("2016-1-1"),0.08,0.09)

5.993774955545178