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
mean(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t)In the solver,
Open in the solvermean(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t)givese^(-t*theta)*(x0 - mu) + mu.variance(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t)In the solver,
Open in the solvervariance(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t)gives(1/2)sigma^2*(1 - e^(-2t*theta))/theta if theta != 0.stationary_distribution(ornstein_uhlenbeck_process(mu, sigma, theta))In the solver,
Open in the solverstationary_distribution(ornstein_uhlenbeck_process(mu, sigma, theta))givesnormal_distribution(mu, (1/2)sqrt(2)*sigma/sqrt(theta)).
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.
Related functions
- 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.