Finance - Maple Programming Help

Home : Support : Online Help : Mathematics : Finance : Financial Instruments : Finance/DiscountBondPrice

Finance

 DiscountBondPrice
 calculate a discount bond price

 Calling Sequence DiscountBondPrice(model, rate, maturity, opts)

Parameters

 model - affine one-factor model of interest rates rate - the given interest rate maturity - non-negative constant or a list of non-negative constants; time(s) to maturity opts - equations of the form option = value where option is output; specify options for the DiscountBondPrice command

Options

 • output = discount or zerorate; output type

Description

 • The DiscountBondPrice command calculates the discount bond price in the given affine interest rate model.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $M≔\mathrm{VasicekModel}\left(0.05,0.03,0.5,0.03\right)$
 ${M}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (1)
 > $X≔\mathrm{ShortRateProcess}\left(M\right)$
 ${X}{≔}{\mathrm{_X}}$ (2)
 > $T≔\left[\mathrm{seq}\left(0.6i,i=0..50\right)\right]$
 ${T}{≔}\left[{0.}{,}{0.6}{,}{1.2}{,}{1.8}{,}{2.4}{,}{3.0}{,}{3.6}{,}{4.2}{,}{4.8}{,}{5.4}{,}{6.0}{,}{6.6}{,}{7.2}{,}{7.8}{,}{8.4}{,}{9.0}{,}{9.6}{,}{10.2}{,}{10.8}{,}{11.4}{,}{12.0}{,}{12.6}{,}{13.2}{,}{13.8}{,}{14.4}{,}{15.0}{,}{15.6}{,}{16.2}{,}{16.8}{,}{17.4}{,}{18.0}{,}{18.6}{,}{19.2}{,}{19.8}{,}{20.4}{,}{21.0}{,}{21.6}{,}{22.2}{,}{22.8}{,}{23.4}{,}{24.0}{,}{24.6}{,}{25.2}{,}{25.8}{,}{26.4}{,}{27.0}{,}{27.6}{,}{28.2}{,}{28.8}{,}{29.4}{,}{30.0}\right]$ (3)
 > $S≔\mathrm{SamplePath}\left(X\left(t\right),t=0..1,\mathrm{timesteps}=50\right)$
 ${S}{≔}\left[\begin{array}{c}{\mathrm{1..1 x 1..51}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{\mathrm{float}}{[}{8}{]}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{C_order}}\end{array}\right]$ (4)
 > $\mathrm{PathPlot}\left(S,\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$
 > $P≔\mathrm{seq}\left(\mathrm{Statistics}[\mathrm{LineChart}]\left(\mathrm{DiscountBondPrice}\left(M,{S}_{1,i},T,\mathrm{output}=\mathrm{zerorate}\right),\mathrm{xcoords}=T,\mathrm{axes}=\mathrm{BOXED},\mathrm{thickness}=3,\mathrm{markers}=\mathrm{false}\right),i=1..51\right):$
 > $\mathrm{plots}[\mathrm{display}]\left(P,\mathrm{insequence}=\mathrm{true}\right)$

References

 Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice. New York: Springer-Verlag, 2001.

Compatibility

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