Tutorial by Examples

The following is an example that displays 5 one-dimensional random walks of 200 steps: y = cumsum(rand(200,5) - 0.5); plot(y) legend('1', '2', '3', '4', '5') title('random walks') In the above code, y is a matrix of 5 columns, each of length 200. Since x is omitted, it defaults to the row n...
The dynamics of the Geometric Brownian Motion (GBM) are described by the following stochastic differential equation (SDE): I can use the exact solution to the SDE to generate paths that follow a GBM. Given daily parameters for a year-long simulation mu = 0.08/250; sigma = 0.25/sqrt(...

Page 1 of 1