| Financial Toolbox | Search  Help Desk |
| zero2disc | Examples See Also |
Discount curve given a zero curve.
Syntax
[dr, cd] = zero2disc(zr, cd, sd, icomp, ibasis) [dr, cd] = zero2disc(zr, cd, sd, icomp) [dr, cd] = zero2disc(zr, cd, sd)
Arguments
zrzr constitute an implied zero curve for the investment horizon represented by cd.cdzr. Use datenum to convert date strings to serial date numbers.sdzr; i.e., the settlement date for the bonds from which the zero curve was bootstrapped.icompzr. Allowed values are:12 = semi-annual compounding (default)3 = compounding three times per year4 = quarterly compounding6 = bimonthly compounding12 = monthly compounding365 = daily compounding1 = continuous compoundingibasiszr.0 = actual/actual (default), 1 = 30/360, 2 = actual/360, 3 = actual/365.Description
[dr, cd] = zero2disc(zr, cd, sd, icomp, ibasis)
returns a discount curve given a zero curve and its maturity dates.
drdr constitute a discount curve for the investment horizon represented by cd.cddr. This vector is the same as the input vector cd. Use datestr to convert serial date numbers to date strings.Example
Given a zero curvezr over a set of maturity dates cd, and a settlement date sd:
zr = [0.0464
0.0509
0.0524
0.0525
0.0531
0.0525
0.0530
0.0531
0.0549
0.0536];
cd = [datenum('06-Nov-1997')
datenum('11-Dec-1997')
datenum('15-Jan-1998')
datenum('05-Feb-1998')
datenum('04-Mar-1998')
datenum('02-Apr-1998')
datenum('30-Apr-1998')
datenum('25-Jun-1998')
datenum('04-Sep-1998')
datenum('12-Nov-1998')];
sd = datenum('03-Nov-1997');
The zero curve was compounded daily on an actual/365 basis.
icomp = 365; ibasis = 3;Execute the function:
[dr, cd] = zero2disc(zr, cd, sd, icomp, ibasis)which returns the discount curve
dr at the maturity dates cd:
dr =
0.9996
0.9947
0.9896
0.9866
0.9826
0.9787
0.9745
0.9665
0.9552
0.9466
cd =
729700
729735
729770
729791
729818
729847
729875
729931
730002
730071
(For readability, zr and dr are shown here only to the basis point. However, MATLAB computed them at full precision. If you enter zr as shown, dr may differ due to rounding.)
See Also
disc2zero and other functions for Term Structure of Interest Rates