WienerProcess - Maple Help

Finance

 WienerProcess
 create new Wiener process

 Calling Sequence WienerProcess(J) WienerProcess(Sigma)

Parameters

 J - (optional) stochastic process with non-negative increments, or a deterministic function of time; subordinator Sigma - Matrix; covariance matrix

Description

 • The WienerProcess command creates a new Wiener process. If called with no arguments, the WienerProcess command creates a new standard Wiener process, $W\left(t\right)$, that is a Gaussian process with independent increments such that $W\left(0\right)=0$ with probability $1$, $E\left(W\left(t\right)\right)=0$ and $\mathrm{Var}\left(W\left(t\right)-W\left(s\right)\right)=t-s$ for all $0\le s\le t$.
 • The WienerProcess(Sigma) calling sequence creates a Wiener process with covariance matrix Sigma. The matrix Sigma must be a positive semi-definite square matrix. The dimension of the generated process will be equal to the dimension of the matrix Sigma.
 • If an optional parameter J is passed, the WienerProcess command creates a process of the form $W\left(J\left(t\right)\right)$, where $W\left(t\right)$ is the standard Wiener process. Note that the subordinator $J\left(t\right)$ must be an increasing process with non-negative, homogeneous, and independent increments. This can be either another stochastic process such as a Poisson process or a Gamma process, a procedure, or an algebraic expression.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

First create a standard Wiener process and generate $50$ replications of the sample path and plot the result.

 > $W≔\mathrm{WienerProcess}\left(\right):$
 > $P≔\mathrm{PathPlot}\left(W\left(t\right),t=0..3,\mathrm{timesteps}=50,\mathrm{replications}=20,\mathrm{thickness}=3,\mathrm{color}=\mathrm{red},\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right):$$P$

Define another stochastic variable as an expression involving ${W}_{1}$. You can compute the expected value of $X\left(3\right)$ using Monte Carlo simulation with the specified number of replications of the sample path.

 > $T≔3$
 ${T}{≔}{3}$ (1)
 > $\mathrm{ExpectedValue}\left(\mathrm{exp}\left(0.05T+0.3W\left(T\right)\right),\mathrm{replications}={10}^{5}\right)$
 $\left[{\mathrm{value}}{=}{1.331151006}{,}{\mathrm{standarderror}}{=}{0.002335223363}\right]$ (2)

Define another stochastic variable $Y$, which also depends on ${W}_{1}$ but uses symbolic coefficients. Note that $Y$ is an Ito process, so it is governed by the stochastic differential equation (SDE) $\mathrm{dY}\left(t\right)=\mathrm{\mu }\left(Y\left(t\right),t\right)\mathrm{dt}+\mathrm{\sigma }\left(Y\left(t\right),t\right)\mathrm{dW}\left(t\right)$. You can use the Drift and Diffusion commands to compute $\mathrm{\mu }$ and $\mathrm{\sigma }$.

 > $Y≔t↦\mathrm{exp}\left(\mathrm{\mu }\cdot t+\mathrm{\sigma }\cdot W\left(t\right)\right):$$Y\left(t\right)$
 ${{ⅇ}}^{{\mathrm{\mu }}{}{t}{+}{\mathrm{\sigma }}{}{\mathrm{_W}}{}\left({t}\right)}$ (3)
 > $\mathrm{subs}\left(Y\left(t\right)='Y'\left(t\right),\mathrm{Drift}\left(Y\left(t\right)\right)\right)$
 ${\mathrm{\mu }}{}{Y}{}\left({t}\right){+}\frac{{{\mathrm{\sigma }}}^{{2}}{}{Y}{}\left({t}\right)}{{2}}$ (4)
 > $\mathrm{subs}\left(Y\left(t\right)='Y'\left(t\right),\mathrm{Diffusion}\left(Y\left(t\right)\right)\right)$
 ${\mathrm{\sigma }}{}{Y}{}\left({t}\right)$ (5)

Create a subordinated Wiener process that uses a Poisson process with intensity parameter $\mathrm{\lambda }=0.3$ as subordinator.

 > $J≔\mathrm{PoissonProcess}\left(0.3\right)$
 ${J}{≔}{\mathrm{_P}}$ (6)
 > $\mathrm{W2}≔\mathrm{WienerProcess}\left(J\right)$
 ${\mathrm{W2}}{≔}{\mathrm{_W0}}$ (7)
 > $\mathrm{P2}≔\mathrm{PathPlot}\left(\mathrm{W2}\left(t\right),t=0..3,\mathrm{timesteps}=50,\mathrm{replications}=20,\mathrm{thickness}=3,\mathrm{color}=\mathrm{blue},\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right):$$\mathrm{P2}$
 > $\mathrm{plots}\left[\mathrm{display}\right]\left(P,\mathrm{P2}\right)$

Here is a representation of the Ornstein-Uhlenbeck process in terms of or a subordinated Wiener process. In this case the subordinator is a deterministic process that can be specified as a Maple procedure or an algebraic expression.

 > $\mathrm{\kappa }≔0.1:$$\mathrm{\sigma }≔0.3:$$\mathrm{\theta }≔0.5:$$\mathrm{R0}≔0.02:$
 > $\mathrm{\tau }≔\frac{\mathrm{exp}\left(2\mathrm{\kappa }t\right)-1}{2\mathrm{\kappa }}$
 ${\mathrm{\tau }}{≔}{5.000000000}{}{{ⅇ}}^{{0.2}{}{t}}{-}{5.000000000}$ (8)
 > $\mathrm{W3}≔\mathrm{WienerProcess}\left(\mathrm{\tau }\right)$
 ${\mathrm{W3}}{≔}{\mathrm{_W1}}$ (9)
 > $R≔t↦\mathrm{R0}\cdot \mathrm{exp}\left(-\mathrm{\kappa }\cdot t\right)+\mathrm{\theta }\cdot \left(1-\mathrm{exp}\left(-\mathrm{\kappa }\cdot t\right)\right)+\mathrm{\sigma }\cdot \mathrm{exp}\left(-\mathrm{\kappa }\cdot t\right)\cdot \mathrm{W3}\left(t\right):$$R\left(t\right)$
 ${-}{0.48}{}{{ⅇ}}^{{-}{0.1}{}{t}}{+}{0.5}{+}{0.3}{}{{ⅇ}}^{{-}{0.1}{}{t}}{}{\mathrm{_W1}}{}\left({t}\right)$ (10)
 > $\mathrm{P3}≔\mathrm{PathPlot}\left(R\left(t\right),t=0..3,\mathrm{timesteps}=50,\mathrm{replications}=20,\mathrm{thickness}=3,\mathrm{color}=\mathrm{blue},\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right):$$\mathrm{P3}$
 > $\mathrm{ExpectedValue}\left(R\left(3\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{5}\right)$
 $\left[{\mathrm{value}}{=}{0.1517355448}{,}{\mathrm{standarderror}}{=}{0.009505937484}\right]$ (11)

Compatibility

 • The Finance[WienerProcess] command was introduced in Maple 15.