Multifractal Detrended Fluctuation Analysis of International Rice Futures Market Harvey M. Niere School of Management University of the Philippines Mindanao
Fractals Benoit Mandelbrot (1977) introduced the term fractal and described its structure. Fractal has a repeating pattern that show up in every scale. Smaller piece is a reduced-form image of the larger piece. Dimension is in terms of fraction rather than integer.
Fractals
Fractals
Koch Snowflakes
Sierpinski Triangle
Sierpinski Triangle
Mandelbrot Set
Mandelbrot Set
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Nature
Fractals in Arts
Fractals in Arts
Fractals in Arts
Fractals in Arts
Fractals in Arts
Fractals in Human Organization
Fractals in Time Series Processes
Multifractals Fractal systems in which their behavior cannot be sufficiently described by a single fractal dimension. A continuous spectrum of fractal dimensions is needed. The self-similar patterns involve multiple scaling rules.
Multifractals
Multifractals Mandelbrot (1997) introduced multifractal models to study economic and financial time series in order to address the shortcomings of traditional models such as fractional Brownian motion and GARCH processes which are not appropriate with the stylized facts of the said time series such as long-memory and fat-tails in volatility.
Multifractals Norouzzadeh and Rahmani (2006) identified the sources of multifractality as 1. long-range correlations or 2. broad fat-tail distributions
Fractals, Multifractals and Hurst Exponent For fractals, the Hurst exponent, h, is constant. Ordinary Brownian motion, h = 0.5 Fractional Brownian motion, 0 < h < 1
For multifractals, the Hurst exponent is not constant but is dependent with the order of fluctuation function, q. In this case, h(q), is known as the generalized Hurst exponent. For stationary time-series, if q = 2, then h(2) = h.
Market Efficiency This refers to the degree in which the price reflects all the available information about the asset. If the market is efficient, then the price movement follows a random walk behavior. In this case, the price movement is just an ordinary Brownian motion with h = 0.5.
Methodology: MFDFA The study uses the method of Multifractal Detrended Fluctuation Analysis (MFDFA). Following Kantelhardt et al. (2002), the procedure is summarized in the following steps.
MFDFA Step 1 Given a time series ๐๐ , ๐ = ๐, โฆ , ๐ต, where ๐ต is the length, create a profile เดฅ ), ๐ ๐ = ฯ๐๐=๐(๐๐ โ ๐ เดฅ is the mean of ๐. k = ๐, โฆ , N, where ๐ iven a time series ๐ข_๐, ๐ = 1, โฆ , ๐, where ๐ is the length, create a profile
MFDFA Step 2 Divide the profile ๐ ๐ into ๐ต๐ = ๐ตฮค๐ nonoverlapping segment of length ๐. Since ๐ต is not generally a multiple of ๐, in order for the remainder part of the series to be included, this step is repeated starting at the end of the series moving backwards. Thus, a total of ๐๐ต๐ segments are produced.
MFDFA Step 3 Generate ๐๐ ๐ = ๐๐ ๐ โ ๐ ๐ + ๐ for each segment ๐ = ๐, โฆ , ๐ต๐ , and ๐๐ ๐ = ๐๐ ๐ต โ ๐ โ ๐ต๐ ๐ + ๐ for each segment ๐ = ๐ต๐ + ๐, โฆ , ๐๐ต๐ .
MFDFA Step 4 Compute the variance of ๐๐ ๐ as ๐ญ๐๐
๐ =
๐ ๐ ฯ ๐ ๐=๐
๐๐ ๐ โ ๐๐ ๐
๐,
where ๐๐ ๐ is the ๐๐๐ order fitting polynomial in the ๐๐๐ segment.
MFDFA Step 5 Obtain the ๐๐๐ order fluctuation function by ๐ญ๐ ๐ =
๐ ๐๐ต๐ ฯ ๐๐ต๐ ๐=๐
๐ญ๐๐
๐
๐
เต๐
๐เต ๐
.
Matlab Code clear all load('price.txt') x = xr(1:1236); r = log(x(2:end)./x(1:end-1)); X=cumsum(r-mean(r)); X=X'; scale=[20:4:length(r)/4]; q=[-10:0.5:10]; m=3; for ns=1:length(scale), segments(ns)=floor(length(X)/scale(ns)); for v=1:segments(ns), Index1=((((v-1)*scale(ns))+1):(v*scale(ns))); C1=polyfit(Index1,X(Index1),m);
Matlab Code fit1=polyval(C1,Index1); Index2=((length(X)-(v*scale(ns))+1):(length(X)-((v-1)*scale(ns)))); C2=polyfit(Index2,X(Index2),m); fit2=polyval(C2,Index2); RMS{ns}(v)=sqrt(((mean((X(Index1)-fit1).^2))*0.5)+((mean((X(Index2)-fit2).^2))*0.5)); end for nq=1:length(q), qRMS{nq,ns}=RMS{ns}.^q(nq); Fq(nq,ns)=mean(qRMS{nq,ns}).^(1/q(nq)); end Fq(q==0,ns)=exp(0.5*mean(log(RMS{ns}.^2))); end for nq=1:length(q), C=polyfit(log2(scale),log2(Fq(nq,:)),1);
Matlab Code Hq(nq)=C(1); qRegLine{nq}=polyval(C,log2(scale)); end j = 100; for i = 1:j, s = [r rand(1,length(r))']; t = sortrows(s,2); u = t(:,1); Y=cumsum(u-mean(u)); Y=Y'; scale=[20:4:length(u)/4]; q=[-10:0.5:10]; m=3; for ns=1:length(scale),
Matlab Code for ns=1:length(scale), segments(ns)=floor(length(Y)/scale(ns)); for v=1:segments(ns), Index1=((((v-1)*scale(ns))+1):(v*scale(ns))); C1=polyfit(Index1,Y(Index1),m); fit1=polyval(C1,Index1); Index2=((length(Y)-(v*scale(ns))+1):(length(Y)-((v-1)*scale(ns)))); C2=polyfit(Index2,Y(Index2),m); fit2=polyval(C2,Index2); RMS{ns}(v)=sqrt(((mean((Y(Index1)-fit1).^2))*0.5)+((mean((Y(Index2)-fit2).^2))*0.5)); end for nq=1:length(q), qRMS{nq,ns}=RMS{ns}.^q(nq); Fqf(nq,ns)=mean(qRMS{nq,ns}).^(1/q(nq));
Matlab Code end Fqf(q==0,ns)=exp(0.5*mean(log(RMS{ns}.^2))); end for nq=1:length(q), Cf=polyfit(log2(scale),log2(Fqf(nq,:)),1); Hqf(nq)=Cf(1); qRegLinef{nq}=polyval(Cf,log2(scale)); end k = fft2(r); a = abs(k); p = rand(size(r))*2*pi; y = a.*exp(1i.*p); z = ifft2(y); Fqf(q==0,ns)=exp(0.5*mean(log(RMS{ns}.^2)));
Matlab Code end for nq=1:length(q), Cf=polyfit(log2(scale),log2(Fqf(nq,:)),1); Hqf(nq)=Cf(1); qRegLinef{nq}=polyval(Cf,log2(scale)); end k = fft2(r); a = abs(k); p = rand(size(r))*2*pi; y = a.*exp(1i.*p); z = ifft2(y); w = real(z); Z=cumsum(w-mean(w)); Z=Z';
Matlab Code Z=Z'; scale=[20:4:length(w)/4]; q=[-10:0.5:10]; m=3; for ns=1:length(scale), segments(ns)=floor(length(Z)/scale(ns)); for v=1:segments(ns), Index1=((((v-1)*scale(ns))+1):(v*scale(ns))); C1=polyfit(Index1,Z(Index1),m); fit1=polyval(C1,Index1); Index2=((length(Z)-(v*scale(ns))+1):(length(Z)-((v-1)*scale(ns)))); C2=polyfit(Index2,Z(Index2),m); fit2=polyval(C2,Index2); RMS{ns}(v)=sqrt(((mean((Z(Index1)-fit1).^2))*0.5)+((mean((Z(Index2)-fit2).^2))*0.5));
Matlab Code end for nq=1:length(q), qRMS{nq,ns}=RMS{ns}.^q(nq); Fqr(nq,ns)=mean(qRMS{nq,ns}).^(1/q(nq)); end Fqr(q==0,ns)=exp(0.5*mean(log(RMS{ns}.^2))); end for nq=1:length(q), Cr=polyfit(log2(scale),log2(Fqr(nq,:)),1); Hqr(nq)=Cr(1); qRegLiner{nq}=polyval(Cr,log2(scale)); end HqMf(i,:)=Hqf; HqMr(i,:)=Hqr;
Matlab Code i end Hf=mean(HqMf); Hfc=std(HqMf)./Hf; Hr=mean(HqMr); Hrc=std(HqMr)./Hr;
Methodology (cont.) For multifractals, ๐ญ๐ ๐ is distributed as power laws, ๐ญ๐ ๐ ~ ๐๐ ๐ . The exponent ๐ ๐ is called as the generalized Hurst exponent. Zunino et al. (2009) shows that the degree of multifractality can be is โ๐ = ๐ ๐๐๐๐ โ ๐ ๐๐๐๐ . The higher the degree of multifractality, the lower the market efficiency.
Methodology (cont.) To identify whether the multifractality is due to longrange correlations or is due to broad fat-tail distributions, shuffled data and surrogated data are generated. 100 different shuffled time series and surrogated time series are produced to reduce statistical errors.
Methodology (cont.) Shuffling the data will remove the long-range correlation in the time series. It is done by randomizing the order of the original data. The multifractality due to long-range correlation can be computed as ๐๐ = โ๐ โ โ๐๐ where the index ๐ refers to shuffled data.
Methodology (cont.) Surrogated data is produced by randomizing the phases of original data in Fourier space. This will make the data to have normal distribution. The multifractality due to broad fat-tail distributions can be measured as ๐๐
= โ๐ โ โ๐๐ where the index ๐ refers to surrogated data.
Methodology (cont.) In conducting MFDFA, ๐ = ๐ is used as the order of polynomial fit in Step 4. The length ๐ varies from 20 to ๐ตฮค๐ with a step of 4 as suggested in Kantelhardt et al. (2002). Finally, ๐ runs from โ10 to 10 with a step of 0.5.
Data The daily price of rough rice futures at the Chicago Mercantile Exchange (CME) is used in this study. The data are downloaded from http://www.investing.com/commodities/rough-ricehistorical-data. The study covers the period from January 19, 2007 to July 18, 2014 for a total of 1,828 observations.
Futures Price
Daily Returns
Sample Shuffled Returns
Sample Surrogated Returns
Generalized Hurst Exponents
Results
Conclusions The study concludes that 1. Rice futures markets is inefficient 2. Rice futures prices can be modeled. 3. Persistence in small fluctuations and antipersistence in very large fluctuations. 4. Multifractality in the rice futures market is dominated by the fat-tail distributions.
Thank you!