mrw#

pymultifracs.simul.mrw(shape, H, lam, L=None, sigma=1, method='cme', z0=(None, None))#

Create a realization of fractional Brownian motion using circulant matrix embedding.

Parameters:
shapeint | tuple(int, int)

If integer, it is the number of samples N. If tuple it is (N, R), the number of samples and realizations, respectively.

Hfloat

Hurst exponent

lamfloat

Lambda, intermittency parameter

Lfloat

Integral scale

sigmafloat

Variance of process

methodstr

Method to use: ‘cme’ selects circulant matrix embedding (default, O(\(NlogN\)) in memory), ‘chol’ selects Cholesky decomposition (O(\(N^2\)) in memory).

z0tuple(ndarray of float, ndarray of float)

Optional tuple of white noise values, to fix the random component across simulations. The shape should be \((2N-2,R)\) for ‘cme’ and \((N,R)\).

.. note:: Arrays in `z0` can be generated using the following command:
or .. code-block:: python

z = np.random.randn(N, R).

Returns:
mrwndarray

Synthesized mrw realizations. If shape is scalar, fbm is ofshape (N,). Otherwise, it is of shape (N, R).

References

[1]

Bacry, Delour, Muzy, “Multifractal Random Walk”, Physical Review E, 2001