Financial Toolbox    
disc2zero

Zero curve given a discount curve

Syntax

Arguments

DiscRates
Column vector of discount factors, as decimal fractions. In aggregate, the factors in DiscRates constitute a discount curve for the investment horizon represented by CurveDates.
CurveDates
Column vector of maturity dates (as serial date numbers) that correspond to the discount factors in DiscRates.
Settle
Serial date number that is the common settlement date for the discount rates in DiscRates.
OutputCompounding
(Optional) Output compounding. A scalar that sets the compounding frequency per year for annualizing the output zero rates. Allowed values are:

1
annual compounding

2
semi-annual compounding (default)

3
compounding three times per year

4
quarterly compounding

6
bimonthly compounding

12
monthly compounding

365
daily compounding

-1
continuous compounding
OutputBasis
(Optional) Output day-count basis for annualizing the output zero rates. Allowed values are:

0
actual/actual (default)

1
30/360

2
actual/360

3
actual/365

Description

[ZeroRates, CurveDates] = disc2zero(DiscRates, CurveDates, Settle, OutputCompounding, OutputBasis) returns a zero curve given a discount curve and its maturity dates.

ZeroRates
Column vector of decimal fractions. In aggregate, the rates in ZeroRates constitute a zero curve for the investment horizon represented by CurveDates. The zero rates are the yields to maturity on theoretical zero-coupon bonds.
CurveDates
Column vector of maturity dates (as serial date numbers) that correspond to the zero rates. This vector is the same as the input vector CurveDates.

Examples

Given discount factors DiscRates over a set of maturity dates CurveDates, and a settlement date Settle

Set daily compounding for the output zero curve, on an actual/365 basis.

Execute the function

which returns the zero curve ZeroRates at the maturity dates CurveDates.

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

See Also

zero2disc and other functions for Term Structure of Interest Rates


  depstln discrate