# # A generation of CIR process # # a(X)=alfa*(beta-x) # # b(X)=sigma*x^0.5 stationary if 2*alfa*beta/sigma^2>1 # # # The drift function # # a <- function(x) { a <- alfa*(beta-x) return(a) } # # The diffusion function # b <- function(x) { return(sigma*x^0.5) } # ## The derivative of the diffusion function # # bprim <- function(x) { return(0.5*sigma/x^0.5) }