| Financial Toolbox | Search  Help Desk |
| tr2bonds | Examples See Also |
Term-structure parameters given Treasury bond parameters.
Syntax
[bonds, p, y] = tr2bonds(tbond)
Arguments
tbond[cpn md bidp askp askytm] wherecpnmddatenum to convert date strings to serial date numbers.bidpaskpaskytmDescription
[bonds, p, y] = tr2bonds(tbond)
returns term-structure parameters -- bond information, prices, and yields -- sorted by ascending maturity date md, given Treasury bond parameters. The formats of the output matrix and vectors meet requirements for input to the zbtprice and zbtyield zero-curve bootstrapping functions.
bonds[md cpn rv per basis eom] wheremddatestr to convert serial date numbers to date strings.cpnrv100.per2.basis0 (actual/actual).eom1, meaning that a bond's coupon payment date is always the last day of the month.pbonds, respectively. The number of rows (N) matches the number of rows in bonds.ybonds, respectively. The number of rows (N) matches the number of rows in bonds.Example
Given published Treasury bond market parameters for December 22, 1997:tbond=[0.0650 datenum('15-apr-1999') 101.03125 101.09375 0.0564
0.05125 datenum('17-dec-1998') 99.4375 99.5 0.0563
0.0625 datenum('30-jul-1998') 100.3125 100.375 0.0560
0.06125 datenum('26-mar-1998') 100.09375 100.15625 0.0546];
Execute the function.
[bonds, p, y] = tr2bonds(tbond)
bonds =
729840 0.06125 100 2 0 1
729966 0.0625 100 2 0 1
730106 0.05125 100 2 0 1
730225 0.065 100 2 0 1
p =
100.1563
100.3750
99.5000
101.0938
y =
0.0546
0.056
0.0563
0.0564
(Example output has been formatted for readability.)
See Also
tbl2bond, zbtprice, zbtyield, and other functions for Term Structure of
Interest Rates