Fractional Brownian Motion (fBM) generators in Python.
Project description
fracbm
Fractional Brownian Motion (fBM) generators in Python.
Installation
pip install fracbm
Usage
import matplotlib.pyplot as plt
import fracbm
# Generate with Davies–Harte method. 1000 steps with a Hurst parameter of 0.8
B = fracbm.daviesharte(n=1000, H=0.8)
plt.plot(B)
plt.show()
Features
Generate exact fractional Brownian motion using:
- Cholesky decomposition, order $\mathcal{O}(n^3)$
- Davies-Harte method, order $\mathcal{O}(n \log n)$ (recommended)
Vary the Hurst parameter $H \in [0,1]$:
- $H = 0.5$ is regular Brownian motion.
- $H > 0.5$ causes slowly decaying positive autocorrelations (positive increments tend to follow positive increments - increments follow a trend).
- $H < 0.5$ causes fast-decaying negative autocorrelations (negative increments tend to follow positive increments - increments revert to the mean).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fracbm-0.1.2.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fracbm-0.1.2.tar.gz.
File metadata
- Download URL: fracbm-0.1.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d65b2be1de3f85efddb3c90c1d7004ea34e2de69c2098efb8ea9a21e1bfde8f1
|
|
| MD5 |
f3a5785720f5131b2e54317201c5824f
|
|
| BLAKE2b-256 |
fbd0cc0f5edf390501b70ed27f77e1103dde0b81dbf4405741eaf5402cf1511d
|
File details
Details for the file fracbm-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fracbm-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7832039edf4da32079e746e044b4910cdf45e16b6ea6dcf1fe496e5bede7bd6c
|
|
| MD5 |
501077e0706d301a5996fd0b57956d71
|
|
| BLAKE2b-256 |
a705c6342f92a8ff29de70a5d981e6d139bd6024572a69e9f2d14ff2076166fe
|