Documentation Center

  • Trial Software
  • Product Updates

zero2pyld

Par yield curve given zero curve

Syntax

[ParRates, CurveDates] = zero2pyld(ZeroRates, CurveDates, Settle,
Compounding, Basis, InputCompounding)

Arguments

ZeroRates

A number of bonds (NUMBONDS)-by-1 vector of annualized zero rates, as decimal fractions. In aggregate, the rates constitute an implied zero curve for the investment horizon represented by CurveDates.

CurveDates

A NUMBONDS-by-1 vector of maturity dates (as serial date numbers) that correspond to the zero rates.

Settle

A serial date number that is the common settlement date for the zero rates.

Compounding

(Optional) Scalar value representing the periodicity in which the output par rates are compounded when annualized. Allowed values are:

1

Annual compounding

2

Semiannual compounding (default)

3

Compounding three times per year

4

Quarterly compounding

6

Bimonthly compounding

12

Monthly compounding

Basis

(Optional) Day-count basis used to annualize the implied zero rates.

  • 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/actual (ISDA)

  • 13 = BUS/252

For more information, see basis.

InputCompounding

(Optional) Scalar value representing the periodicity in which the input zero rates were compounded when annualized. The default is the value for Compounding.

Description

[ParRates, CurveDates] = zero2pyld(ZeroRates, CurveDates, Settle, Compounding, Basis, InputCompounding) returns a par yield curve given a zero curve and its maturity dates.

ParRates

A NUMBONDS-by-1 vector of annualized par yields, as decimal fractions. (Par yields = coupon rates.) In aggregate, the yield rates in ParRates constitute a par yield curve for the investment horizon represented by CurveDates.

CurveDates

A NUMBONDS-by-1 vector of maturity dates (as serial date numbers) that correspond to the par yield rates. This vector is the same as the input vector CurveDates.

Examples

Given

  • A zero curve over a set of maturity dates and

  • A settlement date

  • Annual compounding for the input zero curve and monthly compounding for the output par rates

compute a par yield curve.

ZeroRates = [0.0457
             0.0487
             0.0506
             0.0507
             0.0505
             0.0504
             0.0506
             0.0516
             0.0539
             0.0530];

CurveDates = [datenum('06-Nov-2000')
              datenum('11-Dec-2000')
              datenum('15-Jan-2001')
              datenum('05-Feb-2001')
              datenum('04-Mar-2001')
              datenum('02-Apr-2001')
              datenum('30-Apr-2001')
              datenum('25-Jun-2001')
              datenum('04-Sep-2001')
              datenum('12-Nov-2001')];

Settle = datenum('03-Nov-2000');
InputCompounding = 1;
Compounding = 12;

[ParRates, CurveDates] = zero2pyld(ZeroRates, CurveDates,...  
Settle, Compounding, [] , InputCompounding)
ParRates =

    0.0479
    0.0511
    0.0530
    0.0531
    0.0526
    0.0524
    0.0525
    0.0534
    0.0555
    0.0543

CurveDates =

      730796
      730831
      730866
      730887
      730914
      730943
      730971
      731027
      731098
      731167

For readability, ZeroRates and ParRates are shown only to the basis point. However, MATLAB® software computed them at full precision. If you enter ZeroRates as shown, ParRates may differ due to rounding.

See Also

Was this topic helpful?