 Finance - Maple Programming Help

Home : Support : Online Help : Mathematics : Finance : Stochastic Processes : Finance/MertonJumpDiffusion

Finance

 MertonJumpDiffusion
 create new jump diffusion process

 Calling Sequence MertonJumpDiffusion(X, lambda, a, b) MertonJumpDiffusion(${S}_{0}$, sigma, r, d, lambda, a, b, t, S)

Parameters

 X - Black-Scholes process lambda - intensity of the lognormal Poisson process a - scale parameter of the lognormal Poisson process b - shape parameter of the lognormal Poisson process ${S}_{0}$ - non-negative constant; initial value sigma - non-negative constant, procedure, or local volatility structure; volatility r - non-negative constant, procedure, or yield term structure; risk-free rate d - non-negative constant, procedure, or yield term structure; dividend yield t - name; time variable S - name; state variable

Description

 • The MertonJumpDiffusion command creates a new jump diffusion process that is governed by the stochastic differential equation (SDE)

$\frac{\mathrm{dS}\left(t\right)}{S\left(\mathrm{t-}\right)}=\mathrm{\mu }\left(t\right)\mathrm{dt}+\mathrm{\sigma }\left(t\right)\mathrm{dW}\left(t\right)+\mathrm{dJ}\left(t\right)$

 where
 – $\mathrm{\mu }\left(t\right)$ is the drift parameter
 – $\mathrm{\sigma }\left(t\right)$ is the volatility parameter
 – $W\left(t\right)$ is the standard Wiener process
 and
 – $J\left(t\right)$ is a compound Poisson process of the form

$J\left(t\right)={\sum }_{j=1}^{N\left(t\right)}\left({Y}_{j}-1\right)$

 such that $\mathrm{log}\left({Y}_{i}\right)$ is independent and lognormally distributed with mean $a$ and standard deviation $b$.
 • Both the drift parameter mu and the volatility parameter sigma can be either constant or time-dependent. In the second case they can be specified either as an algebraic expression containing one indeterminate, or as a procedure that accepts one parameter (the time) and returns the corresponding value of the drift (volatility).
 • Similar to the drift and the volatility parameters, the intensity parameter lambda can be either constant or time-dependent. In the second case it can be specified either as an algebraic expression containing one indeterminate or as a procedure that accepts one parameter (the time).
 • Both the scale parameter a and the shape parameter b of the underlying lognormal Poisson process must be real constants.

Examples

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

First consider two examples of jump diffusion with low volatility to observe the effect of jumps.

 > $\mathrm{S0}≔100$
 ${\mathrm{S0}}{≔}{100}$ (1)
 > $r≔0.05$
 ${r}{≔}{0.05}$ (2)
 > $d≔0.01$
 ${d}{≔}{0.01}$ (3)
 > $\mathrm{\sigma }\left[1\right]≔0.01$
 ${{\mathrm{\sigma }}}_{{1}}{≔}{0.01}$ (4)
 > $a≔0.$
 ${a}{≔}{0.}$ (5)
 > $b≔0.5$
 ${b}{≔}{0.5}$ (6)
 > $\mathrm{\lambda }\left[1\right]≔2.0$
 ${{\mathrm{\lambda }}}_{{1}}{≔}{2.0}$ (7)
 > $\mathrm{\lambda }\left[2\right]≔0.2$
 ${{\mathrm{\lambda }}}_{{2}}{≔}{0.2}$ (8)
 > $X\left[1\right]≔\mathrm{MertonJumpDiffusion}\left(\mathrm{S0},\mathrm{\sigma }\left[1\right],r,d,\mathrm{\lambda }\left[1\right],a,b\right):$
 > $\mathrm{PathPlot}\left(X\left[1\right]\left(t\right),t=0..1,\mathrm{timesteps}=100,\mathrm{replications}=5,\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$ > $X\left[2\right]≔\mathrm{MertonJumpDiffusion}\left(\mathrm{S0},\mathrm{\sigma }\left[1\right],r,d,\mathrm{\lambda }\left[2\right],a,b\right):$
 > $\mathrm{PathPlot}\left(X\left[2\right]\left(t\right),t=0..1,\mathrm{timesteps}=100,\mathrm{replications}=5,\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$ Now consider similar processes but with relatively high volatility.

 > $\mathrm{\sigma }\left[2\right]≔0.5$
 ${{\mathrm{\sigma }}}_{{2}}{≔}{0.5}$ (9)
 > $X\left[3\right]≔\mathrm{MertonJumpDiffusion}\left(\mathrm{S0},\mathrm{\sigma }\left[2\right],r,d,\mathrm{\lambda }\left[2\right],a,b\right):$
 > $\mathrm{PathPlot}\left(X\left[3\right]\left(t\right),t=0..1,\mathrm{timesteps}=100,\mathrm{replications}=5,\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$ > $Y≔\mathrm{BlackScholesProcess}\left(\mathrm{S0},\mathrm{\sigma }\left[2\right],r,d\right):$
 > $X\left[4\right]≔\mathrm{MertonJumpDiffusion}\left(Y,\mathrm{\lambda }\left[1\right],0,b\right):$
 > $\mathrm{PathPlot}\left(X\left[4\right]\left(t\right),t=0..1,\mathrm{timesteps}=100,\mathrm{replications}=5,\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$ > $\mathrm{ExpectedValue}\left(\mathrm{max}\left(X\left[4\right]\left(1\right)-90,0\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{5}\right)$
 $\left[{\mathrm{value}}{=}{65.32590075}{,}{\mathrm{standarderror}}{=}{0.5535149183}\right]$ (10)
 > $S\left[1\right]≔\mathrm{SampleValues}\left(Y\left(1\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{5}\right)$
  (11)
 > $S\left[2\right]≔\mathrm{SampleValues}\left(X\left[4\right]\left(1\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{5}\right)$
  (12)
 > $\mathrm{P1}≔\mathrm{Statistics}\left[\mathrm{FrequencyPlot}\right]\left(S\left[1\right],\mathrm{range}=0..300,\mathrm{thickness}=3,\mathrm{color}=\mathrm{red},\mathrm{bincount}=50\right):$
 > $\mathrm{P2}≔\mathrm{Statistics}\left[\mathrm{FrequencyPlot}\right]\left(S\left[2\right],\mathrm{range}=0..300,\mathrm{thickness}=3,\mathrm{color}=\mathrm{blue},\mathrm{bincount}=50\right):$
 > $\mathrm{plots}\left[\mathrm{display}\right]\left(\mathrm{P1},\mathrm{P2},\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right):$

Here is another way to define the same jump diffusion process.

 > $J≔\mathrm{PoissonProcess}\left(\mathrm{\lambda }\left[2\right],\mathrm{Normal}\left(a,b\right)\right)$
 ${J}{≔}{\mathrm{_P}}$ (13)
 > $Z≔t↦Y\left(t\right)\cdot \mathrm{exp}\left(J\left(t\right)\right)$
 ${Z}{≔}{t}{↦}{Y}{}\left({t}\right){\cdot }{{ⅇ}}^{{J}{}\left({t}\right)}$ (14)
 > $\mathrm{ExpectedValue}\left(\mathrm{max}\left(Z\left(1\right)-90,0\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{5}\right)$
 $\left[{\mathrm{value}}{=}{30.41454912}{,}{\mathrm{standarderror}}{=}{0.1764124093}\right]$ (15)

References

 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.
 Merton, R.C., On the pricing when underlying stock returns are discontinuous, Journal of Financial Economics, (3) 1976, pp. 125-144.

Compatibility

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