Term Structure of Interest Rates
This example shows how to derive and analyze interest-rate curves, including data conversion and extrapolation, bootstrapping, and interest-rate curve conversions.
One of the first problems in analyzing the term structure of interest rates is dealing with market data reported in different formats. Treasury bills, for example, are quoted with bid and asked bank-discount rates. Treasury notes and bonds, on the other hand, are quoted with bid and asked prices based on $100 face value. To examine the full spectrum of Treasury securities, analysts must convert data to a single format. Financial Toolbox™ functions ease this conversion. The following code uses only one security each; analysts often use 30, 100, or more of each.
First, capture Treasury bill quotes and Reasury bond quotes in their reported format.
% Maturity Days Bid Ask AskYield TBill = [datenum('12/26/2000') 53 0.0503 0.0499 0.0510]; % Coupon Maturity Bid Ask AskYield TBond = [0.08875 datenum(2001,11,5) 103+4/32 103+6/32 0.0564];
Note that these quotes are based on a November 3, 2000 settlement date.
Settle = datenum('3-Nov-2000');
Use the tbl2bond
to convert the Treasury bill data to Treasury bond format.
TBTBond = tbl2bond(TBill)
TBTBond = 1×5
105 ×
0 7.3085 0.0010 0.0010 0.0000
The second element of TBTBond is the serial date number for December 26, 2000.
Combine short-term (Treasury bill) with long-term (Treasury bond) data to set up the overall term structure.
TBondsAll = [TBTBond; TBond]
TBondsAll = 2×5
105 ×
0 7.3085 0.0010 0.0010 0.0000
0.0000 7.3116 0.0010 0.0010 0.0000
Use tr2bonds
to convert the bond data into a form ready for the bootstrapping functions. tr2bonds
generates a matrix of bond information sorted by maturity date, plus vectors of prices and yields.
[Bonds, Prices, Yields] = tr2bonds(TBondsAll)
Bonds = 2×6
105 ×
7.3085 0 0.0010 0 0 0.0000
7.3116 0.0000 0.0010 0.0000 0 0.0000
Prices = 2×1
99.2654
103.1875
Yields = 2×1
0.0510
0.0564
Use a bootstrapping function to derive an implied zero curve. Bootstrapping is a process whereby you begin with known data points and solve for unknown data points using an underlying arbitrage theory. Every coupon bond can be valued as a package of zero-coupon bonds which mimic its cash flow and risk characteristics. By mapping yields-to-maturity for each theoretical zero-coupon bond, to the dates spanning the investment horizon, you can create a theoretical zero-rate curve. The Financial Toolbox™ software provides two bootstrapping functions: zbtprice
derives a zero curve from bond data and prices, and zbtyield
derives a zero curve from bond data and yields. Using zbtprice
[ZeroRates, CurveDates] = zbtprice(Bonds, Prices, Settle)
ZeroRates = 2×1
0.0516
0.0558
CurveDates = 2×1
730846
731160
CurveDates
gives the investment horizon.
datestr(CurveDates)
ans = 2×11 char array
'26-Dec-2000'
'05-Nov-2001'
Use the functions zero2disc
, zero2fwd
, and zero2pyld
to construct discount, forward, and par yield curves from the zero curve, and vice versa.
[DiscRates, CurveDates] = zero2disc(ZeroRates, CurveDates, Settle)
DiscRates = 2×1
0.9926
0.9462
CurveDates = 2×1
730846
731160
[FwdRates, CurveDates] = zero2fwd(ZeroRates, CurveDates, Settle)
FwdRates = 2×1
0.0516
0.0565
CurveDates = 2×1
730846
731160
[PYldRates, CurveDates] = zero2pyld(ZeroRates, CurveDates, Settle)
PYldRates = 2×1
0.0522
0.0557
CurveDates = 2×1
730846
731160
See Also
tbilldisc2yield
| tbillprice
| tbillrepo
| tbillyield
| tbillyield2disc
| tbillval01
| tbl2bond
| tr2bonds
| zbtprice
| zbtyield