Learn R Programming

Sim.DiffProc (version 2.5)

CKLS: Creating The Chan-Karolyi-Longstaff-Sanders (CKLS) family of models (by Milstein Scheme)

Description

Simulation the chan-karolyi-longstaff-sanders models by milstein scheme.

Usage

CKLS(N, M, t0, T, x0, r, theta, sigma, gamma, output = FALSE)

Arguments

N
size of process.
M
number of trajectories.
t0
initial time.
T
final time.
x0
initial value of the process at time t0.
r
constant ( (r + theta *X(t)) :drift coefficient).
theta
constant ( (r + theta *X(t)) :drift coefficient).
sigma
constant positive ( sigma * X(t)^gamma :diffusion coefficient).
gamma
constant positive ( sigma * X(t)^gamma :diffusion coefficient).
output
if output = TRUE write a output to an Excel (.csv).

Value

  • data.frame(time,x) and plot of process.

Details

The Chan-Karolyi-Longstaff-Sanders (CKLS) family of models is a class of parametric stochastic differential equations widely used in many finance applications, in particular to model interest rates or asset prices. The CKLS process solves the stochastic differential equation : $$dX(t) = (r + theta * X(t))*dt + sigma *X(t)^gamma * dW(t)$$ With (r + theta * X(t)) :drift coefficient and sigma* X(t)^gamma :diffusion coefficient, W(t) is Wiener process, the discretization dt = (T-t0)/N. This CKLS model is a further extension of the Cox-Ingersoll-Ross model and hence embeds all previous models. The CKLS model does not admit an explicit transition density unless r = 0 or gamma = 0.5. It takes values in (0, + lnf) if r,theta > 0, and gamma > 0.5. In all cases, sigma is assumed to be positive.

See Also

CEV Constant Elasticity of Variance Models, CIR Cox-Ingersoll-Ross Models, CIRhy modified CIR and hyperbolic Process, DWP Double-Well Potential Model, GBM Model of Black-Scholes, HWV Hull-White/Vasicek Models, INFSR Inverse of Feller s Square Root models, JDP Jacobi Diffusion Process, PDP Pearson Diffusions Process, ROU Radial Ornstein-Uhlenbeck Process, diffBridge Diffusion Bridge Models, snssde Simulation Numerical Solution of SDE.

Examples

Run this code
## Chan-Karolyi-Longstaff-Sanders Models 
## dX(t) = (0.3 + 0.01 *X(t)) *dt + 0.1 * X(t)^0.2 * dW(t)
## One trajectorie
 CKLS(N=1000,M=1,T=1,t0=0,x0=1,r=0.3,theta=0.01,sigma=0.1,gamma=   0.2)

Run the code above in your browser using DataLab