 VasicekModel - Maple Help

Finance

 VasicekModel
 define Vasicek interest rate model Calling Sequence VasicekModel(${r}_{0}$, mu, theta, sigma) Parameters

 ${r}_{0}$ - initial interest rate mu - long-running mean theta - speed of mean reversion sigma - volatility Description

 • The VasicekModel command creates a Vasicek model with the specified parameters. Under this model the short-rate process $r\left(t\right)$ has the following dynamics with respect to the risk-neutral measure

$\mathrm{dr}\left(t\right)=\left(\mathrm{\theta }\mathrm{\mu }-\left(\mathrm{\lambda }\mathrm{\sigma }+\mathrm{\theta }\right)r\left(t\right)\right)\mathrm{dt}+\mathrm{\sigma }\mathrm{dW}\left(t\right)$

where $\mathrm{\theta }$, $\mathrm{\sigma }$, and $\mathrm{\mu }$, are non-negative constants and W(t) is a Wiener process modeling the random market risk factor. Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

First define a Vasicek model with parameters ${r}_{0}=0.03$, $\mathrm{\mu }=0.05$, $\mathrm{\theta }=0.3$ and $\mathrm{\sigma }=0.02$.

 > $\mathrm{model}≔\mathrm{VasicekModel}\left(0.03,0.05,0.3,0.02\right)$
 ${\mathrm{model}}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (1)

The following is the corresponding stochastic process.

 > $r≔\mathrm{ShortRateProcess}\left(\mathrm{model}\right)$
 ${r}{≔}{\mathrm{_X0}}$ (2)
 > $\mathrm{PathPlot}\left(r\left(t\right),t=0..1,\mathrm{timesteps}=50,\mathrm{replications}=20,\mathrm{axes}=\mathrm{BOXED},\mathrm{thickness}=2,\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{gridlines}=\mathrm{true}\right)$ > $\mathrm{PathPlot}\left({ⅇ}^{{{∫}}_{0}^{t}r\left(u\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}u},t=0..1,\mathrm{timesteps}=50,\mathrm{replications}=20,\mathrm{axes}=\mathrm{BOXED},\mathrm{thickness}=2,\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{gridlines}=\mathrm{true}\right)$ Here is the corresponding short-rate tree.

 > $\mathrm{tree}≔\mathrm{ShortRateTree}\left(\mathrm{model},20,20\right)$
 ${\mathrm{tree}}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (3)
 > $\mathrm{TreePlot}\left(\mathrm{tree},\mathrm{gridlines}=\mathrm{true},\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED}\right)$ > $\mathrm{times}≔\left[0.08,0.24,0.48,1.0,2.0,5.0,10.0,30.0\right]$
 ${\mathrm{times}}{≔}\left[{0.08}{,}{0.24}{,}{0.48}{,}{1.0}{,}{2.0}{,}{5.0}{,}{10.0}{,}{30.0}\right]$ (4)
 > $\mathrm{discount}≔\mathrm{DiscountBondPrice}\left(\mathrm{model},0.03,\mathrm{times}\right)$
 ${\mathrm{discount}}{≔}\left[\begin{array}{cccccccc}{0.997583909664655}& {0.992659223166232}& {0.985060167620859}& {0.967860170077199}& {0.932792565257669}& {0.822762710983556}& {0.653892081277046}& {0.252136624704580}\end{array}\right]$ (5)
 > $\mathrm{term_structure}≔\mathrm{DiscountCurve}\left(\mathrm{times},\mathrm{convert}\left(\mathrm{discount},'\mathrm{list}'\right)\right)$
 ${\mathrm{term_structure}}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (6)
 > $\mathrm{plot}\left(\mathrm{term_structure},0.1..30,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$  References

 Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice, New York: Springer-Verlag, 2001.
 Glasserman, P., Monte Carlo Methods in Financial Engineering, New York: Springer-Verlag, 2004.
 Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.
 Vasicek, O.A., An Equilibrium Characterization of the Term Structure, Journal of Financial Economics, 5 (1977), pp 177-188. Compatibility

 • The Finance[VasicekModel] command was introduced in Maple 15.