Term-structure parameters given Treasury bond parameters
[Bonds, Prices, Yields] = tr2bonds(TreasuryMatrix, Settle)
Treasury bond parameters. An n-by-5 matrix, where each row describes a Treasury bond. Columns are [CouponRate Maturity Bid Asked AskYield] where:
Coupon rate, as a decimal fraction.
Maturity date, as a serial date number. Use datenum to convert date strings to serial date numbers.
Bid price based on $100 face value.
Asked price based on $100 face value.
Asked yield to maturity, as a decimal fraction.
(Optional) Date string or serial date number of the settlement date for the analysis.
[Bonds, Prices, Yields] = tr2bonds(TreasuryMatrix, Settle) returns term-structure parameters (bond information, prices, and yields) sorted by ascending maturity date, 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.
Coupon bond information. An n-by-6 matrix where each row describes a bond. Columns are [Maturity CouponRate Face Period Basis EndMonthRule] where:
Maturity date of the bond, as a serial date number. Use datestr to convert serial date numbers to date strings.
Coupon rate of the bond, as a decimal fraction.
Redemption or face value of the bond, always 100.
Coupons per year of the bond, always 2.
Day-count basis of the bond, possible values include:
For more information, see basis.
End-of-month flag, always 1, meaning that a bond's coupon payment date is always the last day of the month.
Prices. Column vector containing the price of each bond in bonds, respectively. The number of rows (n) matches the number of rows in bonds.
Yields. Column vector containing the yield to maturity of each bond in bonds, respectively. The number of rows (n) matches the number of rows in bonds. If Settle is input, Yields is computed as a semiannual yield to maturity. If Settle is not input, the quoted input yields will be used.
Given published Treasury bond market parameters for December 22, 1997
Matrix =[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, Prices, Yields] = tr2bonds(Matrix)
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 Prices = 100.1563 100.3750 99.5000 101.0938 Yields = 0.0546 0.056 0.0563 0.0564