Discretizing the Price Process in a Bates Monte Carlo Simulation
Summary
The document describes a Python attempt to simulate the Bates stochastic-volatility model, which combines a mean-reverting variance process with correlated Brownian shocks and Poisson jumps. The author questions an exponential update used for the asset price after observing unexpected simulated paths. The response explains that an SDE specifies incremental changes over each time step and gives an additive one-step interpretation of the stated price equation, rather than treating the dynamics as a direct exponential solution over the full horizon.
The example includes parameter choices, a variance update, and a plotting routine, but it does not provide a complete corrected implementation or validate the simulated paths. The response is a basic discretization warning: jump terms and diffusion terms must be translated consistently from the chosen SDE. The precise scheme depends on the intended Bates specification and conventions for jump sizes, drift compensation, and risk-neutral versus real-world simulation, none of which are fully resolved in the exchange.
Key ideas
- The Bates setup combines stochastic variance, correlated Brownian drivers, and Poisson jumps.
- An SDE must be translated into a discrete update one time step at a time.
- The response cautions that the stated incremental equation does not imply the exponential update used in the example.
- The provided material does not supply or test a complete corrected simulation scheme.
- Jump conventions and drift treatment must be specified consistently with the model being simulated.
Tags
Full text
# Numerical simulation of Bates model (Monte Carlo)
# Numerical simulation of Bates model (Monte Carlo)
I'm trying to build Bates model in Python!
$$dS_{t} = \mu S_{t} dt + \sqrt{V_{t}}S_{t}dW_{t}^{1} + J_{t}dQ_{t}$$ $$dV_{t} = \kappa(\theta - V{t})dt + \eta \sqrt{V_{t}}dW_{t}^{2}$$ $$dW_{t}^{1}dW_{t}^{2} = \rho dt$$
Where $dW_{t}^{1}$ and $dW_{t}^{2}$ - normally distributed processes, $dQ_{t}$ - Poisson distribution
```
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
sns.set(palette='viridis')
%matplotlib inline
%config InlineBackend.figure_format='retina'
S0 = 62083
r = 0.085
T = 62 / 252
dt = 1 / 252
def MC(S0):
rho = -0.344558
kappa = -0.855167
eta = 0.510156
theta = 0.643609
v0 = 0.099067
a = 0.2
b = 0.2
Lamda = 0.25
Nsim = 100
Nsteps = 62
mu = 0.1
np.random.seed(5)
dw_1 = np.random.normal(loc = 0, scale = np.sqrt(dt), size = (Nsim, Nsteps))
dz_1 = np.random.normal(loc = 0, scale = np.sqrt(dt), size = (Nsim, Nsteps))
dw_2 = dw_1 * rho + np.sqrt(1 - rho ** 2) * dz_1
Poisson = np.random.poisson(Lamda * dt, [Nsim, Nsteps])
St = np.zeros([Nsim, Nsteps+1])
vol = np.zeros([Nsim, Nsteps+1])
St[:, 0] = S0
vol[:, 0] = v0
for i in range(Nsteps):
vol[:, i + 1] = np.abs(vol[:, i] + kappa * (theta - vol[:, i]) * \
dt + eta * (np.sqrt(vol[:, i]) * dw_2[:, i]))
St[:, i + 1] = St[:, i] * np.exp((mu - 0.5 * \
vol[:, i]) * dt + np.sqrt(vol[:, i] * dt) \
* dw_1[:, i] + a * Poisson[:, i] \
+ np.sqrt(b ** 2) * np.sqrt(Poisson[:,i]))
return St
```
There should be a mistake in discretisation of price path (St):
```
St[:, i + 1] = St[:, i] * np.exp((mu - 0.5 * \
vol[:, i]) * dt + np.sqrt(vol[:, i] * dt) \
* dw_1[:, i] + a * Poisson[:, i] \
+ np.sqrt(b ** 2) * np.sqrt(Poisson[:,i]))
```
I think so, as I get to strange path simulations:
```
plt.plot(MC(S0).T)
plt.show()
```
I know the problem is with discretisation of price path (St), not with parameters values as I tested another one. However, I don't know the right way to fix it. Could somebody help me to fix it, please?
## Answer by Valometrics.com (score 1)
https://quant.stackexchange.com/a/50867
You should review your definition of what a stochastic differential equation is:
```
dSt= mu*St*dt + sqrt(vt)*St*dW1t + Jt*dQt
```
it means simply that
```
S_t+1=St + mu*St*dt + sqrt(Vt)*St*(W_t+1-Wt) + Jt*(Q_t+1-Q_t)
```
which has to be simulated one time step at a time.
It does not follow that the solution is of the form
```
S_t = S_0 exp( (mu - 0.5 sigma^2) T + other terms )
```Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.