aleatory.processes.CKLSProcess#

class aleatory.processes.CKLSProcess(*args, **kwargs)[source]#

Chan-Karolyi-Longstaff-Sanders (CKLS) process#

../_images/ckls_process_draw.png

Notes#

A CKLS process \(X = \{X : t \geq 0\}\) is characterised by the following Stochastic Differential Equation

\[dX_t = (\alpha + \beta X_t) dt + \sigma X_t^{\gamma} dW_t, \ \ \ \ \forall t\in (0,T],\]

with initial condition \(X_0 = x_0\), where

  • \(\alpha \in \mathbb{R}\)

  • \(\beta \in \mathbb{R}\)

  • \(\sigma>0\) is the scale of the volatility

  • \(\gamma\geq 0\) is the elasticity term

  • \(W_t\) is a standard Brownian Motion.

References#

  • CHAN, K.C., KAROLYI, G.A., LONGSTAFF, F.A. and SANDERS, A.B. (1992),

An Empirical Comparison of Alternative Models of the Short-Term Interest Rate. The Journal of Finance, 47: 1209-1227. https://doi.org/10.1111/j.1540-6261.1992.tb04011.x

Constructor, Methods, and Attributes#

__init__(alpha=0.5, beta=0.5, sigma=0.1, gamma=1.0, initial=1.0, T=1.0, rng=None)#
Parameters:
  • alpha (float) – the parameter \(\alpha\) in the above SDE

  • beta (float) – the parameter \(\beta\) in the above SDE

  • sigma (float) – the parameter \(\sigma>0\) in the above SDE

  • gamma (float) – the parameter \(\gamma\) in the above SDE

  • initial (float) – the initial condition \(x_0\) in the above SDE

  • T (float) – the right hand endpoint of the time interval \([0,T]\) for the process

  • rng (numpy.random.Generator) – a custom random number generator

Methods

__init__([alpha, beta, sigma, gamma, ...])

param float alpha:

the parameter \(\alpha\) in the above SDE

draw(n, N[, T, marginal, envelope, title, ...])

Simulates and plots paths/trajectories from the instanced stochastic process.

estimate_covariances([times])

estimate_expectations()

estimate_quantiles(q)

estimate_stds()

estimate_variances()

marginal_expectation([times])

marginal_stds([times])

marginal_variance([times])

plot(n, N[, T, title, suptitle])

Simulates and plots paths/trajectories from the instanced stochastic process.

plot_covariance([times, title])

plot_kernel([times, colormap, matrix_shape, ...])

plot_kernel3d([times, title])

plot_mean_variance([times, title])

plot_paths_and_kernel(n, N[, T, title, ...])

Plots the paths of the process and the covariance kernel.

process_covariance([times])

process_expectation()

process_stds()

process_variance()

sample(n)

simulate(n, N[, T])

Simulate paths/trajectories from the instanced stochastic process.

Attributes

T

End time of the process.

alpha

beta

gamma

rng

sigma