Note
Go to the end to download the full example code.
CKLS Process#
Simulate and visualise paths
# Author: Dialid Santiago <d.santiago@outlook.com>
# License: MIT
# Description: Simulate and visualise a CKLS process
from aleatory.processes import CKLSProcess
from aleatory.styles import qp_style
qp_style() # Use quant-pastel-style
p = CKLSProcess()
fig = p.draw(n=200, N=200, figsize=(12, 7), colormap="viridis")
fig.show()
![Chan-Karolyi-Longstaff-Sanders (CKLS) Process $X(\alpha=0.5 , \beta=0.5, \gamma=1.5, \sigma=0.1)$ starting at 1.0, Monte Carlo Simulated Paths $\{{X_t, t \in [t_0, T]\}}$, $X_T$ Marginal](../_images/sphx_glr_plot_ckls_001.png)
p = CKLSProcess(alpha=1.0, beta=0.5, gamma=1.0, sigma=0.2)
fig = p.draw(n=200, N=200, figsize=(12, 7), colormap="PuBuGn")
fig.show()
![Chan-Karolyi-Longstaff-Sanders (CKLS) Process $X(\alpha=1.0 , \beta=0.5, \gamma=1.0, \sigma=0.2)$ starting at 1.0, Monte Carlo Simulated Paths $\{{X_t, t \in [t_0, T]\}}$, $X_T$ Marginal](../_images/sphx_glr_plot_ckls_002.png)
fig = p.plot(n=100, N=10, figsize=(12, 7))
fig.show()

Total running time of the script: (0 minutes 2.463 seconds)