Density, distribution function, quantile function, and random generation for the conditional law \(X(t+D_t) | X(t)=x_0\) of the Ornstein-Uhlenbeck process, also known as the Vasicek process.
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)
a numeric vector
vector of quantiles.
vector of probabilities.
lag or time.
the value of the process at time t
; see details.
parameter of the Ornstein-Uhlenbeck process; see details.
number of random numbers to generate from the conditional distribution.
logical; if TRUE, probabilities \(p\) are given as \(\log(p)\).
logical; if TRUE (default), probabilities are P[X <= x]
;
otherwise P[X > x]
.
Stefano Maria Iacus
This function returns quantities related to the conditional law of the process solution of $${\rm d}X_t = (\theta_1 - \theta_2 X_t){\rm d}t + \theta_3 {\rm d}W_t.$$
Constraints: \(\theta_2>0, \theta_3>0\).
Please note that the process is stationary only if \(\theta_2>0\).
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.
rsOU
rcOU(n=1, Dt=0.1, x0=1, theta=c(0,2,1))
Run the code above in your browser using DataLab