Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fracbm-0.1.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for fracbm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d65b2be1de3f85efddb3c90c1d7004ea34e2de69c2098efb8ea9a21e1bfde8f1
MD5 f3a5785720f5131b2e54317201c5824f
BLAKE2b-256 fbd0cc0f5edf390501b70ed27f77e1103dde0b81dbf4405741eaf5402cf1511d

See more details on using hashes here.

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

Hashes for fracbm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7832039edf4da32079e746e044b4910cdf45e16b6ea6dcf1fe496e5bede7bd6c
MD5 501077e0706d301a5996fd0b57956d71
BLAKE2b-256 a705c6342f92a8ff29de70a5d981e6d139bd6024572a69e9f2d14ff2076166fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page