# geometric_sde_path function

The path of dX = mu X dt + sigma X dW, as a function of the Wiener process's value w at time t.

## How to write it

### geometric_sde_path(mu, sigma, x0, w, time)

Gives x0 e^((mu - sigma^2/2) t + sigma w); a note says it holds when w is W(t), W(0) = 0.

**mu**

The growth rate, a constant or a function of time. Takes an expression.

**sigma**

The relative noise, a constant. Takes an expression.

**x0**

The starting value. Takes an expression.

**w**

The Wiener process's value at time t, a variable. Takes a variable, or a list of variables.

**time**

The time, a variable. Takes a variable, or a list of variables.

### geometric_sde_path(mu, sigma, x0, w, time)

The same for up to six states; the answer is the list of their paths.

**mu**

The growth rate of each state, in brackets. Takes a list.

**sigma**

The noise: one row for each state, one column for each driver. Takes a matrix, written as a list of rows.

**x0**

The starting value of each state. Takes a list.

**w**

The value of each driver at time t, in brackets. Takes a variable, or a list of variables.

**time**

The time, a variable. Takes a variable, or a list of variables.

## Examples

- $\displaystyle \mathrm{d}X_{t} = \mu X_{t}\,\mathrm{d}t+\sigma X_{t}\,\mathrm{d}W_{t},\ X_{0} = x_{0},\ W_{t} = w \Rightarrow X_{t} = x_{0} e^{t \left(\mu-\frac{\sigma^{2}}{2}\right)+\sigma w}$

  `geometric_sde_path(mu, sigma, x0, w, t)`

  In the solver, `geometric_sde_path(mu, sigma, x0, w, t)` gives `x0*e^(t*(mu - sigma^2/2) + sigma*w)`.

  [Open in the solver](https://hilberon.com/?q=geometric_sde_path%28mu%2C%20sigma%2C%20x0%2C%20w%2C%20t%29)
- $\displaystyle \mathrm{d}X_{t} = \frac{1}{10} X_{t}\,\mathrm{d}t+\frac{1}{5} X_{t}\,\mathrm{d}W_{t},\ X_{0} = 3,\ W_{t} = w \Rightarrow X_{t} = 3 e^{\frac{2 t}{25}+\frac{w}{5}}$

  `geometric_sde_path(1/10, 1/5, 3, w, t)`

  In the solver, `geometric_sde_path(1/10, 1/5, 3, w, t)` gives `3e^(2t/25 + w/5)`.

  [Open in the solver](https://hilberon.com/?q=geometric_sde_path%281%2F10%2C%201%2F5%2C%203%2C%20w%2C%20t%29)
- $\displaystyle \operatorname{geometric\_sde\_path}\left(\left[ \mu_{1}, \mu_{2} \right], \begin{pmatrix} s_{1} \\ s_{2} \end{pmatrix}, \left[ x_{1}, x_{2} \right], \left[ w \right], t\right) = \left[ x_{1} e^{t \left(\mu_{1}-\frac{s_{1}^{2}}{2}\right)+s_{1} w}, x_{2} e^{t \left(\mu_{2}-\frac{s_{2}^{2}}{2}\right)+s_{2} w} \right]$

  `geometric_sde_path([mu1, mu2], [[s1], [s2]], [x1, x2], [w], t)`

  In the solver, `geometric_sde_path([mu1, mu2], [[s1], [s2]], [x1, x2], [w], t)` gives `[x1*e^(t*(mu1 - s1^2/2) + s1*w), x2*e^(t*(mu2 - s2^2/2) + s2*w)]`.

  [Open in the solver](https://hilberon.com/?q=geometric_sde_path%28%5Bmu1%2C%20mu2%5D%2C%20%5B%5Bs1%5D%2C%20%5Bs2%5D%5D%2C%20%5Bx1%2C%20x2%5D%2C%20%5Bw%5D%2C%20t%29)

## Related functions

- [geometric_brownian_motion_process](https://hilberon.com/library/geometric_brownian_motion_process)

  A process that grows at rate mu with relative noise sigma, started at x0.
- [affine_sde_moments](https://hilberon.com/library/affine_sde_moments)

  The mean and variance at time t of dX = (a + b X) dt + sigma dW, started at x0.
- [ito_formula](https://hilberon.com/library/ito_formula)

  Itô's lemma: the differential of an expression of states that follow an Itô process.
- [ito_formula_data](https://hilberon.com/library/ito_formula_data)

  The certified record behind ito_formula: its result, validity, certificate and theorem.
- [fit](https://hilberon.com/library/fit)

  The least-squares fit of a combination of functions through points.
- [ito_integral](https://hilberon.com/library/ito_integral)

  The Itô integral of an expression of the Wiener value w and the time s, from 0 to t.

---
Source: https://hilberon.com/library/geometric_sde_path
