DocumentationHelp Center
Duration of LIBOR-based interest-rate swap
[PayFixDuration,GetFixDuration] = liborduration(SwapFixRate,Tenor,Settle)
example
[PayFixDuration,GetFixDuration] = liborduration(SwapFixRate,Tenor,Settle) computes the duration of LIBOR-based interest-rate swaps.
PayFixDuration
GetFixDuration
SwapFixRate
Tenor
Settle
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
Par swap fixed rate (quarterly compounded), specified as an N-by-1 vector in decimals. The Basis should be actual/360.
N
1
Data Types: double
double
Swap tenor in years, specified as a N-by-1 vector. Fractional numbers are rounded upward.
Settlement date, specified as an N-by-1 vector using serial date numbers.
Modified duration, in years, for the pay-fix side of the swap, returned as a N-by-1 vector.
Modified duration, in years, for the receive-fix side of the swap, returned as a N-by-1 vector.
liborfloat2fixed | liborprice
liborfloat2fixed
liborprice
Existe una versión modificada de este ejemplo en su sistema. ¿Prefiere abrir esta versión?
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office