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.1.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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file fracbm-0.1.1.tar.gz.

File metadata

  • Download URL: fracbm-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5ce8446e3043238f03bc853ee17ee572f68e62f2fde6b5c22fb97baff50c47f0
MD5 5c92b65d8f492edb6854863a2aa20585
BLAKE2b-256 f54b06c3cfcf5c1067058dcf9b7c9406a610297eacc560e1428fc85dcb8fc2c5

See more details on using hashes here.

File details

Details for the file fracbm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fracbm-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 168e4deb837d95037ba9890a8c592840d14428eeba2ff75c0a6eb6b59f76e9b1
MD5 f761a86714fb98079910cb035adec3fd
BLAKE2b-256 3ae7022d1f308dbaaeed063e1998e2cf158881dc6d3583b0a88db75d15d80d96

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