# Simulation

Generate standard Monte Carlo and Quasi-Monte Carlo simulations from SDE models

Use SDE model objects with functions for standard Monte Carlo simulations and quasi-Monte Carlo simulations.

## Objects

 `sde` Stochastic Differential Equation (`SDE`) model `bm` Brownian motion (`BM`) models `gbm` Geometric Brownian motion (`GBM`) model `merton` `Merton` jump diffusion model (Since R2020a) `bates` `Bates` stochastic volatility model (Since R2020a) `drift` Drift-rate model component `diffusion` Diffusion-rate model component `sdeddo` Stochastic Differential Equation (`SDEDDO`) model from Drift and Diffusion components `sdeld` SDE with Linear Drift (`SDELD`) model `cev` Constant Elasticity of Variance (`CEV`) model `cir` Cox-Ingersoll-Ross (`CIR`) mean-reverting square root diffusion model `heston` `Heston` model `hwv` Hull-White/Vasicek (`HWV`) Gaussian Diffusion model `sdemrd` SDE with Mean-Reverting Drift (`SDEMRD`) model `rvm` Rough volatility model (`RVM`) (Since R2023b) `roughbergomi` Rough Bergomi model (Since R2024a)

## Functions

expand all

 `simByEuler` Euler simulation of stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, or `SDEMRD` models `simByMilstein` Simulate diagonal diffusion for `BM`, `GBM`, `CEV`, `HWV`, `SDEDDO`, `SDELD`, or `SDEMRD` sample paths by Milstein approximation (Since R2023a) `simByMilstein2` Simulate `BM`, `GBM`, `CEV`, `HWV`, `SDEDDO`, `SDELD`, `SDEMRD` process sample paths by second order Milstein approximation (Since R2023b) `simulate` Simulate multivariate stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, `SDEMRD`, `Merton`, or `Bates` models
 `simBySolution` Simulate approximate solution of diagonal-drift `GBM` processes `simBySolution` Simulate approximate solution of diagonal-drift `HWV` processes `simBySolution` Simulate approximate solution of diagonal-drift `Merton` jump diffusion process (Since R2020a) `simByTransition` Simulate `Heston` sample paths with transition density (Since R2020b) `simByTransition` Simulate `Bates` sample paths with transition density (Since R2020b) `simByTransition` Simulate `CIR` sample paths with transition density `simByQuadExp` Simulate `Bates`, `Heston`, and `CIR` sample paths by quadratic-exponential discretization scheme (Since R2020a) `simByEuler` Euler simulation of stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, or `SDEMRD` models `simByEuler` Simulate `Bates` sample paths by Euler approximation (Since R2020a) `simByEuler` Simulate `Merton` jump diffusion sample paths by Euler approximation (Since R2020a) `simByMilstein` Simulate diagonal diffusion `Merton` sample paths by Milstein approximation (Since R2023a) `simByMilstein` Simulate `Heston` process sample paths by Milstein approximation (Since R2023a) `simByMilstein` Simulate `Bates` process sample paths by Milstein approximation (Since R2023a) `simByMilstein` Simulate `CIR` process sample paths by Milstein approximation (Since R2023a) `simByMilstein2` Simulate `Bates` process sample paths by second order `Milstein` approximation (Since R2023b) `simByMilstein2` Simulate `CIR` process sample paths by second order Milstein approximation (Since R2023a) `simByMilstein2` Simulate `Heston` process sample paths by second order Milstein approximation (Since R2023b) `simByMilstein2` Simulate diagonal diffusion `Merton` sample paths by second order Milstein approximation (Since R2023b) `simulate` Simulate multivariate stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, `SDEMRD`, `Merton`, or `Bates` models
 `simByEuler` Simulate `RVM` or `roughbergomi` sample paths by Euler approximation (Since R2023b) `simByHybrid` Simulate `RVM` or `roughbergomi` sample paths by hybrid approximation (Since R2023b)
 `simulate` Simulate multivariate stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, `SDEMRD`, `Merton`, or `Bates` models `simByEuler` Euler simulation of stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, or `SDEMRD` models `interpolate` Brownian interpolation of stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, or `SDEMRD` models
 `simByTransition` Simulate `Heston` sample paths with transition density (Since R2020b) `simByQuadExp` Simulate `Bates`, `Heston`, and `CIR` sample paths by quadratic-exponential discretization scheme (Since R2020a)
 `simByTransition` Simulate `CIR` sample paths with transition density `simByQuadExp` Simulate `Bates`, `Heston`, and `CIR` sample paths by quadratic-exponential discretization scheme (Since R2020a)
 `simBySolution` Simulate approximate solution of diagonal-drift `GBM` processes
 `simBySolution` Simulate approximate solution of diagonal-drift `HWV` processes
 `simulate` Simulate multivariate stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, `SDEMRD`, `Merton`, or `Bates` models `simByEuler` Simulate `Bates` sample paths by Euler approximation (Since R2020a) `simByTransition` Simulate `Bates` sample paths with transition density (Since R2020b) `simByQuadExp` Simulate `Bates`, `Heston`, and `CIR` sample paths by quadratic-exponential discretization scheme (Since R2020a)
 `simulate` Simulate multivariate stochastic differential equations (SDEs) for `SDE`, `BM`, `GBM`, `CEV`, `CIR`, `HWV`, `Heston`, `SDEDDO`, `SDELD`, `SDEMRD`, `Merton`, or `Bates` models `simByEuler` Simulate `Merton` jump diffusion sample paths by Euler approximation (Since R2020a) `simBySolution` Simulate approximate solution of diagonal-drift `Merton` jump diffusion process (Since R2020a)
 `ts2func` Convert time series arrays to functions of time and state