zero2pyld

Par yield curve given zero curve

Syntax

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

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

365

Daily 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 (PSA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ISMA)

  • 9 = actual/360 (ISMA)

  • 10 = actual/365 (ISMA)

  • 11 = 30/360E (ISMA)

  • 12 = actual/365 (ISDA)

OutputCompounding

(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, OutputCompounding) 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

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');
Compounding = 1;
OutputCompounding = 12;

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

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

pyld2zero and other functions for Term Structure of Interest Rates

  


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