Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

liborduration

Duration of LIBOR-based interest-rate swap

Syntax

[PayFixDuration,GetFixDuration] = liborduration(SwapFixRate,Tenor,Settle)

Arguments

SwapFixRate

Scalar or column vector of swap fixed rates in decimal.

Tenor

Scalar or column vector indicating life of the swap in years. Fractional numbers are rounded upward.

Settle

Scalar or column vector of settlement dates.

Description

[PayFixDuration,GetFixDuration] = liborduration(SwapFixRate,Tenor,Settle) computes the duration of LIBOR-based interest-rate swaps.

PayFixDuration is the modified duration, in years, realized when entering pay-fix side of the swap.

GetFixDuration is the modified duration, in years, realized when entering receive-fix side of the swap.

Examples

collapse all

This example shows how to compute the duration of LIBOR-based interest-rate swaps using the following data.

SwapFixRate = 0.0383;
Tenor = 7;
Settle = datenum('11-Oct-2002');

[PayFixDuration GetFixDuration] = liborduration(SwapFixRate,... 
Tenor, Settle)
PayFixDuration = -4.7567
GetFixDuration = 4.7567

Introduced before R2006a

Was this topic helpful?