# simByEuler

Simulate `Merton`

jump diffusion sample paths by Euler
approximation

## Description

`[`

simulates `Paths`

,`Times`

,`Z`

,`N`

] = simByEuler(`MDL`

,`NPeriods`

)`NTrials`

sample paths of `NVars`

correlated state variables driven by `NBrowns`

Brownian motion
sources of risk and `NJumps`

compound Poisson processes
representing the arrivals of important events over `NPeriods`

consecutive observation periods. The simulation approximates the continuous-time
Merton jump diffusion process by the Euler approach.

`[`

specifies options using one or more name-value pair arguments in addition to the
input arguments in the previous syntax.`Paths`

,`Times`

,`Z`

,`N`

] = simByEuler(___,`Name,Value`

)

You can perform quasi-Monte Carlo simulations using the name-value arguments for
`MonteCarloMethod`

, `QuasiSequence`

, and
`BrownianMotionMethod`

. For more information, see Quasi-Monte Carlo Simulation.

## Examples

## Input Arguments

## Output Arguments

## More About

## Algorithms

This function simulates any vector-valued SDE of the following form:

$$d{X}_{t}=B(t,{X}_{t}){X}_{t}dt+D(t,{X}_{t})V(t,{x}_{t})d{W}_{t}+Y(t,{X}_{t},{N}_{t}){X}_{t}d{N}_{t}$$

Here:

*X*is an_{t}`NVars`

-by-`1`

state vector of process variables.*B*(*t*,*X*_{t}) is an`NVars`

-by-`NVars`

matrix of generalized expected instantaneous rates of return.

is an*D*(*t*,*X*_{t})`NVars`

-by-`NVars`

diagonal matrix in which each element along the main diagonal is the corresponding element of the state vector.

is an*V*(*t*,*X*_{t})`NVars`

-by-`NVars`

matrix of instantaneous volatility rates.*dW*_{t}is an`NBrowns`

-by-`1`

Brownian motion vector.

is an*Y*(*t*,*X*_{t},*N*_{t})`NVars`

-by-`NJumps`

matrix-valued jump size function.*dN*_{t}is an`NJumps`

-by-`1`

counting process vector.

`simByEuler`

simulates `NTrials`

sample paths of
`NVars`

correlated state variables driven by
`NBrowns`

Brownian motion sources of risk over
`NPeriods`

consecutive observation periods, using the Euler
approach to approximate continuous-time stochastic processes.

This simulation engine provides a discrete-time approximation of the underlying
generalized continuous-time process. The simulation is derived directly from the
stochastic differential equation of motion. Thus, the discrete-time process approaches
the true continuous-time process only as `DeltaTimes`

approaches
zero.

## References

[1] Deelstra, Griselda, and Freddy
Delbaen. “Convergence of Discretized Stochastic (Interest Rate) Processes with
Stochastic Drift Term.” *Applied Stochastic Models and Data
Analysis.* 14, no. 1, 1998, pp. 77–84.

[2] Higham, Desmond, and Xuerong
Mao. “Convergence of Monte Carlo Simulations Involving the Mean-Reverting Square Root
Process.” *The Journal of Computational Finance* 8, no. 3, (2005):
35–61.

[3] Lord, Roger, Remmert Koekkoek,
and Dick Van Dijk. “A Comparison of Biased Simulation Schemes for Stochastic Volatility
Models.” *Quantitative Finance* 10, no. 2 (February 2010):
177–94.

## Version History

**Introduced in R2020a**

## See Also

`bates`

| `merton`

| `simBySolution`

### Topics

- Implementing Multidimensional Equity Market Models, Implementation 5: Using the simByEuler Method
- Simulating Equity Prices
- Simulating Interest Rates
- Stratified Sampling
- Price American Basket Options Using Standard Monte Carlo and Quasi-Monte Carlo Simulation
- Base SDE Models
- Drift and Diffusion Models
- Linear Drift Models
- Parametric Models
- SDEs
- SDE Models
- SDE Class Hierarchy
- Quasi-Monte Carlo Simulation
- Performance Considerations