Interest-Rate Term Conversions
This example illustrates spot curve to forward curve conversion and using ratetimes
.
Frequently, given a set of rates including their start and end dates, you can find 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.
Consier the folowing rate table.
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 forward 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 = ratetimes(Compounding, RefRates, RefEndDates, ... RefStartDates, EndDates, StartDates, ValuationDate)
Rates = 5×1
0.0500
0.0620
0.0680
0.0801
0.1155
Place these resulting values in a table. Observe the evolution of the forward 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 |
The ratetimes
function can provide the additional output arguments StartTimes
and EndTimes
, which represent the time factor equivalents to the StartDates
and EndDates
vectors. The ratetimes
function 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
can also use time factors directly, assuming time = 0
as the valuation date.
Use this alternate syntax of ratetimes
to find the forward 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 = 5×1
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 the beginning of the first period (time factor = 0
).
Call ratetimes
with the alternate syntax.
StartDates = '15-Feb-2000'; EndDates = ['15-Aug-2000'; '15-Feb-2001'; '15-Aug-2001'; ... '15-Feb-2002'; '15-Aug-2002']; Compounding = 2; ValuationDate = '15-Feb-2000'; Rates = [0.05; 0.056; 0.06; 0.065; 0.075]; [Disc, EndTimes, StartTimes] = rate2disc(Compounding, Rates, ... EndDates, StartDates, ValuationDate); [Rates, EndTimes, StartTimes] = ratetimes(Compounding, ... RefRates, RefEndTimes, RefStartTimes, EndTimes, StartTimes)
Rates = 5×1
0.0500
0.0560
0.0600
0.0650
0.0750
EndTimes = 5×1
1
2
3
4
5
StartTimes = 5×1
0
0
0
0
0
EndTimes
and StartTimes
have the same values they had as input arguments.
Times = [StartTimes, EndTimes]
Times = 5×2
0 1
0 2
0 3
0 4
0 5
See Also
instbond
| instcap
| instcf
| instfixed
| instfloat
| instfloor
| instoptbnd
| instoptembnd
| instoptfloat
| instoptemfloat
| instrangefloat
| instswap
| instswaption
| intenvset
| bondbyzero
| cfbyzero
| fixedbyzero
| floatbyzero
| intenvprice
| intenvsens
| swapbyzero
| floatmargin
| floatdiscmargin
| hjmtimespec
| hjmtree
| hjmvolspec
| bondbyhjm
| capbyhjm
| cfbyhjm
| fixedbyhjm
| floatbyhjm
| floorbyhjm
| hjmprice
| hjmsens
| mmktbyhjm
| oasbyhjm
| optbndbyhjm
| optfloatbyhjm
| optembndbyhjm
| optemfloatbyhjm
| rangefloatbyhjm
| swapbyhjm
| swaptionbyhjm
| bdttimespec
| bdttree
| bdtvolspec
| bdtprice
| bdtsens
| bondbybdt
| capbybdt
| cfbybdt
| fixedbybdt
| floatbybdt
| floorbybdt
| mmktbybdt
| oasbybdt
| optbndbybdt
| optfloatbybdt
| optembndbybdt
| optemfloatbybdt
| rangefloatbybdt
| swapbybdt
| swaptionbybdt
| hwtimespec
| hwtree
| hwvolspec
| bondbyhw
| capbyhw
| cfbyhw
| fixedbyhw
| floatbyhw
| floorbyhw
| hwcalbycap
| hwcalbyfloor
| hwprice
| hwsens
| oasbyhw
| optbndbyhw
| optfloatbyhw
| optembndbyhw
| optemfloatbyhw
| rangefloatbyhw
| swapbyhw
| swaptionbyhw
| bktimespec
| bktree
| bkvolspec
| bkprice
| bksens
| bondbybk
| capbybk
| cfbybk
| fixedbybk
| floatbybk
| floorbybk
| oasbybk
| optbndbybk
| optfloatbybk
| optembndbybk
| optemfloatbybk
| rangefloatbybk
| swapbybk
| swaptionbybk
| capbyblk
| floorbyblk
| swaptionbyblk
Topics
- Modeling the Interest-Rate Term Structure
- Pricing Using Interest-Rate Term Structure
- Pricing Using Interest-Rate Term Structure
- Pricing Using Interest-Rate Tree Models
- Graphical Representation of Trees
- Understanding Interest-Rate Term Structure
- Supported Interest-Rate Instrument Functions
- Supported Equity Derivative Functions
- Supported Energy Derivative Functions
- Mapping Financial Instruments Toolbox Functions for Interest-Rate Instrument Objects