rsCIR function

Cox-Ingersoll-Ross process stationary law

Cox-Ingersoll-Ross process stationary law

Density, distribution function, quantile function, and random generation of the stationary law for the Cox-Ingersoll-Ross process.

dsCIR(x, theta, log = FALSE) psCIR(x, theta, lower.tail = TRUE, log.p = FALSE) qsCIR(p, theta, lower.tail = TRUE, log.p = FALSE) rsCIR(n=1, theta)

Arguments

  • x: vector of quantiles.
  • p: vector of probabilities.
  • theta: parameter of the Cox-Ingersoll-Ross process; see details.
  • n: number of random numbers to generate from the conditional distribution.
  • log, log.p: logical; if TRUE, probabilities pp are given as log(p)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 stationary law of the process solution of

dXt=(θ1θ2Xt)dt+θ3XtdWt.dXt=(theta[1]theta[2]Xt)dt+theta[3]sqrt(Xt)dWt. {\rm d}X_t = (\theta_1 - \theta_2 X_t){\rm d}t + \theta_3\sqrt{X_t} {\rm d}W_t.dX_t = (theta[1] - theta[2]*Xt)*dt + theta[3]*sqrt(X_t)*dWt.

Constraints: 2theta[1]>theta[3]22*theta[1] > theta[3]^2, all thetatheta positive.

Returns

  • x: a numeric vector

References

Cox, J.C., Ingersoll, J.E., Ross, S.A. (1985) A theory of the term structure of interest rates, Econometrica, 53, 385-408.

Author(s)

Stefano Maria Iacus

See Also

rsCIR

Examples

rsCIR(n=1, theta=c(6,2,1))
  • Maintainer: Stefano Maria Iacus
  • License: GPL (>= 2)
  • Last published: 2022-08-09

Useful links