mfsim | R Documentation |
Simulates a multifaractal Brownian motion based on Mandelbrot's "Multifractal Model of Asset Returns" (MMAR) using a lognormal cascade.
Note: the series has a length of b^k.
mfsim(b=2, k=10, H=0.5, mu=0, sigma=1)
b |
an integer representing the number of subdivision (i.e., 2 for the binomial model). |
k |
an integer representing the number of iterations. Note: the series has a length of b^k. |
H |
a numeric value within 0 and 1 denoting the Hurst exponent. This describes the persistence (i.e., level of linear auto-correlation). Above 0.5 is persistent, below 0.5 is anti-persistent. |
mu |
the mean value of the normal cascade. |
sigma |
the standard deviation of the normal cascade. |
Returns a simulated multifractal series.
Translated from Matlab into R. Original Matlab code by Christian Wengert.
Wolfgang Schadner
Mandelbrot, B. B., Fisher, A. J., & Calvet, L. E. (1997). A multifractal model of asset returns.
mfdfa
, ffGn
# multifractal B.M.: B <- mfsim() plot(B) # multifractal noise: r <- diff(B) # e.g., stock returns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.