How can I convert interest rates from one day count and frequency to another using Financial Derivatives Toolbox 5.2 (R2008a)?

1 visualización (últimos 30 días)
I want to convert an interest rate that is specified in a certain day count (basis), at certain frequency. I want to convert this interest rate to another day count, in a different frequency.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 2009
You can convert interest rates from one day count to another and from one frequency to another as below. The code first converts the given interest rate to a discount factor, and then uses the discount factor to convert to interest rate. During each conversion we specify different day count and frequency.
% Dummy dates for calculation purpose
StartDates = ['15-Feb-2000'];
EndDates = ['15-Aug-2000'];
% Specify Frequency and Date Basis for Old Interest Rate
Compounding_old = 2;
ValuationDate = ['15-Feb-2000'];
Rates_old = [0.05];
Basis_old = 1; % 30/360 (SIA)
% Obtain Discount Factor
Disc = rate2disc(Compounding_old, Rates_old, EndDates, StartDates, ValuationDate, Basis_old);
% Specify Frequence and Date Basis for New Interest Rate
Compounding_new = 4;
Basis_new = 2; % For actual/360
% Obtain New Interest Rate
Rates_new = disc2rate(Compounding_new, Disc, EndDates, StartDates, ValuationDate, Basis_new)

Más respuestas (0)

Productos


Versión

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by