ZeroRate - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Finance

 ZeroRate
 compute zero rates based on a given term structure

 Calling Sequence ZeroRate(termstructure, maturitytime, opts) ZeroRate(termstructure, maturitydate, opts)

Parameters

 termstructure - yield term structure; term structure maturitytime - non-negative constant; maturity time in years maturitydate - date in any of the formats recognized by the Finance[ParseDate] command; maturity date opts - equation of the form option = value where option is compounding; specify option for the ZeroRate command

Options

 • compounding = Simple, Continuous, Annual, Semiannual, EveryFourthMonth, Quarterly, Bimonthly, Monthly, SimpleThenAnnual, SimpleThenSemiannual, SimpleThenEveryFourthMonth, SimpleThenQuarterly, SimpleThenBimonthly, or SimpleThenMonthly -- This option specifies compounding type for the returned rate. The default value is Continuous.

Description

 • The ZeroRate command returns the zero interest rate for the maturity maturitytime or maturitydate based on the specified term structure. The parameter termstructure can be a zero curve, a discount curve, or a forward curve. The compounding type for the returned rate can be controlled through the corresponding option.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $\mathrm{times}≔\left[0,0.5,1,1.5,2\right]:$
 > $\mathrm{rates}≔\left[0.03,0.04,0.06,0.07,0.075\right]:$
 > $R≔\mathrm{ZeroCurve}\left(\mathrm{times},\mathrm{rates},\mathrm{interpolation}=\mathrm{LogLinear}\right):$
 > $\mathrm{ZeroRate}\left(R,0.5\right)$
 ${0.04000000000}$ (1)
 > $\mathrm{ZeroRate}\left(R,1.0\right)$
 ${0.06000000000}$ (2)
 > $\mathrm{ZeroRate}\left(R,1.5\right)$
 ${0.07000000000}$ (3)
 > $\mathrm{plot}\left('\mathrm{ZeroRate}'\left(R,t\right),t=0.5..2,\mathrm{color}=\mathrm{blue},\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$

In this example, create a flat zero curve with reference date set to January 5, 2006.

 > $\mathrm{R1}≔\mathrm{ZeroCurve}\left(0.05,\mathrm{referencedate}="Jan-05-2006"\right):$
 > $\mathrm{R1}\left(1.0\right)$
 ${0.05000000000}$ (4)
 > $\mathrm{ZeroRate}\left(\mathrm{R1},1.0\right)$
 ${0.05000000000}$ (5)
 > $\mathrm{ZeroRate}\left(\mathrm{R1},1.5\right)$
 ${0.05000000000}$ (6)
 > $\mathrm{ZeroRate}\left(\mathrm{R1},"Jan-05-2007"\right)$
 ${0.05000000000}$ (7)
 > $T≔\mathrm{YearFraction}\left("Jan-05-2006","Jan-05-2007",\mathrm{R1}:-\mathrm{daycounter}\right)$
 ${T}{≔}{1.}$ (8)

In this example, create a zero curve with the same parameters as above but assume that the interest rate is based on monthly compounding.

 > $\mathrm{R2}≔\mathrm{ZeroCurve}\left(0.05,\mathrm{compounding}=\mathrm{Monthly},\mathrm{referencedate}="Jan-05-2005"\right):$
 > $\mathrm{R2}\left("Jan-05-2005"\right)$
 ${0.04989612178}$ (9)
 > $\mathrm{R2}\left(1.0\right)$
 ${0.04989612178}$ (10)
 > $\mathrm{ZeroRate}\left(\mathrm{R2},1.0\right)$
 ${0.04989612178}$ (11)

In this example, create a zero curve based on a piecewise interpolation of zero rates. Use the default interpolation.

 > $\mathrm{rates}≔\left[0.02,0.01,0.04,0.06,0.07\right]:$
 > $\mathrm{times}≔\left[0.,0.5,1.0,1.5,2.0\right]:$
 > $\mathrm{R3}≔\mathrm{ZeroCurve}\left(\mathrm{times},\mathrm{rates}\right):$
 > $\mathrm{ZeroRate}\left(\mathrm{R3},1.0\right)$
 ${0.04000000000}$ (12)

References

 Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice. New York:
 Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.

Compatibility

 • The Finance[ZeroRate] command was introduced in Maple 15.
 • For more information on Maple 15 changes, see Updates in Maple 15.

 See Also