tr2bonds - Term-structure parameters given Treasury bond parameters

Syntax

[Bonds, Prices, Yields] = tr2bonds(TreasuryMatrix, Settle)

Arguments

TreasuryMatrix

Treasury bond parameters. An n-by-5 matrix, where each row describes a Treasury bond. Columns are [CouponRate Maturity Bid Asked AskYield] where:

CouponRate

Coupon rate, as a decimal fraction.

Maturity

Maturity date, as a serial date number. Use datenum to convert date strings to serial date numbers.

Bid

Bid price based on $100 face value.

Asked

Asked price based on $100 face value.

AskYield

Asked yield to maturity, as a decimal fraction.

Settle

(Optional) Date string or serial date number of the settlement date for the analysis.

Description

[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.

Bonds

Coupon bond information. An n-by-6 matrix where each row describes a bond. Columns are [Maturity CouponRate Face Period Basis EndMonthRule] where:

Maturity

Maturity date of the bond, as a serial date number. Use datestr to convert serial date numbers to date strings.

CouponRate

Coupon rate of the bond, as a decimal fraction.

Face

Redemption or face value of the bond, always 100.

Period

Coupons per year of the bond, always 2.

Basis

Day-count basis of the bond, possible values include:

  • 0 = actual/actual (default)

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

EndMonthRule

End-of-month flag, always 1, meaning that a bond's coupon payment date is always the last day of the month.

Prices

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

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.

Examples

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

(Example output has been formatted for readability.)

See Also

tbl2bond, zbtprice, zbtyield, and other functions for Term Structure of Interest Rates

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS