Skip to main content

Multivariate fractional Brownian motion

Project description

Python 3x PyPI - Version

Multivariate fractional Brownian motion (mfBm)

This package provides implementation for the multivariate fractional Brownian motion and simple fractional brownian motion with the method described in [1].

Installation

The mfbm package is available on PyPI and can be install via pip with the following command:

pip install mfbm

Example usage

import numpy as np
from mfbm import MFBM

p = 5
H = np.linspace(0.6, 0.9, 5)
n = 100
T = 100

rho = 0.7 * np.ones((p, p))
np.fill_diagonal(rho, 1)

eta = np.ones_like(rho)
sigma = np.ones(len(H))

mfbm = MFBM(H, rho, eta, sigma)
ts = mfbm.sample(n, T)

Explanation of the parameters:

  • H: np.ndarray is a one dimensional array of the Hurst parameters, where all Hursts are in the range (0, 1).
  • rho: np.ndarray is a two dimensional array of the cross correlations between the multiple fBms, default is the identity matrix.
  • sigma: np.ndarray is a one dimensional array of the standard deviations of the single fBms, default is all ones.
  • n: int is the number of increaments to generate for the multivariate fractional Gaussian noise.
  • T: float is the time horizon of the mfBm, default is n.

mfbm

[1] Andrew T. A. Wood & Grace Chan (1994): Simulation of Stationary Gaussian Processes in [0, 1]^d , Journal of Computational and Graphical Statistics, 3:4, 409-432

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

mfbm-0.1.5.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

mfbm-0.1.5-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file mfbm-0.1.5.tar.gz.

File metadata

  • Download URL: mfbm-0.1.5.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mfbm-0.1.5.tar.gz
Algorithm Hash digest
SHA256 536357f7cd0cb7391a4671554b6dc3a2488044598a09546e627a4bfe6e469371
MD5 4fbf88591a5ae436d77562ce0aba6653
BLAKE2b-256 668a872b4f38113cf33ff7726c766cde07a92e445145884ea86586745e224a97

See more details on using hashes here.

File details

Details for the file mfbm-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: mfbm-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mfbm-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 27a5bdbb498532547b37565c38c65aa743cd262939d426c4c7f8944f81c5dfce
MD5 63ee8dc8f93edb6ed36c814e6f2ff9c5
BLAKE2b-256 be47a5ca75e6ec3ba41b278e451d6289e9bea874b87cbc52dd03b2af1aa39536

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