Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

zbtyield

Zero curve bootstrapping from coupon bond data given yield

Syntax

[ZeroRates, CurveDates] = zbtyield(Bonds, Yields, Settle,
OutputCompounding)

Arguments

Bonds

Coupon bond information used to generate the zero curve. Bonds can be specified as a table or a n-by-2 to n-by-6 matrix. If Bonds is a table, If Bonds is a table, the Maturity dates can be serial date numbers, date character vectors, or datetime arrays. If Bonds is an n-by-2 to n-by-6 matrix where each row describes a bond, the first two columns are required; the remainder are optional but must be added in order. All rows in Bonds must have the same number of columns. All rows in Bonds must have the same number of columns. Columns are [Maturity CouponRate Face Period Basis 
EndMonthRule]
where

Maturity

Maturity date of the bond, as a serial date number. Use datenum to convert date character vectors to serial date numbers. If Bonds is a table, the Maturity dates can be serial date numbers, date character vectors, or datetime arrays.

CouponRate

Coupon rate of the bond, as a decimal fraction.

Face

(Optional) Redemption or face value of the bond. Default = 100.

Period

(Optional) Coupons per year of the bond, as an integer. Allowed values are 0, 1, 2 (default), 3, 4, 6, and 12.

Basis

(Optional) Day-count basis of the bond.

  • 0 = actual/actual (default)

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (BMA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ICMA)

  • 9 = actual/360 (ICMA)

  • 10 = actual/365 (ICMA)

  • 11 = 30/360E (ICMA)

  • 12 = actual/365 (ISDA)

  • 13 = BUS/252

For more information, see basis.

EndMonthRule

(Optional) End-of-month flag. This flag applies only when Maturity is an end-of-month date for a month having 30 or fewer days. 0 = ignore flag, meaning that a bond's coupon payment date is always the same day of the month. 1 = set flag (default), meaning that a bond's coupon payment date is always the last day of the month.

Yields

Column vector containing the yield to maturity of each bond in Bonds, respectively. The number of rows (n) must match the number of rows in Bonds. Yield to maturity must be compounded semiannually.

Settle

Settlement date, specified as a serial date number, date character vector, or datetime array. This represents time zero for deriving the zero curve, and it is normally the common settlement date for all the bonds.

OutputCompounding

(Optional) Scalar value representing the period by which the output zero rates are compounded. The default OutputCompounding value is semiannual compounding (that is 2). Allowed values are:

0

Simple interest (no compounding)

1

Annual compounding

2

Semiannual compounding (default)

3

Compounding three times per year

4

Quarterly compounding

6

Bimonthly compounding

12

Monthly compounding

-1

Continuous compounding

Description

[ZeroRates, CurveDates] = zbtyield(Bonds, Yields, Settle, OutputCompounding) uses the bootstrap method to return a zero curve given a portfolio of coupon bonds and their yields. A zero curve consists of the yields to maturity for a portfolio of theoretical zero-coupon bonds that are derived from the input Bonds portfolio. The bootstrap method that this function uses does not require alignment among the cash-flow dates of the bonds in the input portfolio. It uses theoretical par bond arbitrage and yield interpolation to derive all zero rates; specifically, the interest rates for cash flows are determined using linear interpolation. For best results, use a portfolio of at least 30 bonds evenly spaced across the investment horizon.

ZeroRates

An m-by-1 vector of decimal fractions that are the implied zero rates for each point along the investment horizon represented by CurveDates; m is the number of bonds of different maturity dates. In aggregate, the rates in ZeroRates constitute a zero curve.

If more than one bond has the same maturity date, zbtyield returns the mean zero rate for that maturity. Any rates before the first maturity are assumed to be equal to the rate at the first maturity, that is, the curve is assumed to be flat before the first maturity.

CurveDates

An m-by-1 vector of unique maturity dates that correspond to the zero rates in ZeroRates; m is the number of bonds of different maturity dates. These dates begin with the earliest maturity date and end with the latest maturity date Maturity in the Bonds matrix. Use datestr to convert serial date numbers to date character vectors. If either inputs for Bonds or Settle have datetime values, then CurveDates will be datetimes. Otherwise CurveDates will be serial date numbers.

Examples

collapse all

Given data and yields to maturity for 12 coupon bonds, two with the same maturity date; and given the common settlement date.

Bonds = [datenum('6/1/1998')   0.0475   100  2  0  0;
         datenum('7/1/2000')   0.06     100  2  0  0;
         datenum('7/1/2000')   0.09375  100  6  1  0;
         datenum('6/30/2001')  0.05125  100  1  3  1;
         datenum('4/15/2002')  0.07125  100  4  1  0;
         datenum('1/15/2000')  0.065    100  2  0  0;
         datenum('9/1/1999')   0.08     100  3  3  0;
         datenum('4/30/2001')  0.05875  100  2  0  0;
         datenum('11/15/1999') 0.07125  100  2  0  0;
         datenum('6/30/2000')  0.07     100  2  3  1;
         datenum('7/1/2001')   0.0525   100  2  3  0;
         datenum('4/30/2002')  0.07     100  2  0  0];

Yields = [0.0616
          0.0605
          0.0687
          0.0612
          0.0615
          0.0591
          0.0603
          0.0608
          0.0655
          0.0646
          0.0641
          0.0627];

Settle = datenum('12/18/1997');

Set semiannual compounding for the zero curve.

OutputCompounding = 2;

Execute the function zbtyield which returns the zero curve at the maturity dates. Note the mean zero rate for the two bonds with the same maturity date.

[ZeroRates, CurveDates] = zbtyield(Bonds, Yields, Settle,...
OutputCompounding)
ZeroRates =

    0.0616
    0.0603
    0.0657
    0.0590
    0.0649
    0.0650
    0.0606
    0.0611
    0.0643
    0.0614
    0.0627


CurveDates =

      729907
      730364
      730439
      730500
      730667
      730668
      730971
      731032
      731033
      731321
      731336

Given data and yields to maturity for 12 coupon bonds, two with the same maturity date; and given the common settlement date, compute the zero curve using datetime inputs.

Bonds = [datenum('6/1/1998')   0.0475   100  2  0  0;
         datenum('7/1/2000')   0.06     100  2  0  0;
         datenum('7/1/2000')   0.09375  100  6  1  0;
         datenum('6/30/2001')  0.05125  100  1  3  1;
         datenum('4/15/2002')  0.07125  100  4  1  0;
         datenum('1/15/2000')  0.065    100  2  0  0;
         datenum('9/1/1999')   0.08     100  3  3  0;
         datenum('4/30/2001')  0.05875  100  2  0  0;
         datenum('11/15/1999') 0.07125  100  2  0  0;
         datenum('6/30/2000')  0.07     100  2  3  1;
         datenum('7/1/2001')   0.0525   100  2  3  0;
         datenum('4/30/2002')  0.07     100  2  0  0];

Yields = [0.0616
          0.0605
          0.0687
          0.0612
          0.0615
          0.0591
          0.0603
          0.0608
          0.0655
          0.0646
          0.0641
          0.0627];

Settle = datenum('12/18/1997');
OutputCompounding = 2;
t = array2table(Bonds);
t.Bonds1 = datetime(t.Bonds1,'ConvertFrom','datenum','Locale','en_US');
Settle = datetime(Settle,'ConvertFrom','datenum','Locale','en_US');
[ZeroRates, CurveDates] = zbtyield(t, Yields, Settle,...
OutputCompounding)
ZeroRates =

    0.0616
    0.0603
    0.0657
    0.0590
    0.0649
    0.0650
    0.0606
    0.0611
    0.0643
    0.0614
    0.0627


CurveDates = 

  11×1 datetime array

   01-Jun-1998
   01-Sep-1999
   15-Nov-1999
   15-Jan-2000
   30-Jun-2000
   01-Jul-2000
   30-Apr-2001
   30-Jun-2001
   01-Jul-2001
   15-Apr-2002
   30-Apr-2002

Related Examples

References

Fabozzi, Frank J. "The Structure of Interest Rates." Ch. 6 in Fabozzi, Frank J. and T. Dessa Fabozzi, eds. The Handbook of Fixed Income Securities. 4th ed. New York, Irwin Professional Publishing, 1995.

McEnally, Richard W. and James V. Jordan. "The Term Structure of Interest Rates." in Ch. 37 in Fabozzi and Fabozzi, ibid.

Das, Satyajit. "Calculating Zero Coupon Rates." in Swap and Derivative Financing. Appendix to Ch. 8, pp. 219–225. New York, Irwin Professional Publishing, 1994.

See Also

|

Introduced before R2006a


Was this topic helpful?