First consider the case of a one-dimensional Brownian motion with constant drift and volatility.
>
|
|
>
|
|
Compute the drift and diffusion for functions of .
>
|
|
Here is an example of a one-dimensional Brownian motion with time-dependent parameters given in algebraic form.
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
>
|
|
Here is the same example but with drift and volatility given in the form of Maple procedures.
| (7) |
| (8) |
>
|
|
>
|
|
You can simulate values for any path function given as a Maple procedure.
>
|
|
>
|
|
Here are examples involving stochastic volatility.
>
|
|
>
|
|
>
|
|
Here is the same using different discretization schemes. For presentation purposes consider a geometric Brownian motion with very low volatility and time-dependent drift. Compare the simulated results with the corresponding solution of an ordinary (non-stochastic) differential equation.
>
|
|
>
|
|
>
|
|
| (10) |
>
|
|
>
|
|