rcOU {sde}R Documentation

Ornstein-Uhlenbeck or Vasicek process conditional law

Description

Density, distribution function, quantile function and random generation for the conditional law Xt+Dt|Xt=x0 of the Ornstein-Uhlenbeck process also known as Vasicek process

Usage

dcOU(x, Dt, x0, theta, log = FALSE)
pcOU(x, Dt, x0, theta, lower.tail = TRUE, log.p = FALSE) 
qcOU(p, Dt, x0, theta, lower.tail = TRUE, log.p = FALSE)
rcOU(n=1, Dt, x0, theta)

Arguments

x vector of quantiles.
p vector of probabilities.
Dt lag or time
x0 the value of the process at time t. See details.
theta parameter of the Ornstein-Uhlenbeck process. See details.
n number of random numbers to generate from the conditional distribution.
log, log.p logical; if TRUE, probabilities p are given as log(p).
lower.tail logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].

Details

This function returns quantities related to the conditional law of the process solution of dX_t = (theta[1] - theta[2]*Xt)*dt + theta[3]*dWt.

Constraints: theta[2]>0, theta[3]>0.

Please note that the process is stationary only if theta[2]>0.

Value

x a numeric vector

Note

This package is a companion to the book Simulation and Inference for Stochastic Differential Equation, Springer, NY.

Author(s)

Stefano Maria Iacus

References

Uhlenbeck, G. E., Ornstein, L. S. (1930) On the theory of Brownian motion, Phys. Rev., 36, 823-841.

Vasicek, O. (1977) An Equilibrium Characterization of the Term Structure, Journal of Financial Economics, 5, 177-188.

See Also

rsOU

Examples

rcOU(n=1, Dt=0.1, x0=1, theta=c(0,2,1))

[Package sde version 1.9.14 Index]