Simulates a stochastic differential equation (SDE).
This method passes any additional arguments to the simulation routine specified by the sde object.
The outputs are described below:
Below is an example simulating a two-dimensional process driven by two correlated Wiener processes:
Asset1Price = 100.; Asset2Price = 90. ;
Volatility1 = 0.2 ; Volatility2 = 0.3 ;
Dividends1 = 0. ; Dividends2 = 0.005;
RiskFreeRate = 0.04;
Correlation = 0.5;
ExpiryTime = 1.;
Drift = drift ([0;0], [RiskFreeRate-Dividends1 0;0 RiskFreeRate-Dividends2]);
Diffusion = diffusion ([1;1], [Volatility1 0;0 Volatility2]);
M = 1000; # Number of simulations
N = 10; # Number of timesteps
SDE = sde (Drift, Diffusion, "StartState", [Asset1Price;Asset2Price], ...
"Correlation", [1 Correlation;Correlation 1]);
[Paths, ~, ~] = simulate (SDE, 1, "DeltaTime", ExpiryTime, ...
"NTRIALS", M, "NSTEPS", N);
See also: @sde/simByEuler.
Package: financial