pyld2zero

Zero curve given par yield curve

Syntax

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

Arguments

ParRates

Column vector of annualized implied par yield rates, as decimal fractions. (Par yields = coupon rates.) In aggregate, the yield rates in ParRates constitute an implied par yield curve for the investment horizon represented by CurveDates.

CurveDates

Column vector of maturity dates (as serial date numbers) that correspond to the par rates.

Settle

Serial date number that is the common settlement date for the par rates.

Compounding

(Optional) Scalar value representing the periodicity in which the output zero 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 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 par rates were compounded when annualized. The default is the value for Compounding.

Description

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

    Note:   pyld2zero uses zbtprice for computations.

ZeroRates

Column vector of decimal fractions. In aggregate, the rates in ZeroRates constitute a zero curve for the investment horizon represented by CurveDates.

CurveDates

Column vector of maturity dates (as serial date numbers) corresponding to the zero rates. This vector is the same as the input vector CurveDates.

Examples

expand all

Compute Zero Curve Given Par Yield Curve

Define the settlement date, maturity, and zero rates.

Settle = datenum('01-Feb-2013');
CurveDates = datemnth(Settle,12*[1 2 3 5 7 10 20 30]');
ZeroRates = [.11 0.30 0.64 1.44 2.07 2.61 3.29 3.55]'/100;
Compounding = 2;
Basis = 1;

Compute par yield curve from zero rates.

ParRates = zero2pyld(ZeroRates, CurveDates, Settle, Compounding, Basis)
ParRates =

    0.0011
    0.0030
    0.0064
    0.0142
    0.0201
    0.0251
    0.0309
    0.0330

Compute zero curve from the par yield curve.

ZeroRates = pyld2zero(ParRates, CurveDates, Settle, Compounding, Basis)
ZeroRates =

    0.0011
    0.0030
    0.0064
    0.0144
    0.0207
    0.0261
    0.0329
    0.0355

See Also

Was this topic helpful?