Skip to main content

Fractional Brownian Motion (fBM) generators in Python.

Project description

fracbm

Fractional Brownian Motion (FBM) generators in Python.

Installation

pip  install  fgn

Usage

import  matplotlib.pyplot  as  plt

import  fracbm

# Generate with Davies–Harte method

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fracbm-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 ba418ab0b80df5580d043449e8da4d8284d63c51f9e7a5cb21a3ad69d179b1b1
MD5 2aec58746d483b8ac283c95f95dc250d
BLAKE2b-256 33ce346be76a71aa9be7be747116c633df6038fdee9611d17e5f1e79028dc521

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fracbm-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e036e80ba4a54cde8cdcb7884d8ef6931773c0c3504367185c848eee1a3d03ca
MD5 a947b0168e24f16f8df5b1fbe546abd0
BLAKE2b-256 2371231cb142f92f773319fbea9c4c330bc359dab03492a27c6bd6ef7e76eebb

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