Aleatory 0.1.0

I am pleased to announce that aleatory 0.1.0 is now available in PyPi!

The aleatory (/ˈeɪliətəri/) Python library provides functionality for simulating and visualising a number of stochastic processes. More precisely, it introduces objects representing continuous-time stochastic processes $X = \{X_t : t\geq 0\}$ and provides methods to:

  • generate realizations/trajectories from each process —over discrete time sets
  • create visualisations to illustrate the processes properties and behaviour

Aleatory is an open source project hosted here: aleatory -Git Homepage. Full documentation is available to read here: aleatory 0.1.0 – Documentation.

Currently, aleatory supports the following stochastic processes:

  • Brownian Motion
  • Geometric Brownian Motion
  • Ornstein–Uhlenbeck
  • Vasicek
  • Cox–Ingersoll–Ross
  • Constant Elasticity

Aleatory provides functionality to create simple plots showing paths from any of the stochastic processes implemented with only 3 lines of code! For example, her we create a Brownian motion process over the interval $[0,1]$, and simulate $N=10$ paths each one with $n=100$ steps.

from aleatory.processes import BrownianMotion
brownian = BrownianMotion()
brownian.plot(n=100, N=10)

Besides, it allows you to create charts showing not only the simulated paths but also additional elements, which provide insights about the nature of the process.

In these examples you can see:

  • Expectation of the marginal distributions, i.e. ,$\mathbb{E}[X_t]$ for each $t$ on the discretisation of $[0,T]$
  • Histogram of the final distribution $X_T$
  • Probability density function –or kernel density estimator if appropriate– of $X_T$
  • Expectation of $X_T$
  • Envelopes of probability

Take a look at the Quick-Start Guide for details about how to customise your charts with aleatory.

I hope that you enjoy using aleatory as much as I enjoyed developing it!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top
%d bloggers like this: