Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

ornstein_uhlenbeck_process function

A process pulled toward mu at rate theta, with noise sigma, started at x0.

How to write it

ornstein_uhlenbeck_process(mu, sigma, theta, x0)

Stands for itself; mean, variance, pdf and stationary_distribution read it.

mu
The level it is pulled toward: dX = theta (mu - X) dt + sigma dW. Takes an expression.
sigma
The noise, above 0. Takes an expression.
theta
The rate of the pull, above 0. Takes an expression.
x0
The starting value. Takes an expression.

ornstein_uhlenbeck_process(mu, sigma, theta)

Without a starting value it names the stationary process, which stationary_distribution reads.

mu
The level it is pulled toward. Takes an expression.
sigma
The noise, above 0. Takes an expression.
theta
The rate of the pull, above 0. Takes an expression.

Examples

  • E[Xt], X∼OU⁡(μ,σ,θ,x0)=x0−μetθ+μ\displaystyle E[X_{t}],\ X \sim \operatorname{OU}(\mu, \sigma, \theta, x_{0}) = \frac{x_{0}-\mu}{e^{t \theta}}+\mu
    mean(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t)

    In the solver, mean(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t) gives e^(-t*theta)*(x0 - mu) + mu.

    Open in the solver
  • Var⁡(Xt), X∼OU⁡(μ,σ,θ,x0)={σ2(1−1e2tθ)2θif θ≠0\displaystyle \operatorname{Var}(X_{t}),\ X \sim \operatorname{OU}(\mu, \sigma, \theta, x_{0}) = \begin{cases} \frac{\sigma^{2} \left(1-\frac{1}{e^{2 t \theta}}\right)}{2 \theta} & \text{if } \theta \neq 0 \end{cases}
    variance(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t)

    In the solver, variance(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t) gives (1/2)sigma^2*(1 - e^(-2t*theta))/theta if theta != 0.

    Open in the solver
  • OU⁡(μ,σ,θ)⇒X∞∼N(μ,2σ2θ)\displaystyle \operatorname{OU}(\mu, \sigma, \theta) \Rightarrow X_{\infty} \sim \mathcal{N}\left(\mu, \frac{\sqrt{2} \sigma}{2 \sqrt{\theta}}\right)
    stationary_distribution(ornstein_uhlenbeck_process(mu, sigma, theta))

    In the solver, stationary_distribution(ornstein_uhlenbeck_process(mu, sigma, theta)) gives normal_distribution(mu, (1/2)sqrt(2)*sigma/sqrt(theta)).

    Open in the solver

Functions its examples use

  • mean

    The average of a list of numbers, or the expected value of a distribution.

  • variance

    The sample variance of a list of numbers, or the variance of a distribution.

  • stationary_distribution

    The law a process settles into over time, when it has one.

  • ito_process

    A process given by its drift and diffusion: dX = drift dt + diffusion dW.

  • wiener_process

    Brownian motion with drift mu and noise sigma, started at 0.

  • geometric_brownian_motion_process

    A process that grows at rate mu with relative noise sigma, started at x0.

  • pdf

    The density of a distribution at a point, or the probability of a value for a discrete one.

  • normal_distribution

    The normal distribution with mean mu and standard deviation sigma.

  • poisson_distribution

    The number of events in a period when they come at an average rate lambda.