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:
- shape
int|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.
- H
float Hurst exponent
- lam
float Lambda, intermittency parameter
- L
float Integral scale
- sigma
float Variance of process
- method
str Method to use: ‘cme’ selects circulant matrix embedding (default, O(\(NlogN\)) in memory), ‘chol’ selects Cholesky decomposition (O(\(N^2\)) in memory).
- z0
tuple(ndarrayoffloat,ndarrayoffloat) 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).
- shape
- Returns:
- mrw
ndarray Synthesized mrw realizations. If shape is scalar, fbm is ofshape (N,). Otherwise, it is of shape (N, R).
- mrw
References
[1]Bacry, Delour, Muzy, “Multifractal Random Walk”, Physical Review E, 2001