Financial Derivatives Toolbox | ![]() ![]() |
Interest Rate Term Conversions
Interest rate evolution is typically represented by a set of interest rates, including the beginning and end of the periods the rates apply to. For zero rates, the start dates are typically at the valuation date, with the rates extending from that valuation date until their respective maturity dates.
Calculating Rates Applicable to Different Periods
Frequently, given a set of rates including their start and end dates, you may be interested in finding the rates applicable to different terms (periods). This problem is addressed by the function ratetimes
. This function interpolates the interest rates given a change in the original terms. The syntax for calling ratetimes
is
[Rates, EndTimes, StartTimes] = ratetimes(Compounding, RefRates, RefEndDates, RefStartDates, EndDates, StartDates, ValuationDate);
Compounding
represents the frequency at which the zero rates are compounded when annualized.
RefRates
is a vector of initial interest rates representing the interest rates applicable to the initial time intervals.
RefEndDates
is a vector of dates representing the end of the interest rate terms (period) applicable to RefRates
.
RefStartDates
is a vector of dates representing the beginning of the interest rate terms applicable to RefRates
.
EndDates
represent the maturity dates for which the interest rates are interpolated.
StartDates
represent the starting dates for which the interest rates are interpolated.
ValuationDate
is the date of observation, from which the StartTimes
and EndTimes
are calculated. This date represents time = 0.
The input arguments to this function can be separated into two groups:
As an example, consider the rate table specified earlier.
From |
To |
Rate |
15 Feb 2000 |
15 Aug 2000 |
0.05 |
15 Feb 2000 |
15 Feb 2001 |
0.056 |
15 Feb 2000 |
15 Aug 2001 |
0.06 |
15 Feb 2000 |
15 Feb 2002 |
0.065 |
15 Feb 2000 |
15 Aug 2002 |
0.075 |
Assuming that the valuation date is February 15, 2000, these rates represent zero coupon bond rates with maturities specified in the second column. Use the function ratetimes
to calculate the spot rates at the beginning of all periods implied in the table. Assume a compounding value of 2.
% Reference Rates. RefStartDates = ['15-Feb-2000']; RefEndDates = ['15-Aug-2000'; '15-Feb-2001'; '15-Aug-2001';... '15-Feb-2002'; '15-Aug-2002']; Compounding = 2; ValuationDate = ['15-Feb-2000']; RefRates = [0.05; 0.056; 0.06; 0.065; 0.075]; % New Terms. StartDates = ['15-Feb-2000'; '15-Aug-2000'; '15-Feb-2001';... '15-Aug-2001'; '15-Feb-2002']; EndDates = ['15-Aug-2000'; '15-Feb-2001'; '15-Aug-2001';... '15-Feb-2002'; '15-Aug-2002']; % Find the new rates. [Rates, EndTimes, StartTimes] = ratetimes(Compounding, ... RefRates, RefEndDates, RefStartDates, EndDates, StartDates,... ValuationDate); Rates = 0.0500 0.0620 0.0680 0.0801 0.1155
Place these values in a table similar to the one above. Observe the evolution of the spot rates based on the initial zero coupon rates.
From |
To |
Rate |
15 Feb 2000 |
15 Aug 2000 |
0.0500 |
15 Aug 2000 |
15 Feb 2001 |
0.0620 |
15 Feb 2001 |
15 Aug 2001 |
0.0680 |
15 Aug 2001 |
15 Feb 2002 |
0.0801 |
15 Feb 2002 |
15 Aug 2002 |
0.1155 |
Alternative Syntax (ratetimes)
The additional output arguments StartTimes
and EndTimes
represent the time factor equivalents to the StartDates
and EndDates
vectors. As with the functions disc2rate
and rate2disc
, ratetimes
uses time factors for interpolating the rates. These time factors are calculated from the start and end dates, and the valuation date, which are passed as input arguments. ratetimes
also has an alternate syntax that uses time factors directly, and assumes time = 0 as the valuation date. This alternate syntax is
[Rates, EndTimes, StartTimes] = ratetimes(Compounding, RefRates, RefEndTimes, RefStartTimes, EndTimes, StartTimes);
Use this alternate version of ratetimes
to find the spot rates again. In this case, you must first find the time factors of the reference curve. Use date2time
for this.
RefEndTimes = date2time(ValuationDate, RefEndDates, Compounding) RefEndTimes = 1 2 3 4 5 RefStartTimes = date2time(ValuationDate, RefStartDates,... Compounding) RefStartTimes = 0
These are the expected values, given semiannual discounts (as denoted by a value of 2 in the variable Compounding
), end dates separated by six-month periods, and the valuation date equal to the date marking beginning of the first period (time factor = 0).
Now call ratetimes
with the alternate syntax.
[Rates, EndTimes, StartTimes] = ratetimes(Compounding,... RefRates, RefEndTimes, RefStartTimes, EndTimes, StartTimes); Rates = 0.0500 0.0620 0.0680 0.0801 0.1155
EndTimes
and StartTimes
have, as expected, the same values they had as input arguments.
![]() | Interest Rates vs. Discount Factors | Interest Rate Term Structure | ![]() |