Skip to content
All library documents

Simulating a State-Dependent Diffusion with Euler–Maruyama

Article Quant Q&A · Author: qarabala

Summary

The document asks how to simulate a stochastic differential equation whose diffusion term depends on the current state as a power of the asset price. The question compares this process with geometric Brownian motion and attempts to derive a closed-form exponential update using Itô’s lemma, but the resulting expression still contains the unknown process value.

The answer instead discretizes the original differential equation directly. At each step, it adds a drift increment based on the current state and a random diffusion increment scaled by the square root of the time step and a standard normal draw. This is the Euler–Maruyama approximation, an explicit scheme that avoids needing a closed-form solution. The document gives the update rule but does not discuss stability, positivity, convergence, or how parameter choices affect simulation quality; these limitations matter when applying the method to a particular model.

Key ideas

  • A state-dependent diffusion can be simulated by discretizing its original stochastic differential equation.
  • The Euler–Maruyama step uses the current state for both drift and diffusion terms.
  • The random increment is a standard normal draw scaled by the square root of the time step.
  • The update is an approximation and the document does not assess its stability or convergence.

Tags

Full text
# Sampling from SDE


# Sampling from SDE












In the case of the classic Geometric Brownian motion $$dS_t = \mu S_t dt + \sigma S_tdW_t$$ we solve it as $$ S_t = S_0 \exp\left[ \left(\mu - \frac{\sigma^2}{2}\right)t + \sigma dW_t\right] $$ and simulate $S_{t_{i+1}} = S(t_i) \exp\left[ \left(\mu - \frac{\sigma^2}{2}\right)(t_{i+1}-t_{i}) + \sigma dW_t\right]$ with $W_t = \sqrt{t_{i+1}-t_i}Z_{i+1}$.

However, I am working with the slightly different version $$dS_t = \mu S_t dt + \sigma S_t^{\beta/2} dW_t$$ When I solve it using the Ito's Lemma, I get $$S_t = S_0 \exp\left[ \left(\mu - \frac{\sigma^2}{2} S_t^{\beta-2}\right)t + \sigma S^{\beta/2 - 1}_t dW_t\right]$$ and have no idea how to simulate it using normal distribution, since $S_t$ is sitting inside. Is it possible to sample from this process?

## Answer by Valometrics.com (score 2)

https://quant.stackexchange.com/a/54270

No need to use ito's lemma. You can simulate your process directly from the equation: $$dS_t = \mu S_t dt + \sigma S_t^{\beta/2} dW_t$$ which means that: $$S_{t_{i+1}}=S_{t_i}+\mu S_{t_i}(t_{i+1}-t_i)+\sigma S_{t_i}^{\beta/2}\sqrt{t_{i+1}-t_i}Z_{i}$$ where $Z_i$ is a realization of normal distribution with mean 0 and variance equal to 1.

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.