Arithmetic Brownian Motion#

Simulate and visualise paths

# Author: Dialid Santiago <d.santiago@outlook.com>
# License: MIT
# Description: Simulate and visualise an Arithmetic Brownian Motion

from aleatory.processes import BrownianMotion
from aleatory.styles import qp_style

qp_style()  # Use quant-pastel-style

p = BrownianMotion(drift=1.0, scale=2.0)
fig = p.draw(n=100, N=200, figsize=(12, 7))
fig.show()
Arithmetic Brownian Motion, Monte Carlo Simulated Paths $\{{X_t, t \in [t_0, T]\}}$, $X_T$ Marginal
p = BrownianMotion(drift=-1.0, scale=0.5)
fig = p.draw(n=100, N=200, figsize=(12, 7))
fig.show()
Arithmetic Brownian Motion, Monte Carlo Simulated Paths $\{{X_t, t \in [t_0, T]\}}$, $X_T$ Marginal
fig = p.plot(n=100, N=10, figsize=(12, 7))
fig.show()
Arithmetic Brownian Motion

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

Gallery generated by Sphinx-Gallery