Self-Similar Models: Relationship between the Diffusion Entropy Analysis, Detrended Fluctuation Analysis and Lévy Models

: Financial and geophysical data, like many other low and high frequency time series, are known to exhibit some memory effects. These memory effects may be long or short, permanent or temporal depending on the event that is being modeled. The purpose of this study is to investigate the memory effects characterized by the ﬁnancial market closing values and volcanic eruption time series as well as to investigate the relation between the self-similar models used and the Lévy process. This paper uses highly effective scaling methods including Lévy processes, Detrended Fluctuation Analysis (DFA) and Diffusion Entropy Analysis (DEA) to examine long-range persistence behavior in time series by estimating their respective parameters. We use the parameter of the Lévy process ( α ) characterizing the data and the scaling parameters of DFA ( H ) and DEA ( δ ) characterizing the self-similar property to generate a relationship between the three (3) aforementioned scaling methods. Findings from the numerical simulations conﬁrm the existence of long-range persistence (long-memory behavior) in both the ﬁnancial and geophysical time series. Furthermore, the numerical results from this study indicates an approximate inverse relationship between the parameter of the Lévy process and the scaling parameters of the DFA and DEA (i.e., H , δ ≈ 1 α ), which we prove analytically.


Introduction
In recent years, researchers have developed several techniques to predict and forecast real-world events or processes that are seemingly difficult to predict due to their complex nature. Such studies have produced major improvements in predictions related to financial market crashes, volcanic activities, climates, heartbeats, etc. Mandelbrot (1982), in the article "The Fractal Geometry of Nature", describes the surprisingly excellent resemblance between real landscapes and geometrically generated landscapes using simple fractal models [1]. He pointed out that fractals can exhibit self-similarity in enormous ways.
A small portion of snowflake depicts similar statistical properties as the whole: a simple example of a self-similar process. This is illustrated by the Koch snowflake curve shown in Figure 1. Self-similar processes are used to describe stochastic processes that exhibit the phenomenon of self-similarity. These processes occur in several areas of applied mathematics such as fractals, chaos theory, long-memory processes and spectral analysis. That a self-similar process exhibit long-memory effects implies the dependence in time series decays more slowly than an exponential decay, represented as a power-law relation. Let us now take a look at the formal definition of a self-similar process.
Definition 1 (Self-Similarity). In the sense of finite dimensional distributions fdd = , we define a stochastic process X t as self-similar if two processes {X at } t≥0 and {a H X t } t≥0 have the same law if there exists H > 0. i.e., where a > 0 is a scale factor and H is the self-similar parameter of the stochastic process X t [2].
The variances of financial market indices and seismic energy released from volcanic eruptions are stochastic. They are time-varying and they rise during high fluctuation periods. The self-similar properties exhibited by such events are determined by estimating the trends in smaller windows of time over the entire series. This method, known as the detrended fluctuation analysis (DFA), was developed by Peng et al. in the paper "Mosaic Organization of DNA Nucleotides" [3]. The DFA converts a series into a random walk and uses least squares to estimate trends and fluctuations [4,5]. This technique is capable of detecting long-range persistence (self-similar pattern) in both stationary and non-stationary time series.
An alternative to the DFA technique is the diffusion entropy analysis (DEA) model developed by Scafetta et al. (2002), also called a pdf-scaling method. The DEA can be used to investigate if a time series is characterized by Gaussian or Lévy distribution [6,7]. It also permits the detection of long-range persistence in time series. Scafetta (2003) argues that the DEA is the only method that correctly quantifies the self-similarity parameter of time series of complex processes [6].
Researchers have applied these models to diverse fields including DNA sequences [8][9][10], neural oscillations [11], speech pathology detection [12], and heartbeat fluctuation in different sleep stages [13]. The suite of models offered by Peng (1994) and Scafetta (2002) prove to be some of the best techniques for detecting long-range persistence in stationary and non-stationary time series.
Unlike non-Gaussian Lévy processes that perform poorly in long-range correlation scales, Lévy flights have been used to model evolution of complex stochastic events [14][15][16]. The Lévy flight is a stochastic process that is based on the random succession of steps on space (random walk theory) and probability distribution of the step-sizes which are known to have heavy-tails. In particular, Lévy flights characterizes random steps on a discrete space while Lévy walk describes random steps on a continuous space. However, researchers use "Lévy flights" to describe both cases in literature sometimes [17,18]. Lévy flights have been used to model several events including financial market crashes and trajectories followed by animals when they hunt for food [19][20][21], etc. This is as a result of the generalized central limit theorem (GCLT). When a large collection of step-sizes of a random trajectory satisfy the power-law condition, the Lévy flight distribution is stable: the reason for choosing the Lévy flight distribution to characterize the financial and geophysical processes exhibited by the real-world time series used herein.
In the paper "detecting market crashes by analyzing long memory effects using high-frequency data" by Barany et al. (2012), the authors estimated long-memory behavior in high-frequency financial time series using the DFA, Rescaled-Range Analysis (R/S) and the Lévy flight model to detect market crashes. They go further to generate an inverse relationship between the Hurst exponent and the Lévy model parameter. This close relationship proposes a satisfactory self-similar pattern for analysis [2].
In this paper, we generate a numerical relationship between the Lévy parameter α characterizing the data and the resulting parameters (H, and δ) of the DFA and DEA characterizing the self-similar property respectively. Furthermore, we prove analytically the relationship obtained. To perform these tasks, we first investigate the existence of long-range persistence in sets of financial market indices and recordings of volcanic eruptions using the DFA, DEA. We report on the scaling parameters of the DFA and DEA and conclude that the time series exhibits long-range correlation (or long-range persistence) if 0.5 < H, δ < 1, and anti-persistent if 0 < H, δ < 0.5. Useful tables of results and plots of the fitted models are reported.
The outline of this paper is as follows. Section 2 details the scaling methods and description of the real-world data used in this paper. Section 3 contains the numerical results and proposed relationships as well as proofs. Section 4 provides a detailed discussion of the results. Section 5 concludes. Some proofs, figures and plots generated from our numerical simulations are provided in the Appendix.

Methods
In this section, we describe three techniques for estimating self-similarity or long-range correlations in time series. There are several methods used to estimate scaling exponents of time series to investigate long-memory behavior. In this study, we limit ourselves to Lévy flight model, DFA and DEA techniques for quantifying self-similarity. Note that α, H, δ are used to denote the Lévy, DFA and DEA scaling exponents respectively. An overview of the real-world data used for the purpose of evaluating and comparing these three scaling methods are also described.

Lévy Flight Model
The stable Lévy process (Lévy flight model) has independent increments but are designated as long memory processes [2]. Lévy et al. [22] discovered that the most general representation of a stable distribution is through the characteristic functions ϕ(q). These characteristic functions are defined as: and where the scaling parameter of the Lévy: 0 < α ≤ 2, γ is a positive scale factor (γ 2 = σ 2 (variance)), µ is a real-valued constant known as the location parameter (or mean) and −1 ≤ β ≤ 1 is the skewness parameter. Analytically, the stable Lévy distribution is only known for a few values of α and β. Consider the centered symmetric distribution (β = 0, µ = 0), the characteristic function is: Then, the stable Lévy distribution (Fourier transform of (4))is defined as To avoid the complications that emerge in the infinite second moment (i.e., the fact that stable Lévy processes with α < 2 have infinite variance), consider a stochastic process with finite variance that follows scale relations called Truncated Lévy Flight (TLF) (Mantegna and Stanley (1994)).
The TLF distribution (a non-stable distribution with finite variance) is defined by where P(x) is a symmetric Lévy distribution. However, depending on the magnitude of the cut-off length l, it relaxes convergence. For a smaller cut-off length l, convergence is faster which generates an instantaneous cut in its tails. [14] To correct this problem, Koponen (1995) proposed a TLF with characteristic function shown in (7) below in which the cut function is a decreasing exponential function with parameter l.
and scale factors: We obtain T = N∆t if we discretize in time with steps ∆t. Thus, we must calculate the sum of N stochastic variables that are independent and identically distributed (i.i.d) at each interval.
Given a small sample of i.i.d random variables N, its probability distribution is very close to the stable Lévy distribution. The standardized (improved) model is given by: if the variance equals 1. See [16] for more details. The Equation (10) represents the normalized Lévy model applied in this study. In the numerical simulations, we adjust the values of A, the arbitrary scale parameter l and the characteristic exponent α to best fit the cumulative function. Please refer to [2,[23][24][25] for more details and Appendix B for figures.

Detrended Fluctuation Analysis (DFA)
The DFA method is an important technique in revealing long range correlations in both stationary and non-stationary time series by estimating its scaling exponent. The numerical procedure to estimate the DFA exponent is presented below.
Let N be the length of time series (y 1 , y 2 , y 3 , ..., y N ). The logarithmic ratio of the time series is obtained and the length of the new time series M(t) is N − 1.
The absolute value of M(t) is integrated: The integrated time series of length N is divided into m boxes of equal length n with no intersection between them. As the data is divided into equal length intervals, there may be some left over at the end. To take account of these leftover values, the same procedure is repeated but beginning from the end, obtaining 2N/n boxes.
A least square line is fitted to each box, representing the trend in each box, thus obtaining y n (t). Finally the Root Mean Square Fluctuation (RMSF) is calculated using the formula This computation is repeated over all box sizes to characterize a relationship between the box size n and F(n). A linear relationship between the F(n) and n (i.e., box size) in a log-log plot reveals that the fluctuations can be characterized by a scaling exponent H, the slope of the line relating log F(n) to log n. This generates the mathematical (power-law) relation: Next we discuss the Diffusion Entropy Analysis (DEA).

Diffusion Entropy Analysis (DEA)
The DEA can be used to analyze and detect the scaling properties of low and high frequency time series.
A function Φ(r 1 , r 2 , ...) is said to be invariant to scale changes if it fulfills the property: This equation shows that if we scale all coordinates r with an appropriate choice of exponents a, b, c, ..., then we always recover the original function. In the case of a time series we can interpret the sequence of the numbers that form it as the generators of a diffusion process. Thus, we study the relevant probability distribution function ρ(x, t) where x denotes the variable that collects the fluctuations of the diffusion process over time span t. If the time series is stationary, the scale property takes the shape where the δ is the scaling exponent.
To determine the scaling exponent of the DEA, first transform the series into a diffusion process and calculate its Shannon's entropy.
Consider the equation Suppose that ρ(x, t) satisfies the scale condition (16), replacing it in the (17) we obtain: Please see proof in Appendix A. Equation (18) describes the fact that entropy grows linearly with ln(t) and the slope of the linear function is the scaling exponent δ.
Let us now see how we generate the diffusion process for a sequence of M numbers: The purpose of the DEA algorithm is to establish the possible existence of scalability in an efficient way without altering the series with any form of detrending. We do the following: 1. Select an integer l such that 1 ≤ l ≤ M. 2. For each time, find M − l + 1 sub-series of length l defined such that with s = 0, ..., M − l. 3. For each sub-series, construct a distribution diffusion path by the position 4. To calculate the Shannon entropy of the diffusion process, partition the x − axis into size η(l) cells and tell how many parts there are in each of them at a time l. Let us call this number N i (l). 5. With N(l), we determine the probability p i (l) that a particle is found in the i-th cell at time l.
6. The entropy of the diffusion process at time l is given by The sub-index d denotes that the entropy evaluation was generated from a discrete process. The reader should refer to [7,[26][27][28] for more details.

Background of Data
In this subsection, we examine data from two different fields namely Financial Markets and Volcanic Eruptions and their stationary behavior.

Financial Market Data
The financial market data used for the analysis in this paper was obtained from YAHOO FINANCE. All data points collected are daily close values. Below are the names of countries or cities where data was collected as well as the respective start and end dates of data collection: Brazil  [16] and recently used in [7]. The price evolution of the financial market time series are presented in Figures 2-6.

Geophysical Time Series Data
The Bezymianny Volcano Campaign Seismic Network (PIRE) collected the volcanic data at different eruption times at two different seismic stations, namely BEZB and BELO. Data used in this paper were requested for 10 days before and 5 days after the published time of the volcanic eruptions. Volcanic eruptions 1 and 2 were from BEZB and Volcanic eruptions 3-8 were from BELO. Please see [24] for more details on the geophysical time series used in this study. The plots of the volcanic eruptions time series are presented in Figures 7 and 8.

Stationarity Test of Data
We use the Augmented Dickey-Fuller (ADF) test to examine the stationarity of both the returns of the financial market data and volcanic data. The returns of the financial market data is calculated as: where X t is the current market closing value and X t−1 is the previous market closing value.

Augmented Dickey-Fuller (ADF)
The ADF statistic tests the null hypothesis that the time series has a unit root against the alternative that it is stationary (or has no unit root) with the assumption that the data exhibits an Auto-Regressive Moving Average (ARMA) structure.
The value of the ADF test statistic is computed as As this test is asymmetrical, we are only concerned with negative values when it comes to the test statistic. If the calculated test statistic, ADF τ is less (more negative) than the critical value, the null hypothesis is rejected and we conclude that no unit root is present and vice versa. Based on the values obtained in Tables 1 and 2, at 95% level, the null hypothesis of a unit root is rejected because the ADF τ test statistics of most data points is more negative than the critical value of −2.86 from the critical values for Dickey-Fuller t-distribution [29]. We further confirm this conclusion using the p-values at a significant level of α = 5%. All p-values of both the returns of the financial market data and the volcanic eruption data are less than the significance level (0.05).
We reject the null hypothesis that the time series has a unit root and conclude that both the returns of financial market data and the data from different eruption times of the volcano are stationary.

Results
In this section, we present numerical results obtained from applying all 3 models to the data. From our numerical results we propose a mathematical relationship between the self-similar models and the Lévy model. We also present an analytical proof of the numerically derived relationship.

Numerical Results
Below are tables for both the financial markets data and volcanic eruption data. There are six (6) columns in each table where the first column indicates the particular financial market or volcanic eruption numbers, the second -fourth columns show the scaling exponents of the DFA and the DEA as well as the best Lévy parameter α characterizing the data. The last three columns are basically products of the respective scaling exponents of the self-similar models H, δ and the Lévy parameter α characterizing the data.

Remarks on the Tables of Numerical Results
Empirical evidence presented in Tables 3 and 4 show that the product of respective scaling exponents of the DFA and Lévy as well as DEA and Lévy approximately equal 1. This suggests that there exist an inverse relationship between the DEA parameter δ and the Lévy parameter α i.e.: Also, an inverse relationship exists between the DFA parameter H and the resulting Lévy parameter α i.e.:

Analytical Relations
In this section, we prove analytically the numerical relations obtained from the previous subsection.

Property 1 (Stable distributions)
. Given a random variable X, if we denote with Law(X) its probability density function (for example, for a Gaussian random variable, we write Law(X) = N(µ, σ 2 )) then we will say that the random variable X is stable, or that it has a stable distribution if for any n ≥ 2 there exists a positive number C n and a number D n so that: where X 1 , X 2 , ..., X n are independent random copies of X, this means that Law(X i ) = Law(X) for i = 1, 2, ..., n. If D n = 0, then X is said to be a strictly stable variable. It can be shown (see Samorodnitsky and Taqqu (1994)) that for some parameter 0 < α ≤ 2.
Equation (27) can be rewritten as

Detrended Fluctuation Analysis (DFA)
From (14), we obtain a mathematical relation that reveals a linear relationship between the root mean square fluctuation F(n) and the box size n in a log-log plot. i.e., log F(n) = log K + H log(n) (29) where K is a positive constant of proportionality.

Diffusion Entropy Analysis (DEA)
From the probability density function (pdf) in (16), one can calculate the Shannon entropy [2,23], Suppose the pdf ρ(x, t) satisfies (16), then after a few simple steps (see appendix for proof) [23], we obtain the linear-log relation where Equation (33) becomes From property 1, for some positive number C n , subtracting (34) and (28) gives

Discussion
The three techniques described in Section 2 were used to estimate the scaling exponents of the financial and geophysical time series. Tables 3 and 4 summarizes the results of each technique applied to the real-world data. Figures A1-A18 in the appendix provide a graphical summary of results from techniques used in this paper. The results confirm an inverse relationship between the self-similar parameters (H, and δ) and the Lévy flight parameter. We also observe the existence of long-range persistence in the financial and geophysical time series which confirms seasonal or irregular occurrence of real-world events such as stock market crushes and volcanoes of the past. They are helpful in the forecasting of such events using past and recent information.
Having proved the existence of an inverse relationship between the Lévy parameter and the scaling parameters of the DFA and DEA, in the event that the scaling exponent of either of the parameter estimators is not known or expensive to estimate, we are able to approximate it using the relationship generated in this study. This is because data keeps getting bigger, making the measurements and collections of big data more expensive and time-consuming.
In future work, we seek to investigate whether some of the scaling methods significantly outperform others using real-world time series with removed components such as trends, seasonality and irregularities (noise). This experiment is essential to undertake partly due to complications in measurement and collection of real-world data especially in fast-paced industries such as the financial sector.

Conclusions
In this study, we compare and quantify the scaling parameters depicting long-range persistence behavior of a set of financial and geophysical time series using the DFA and DEA techniques. We also characterize the respective time series with Lévy process (with stable distributions) to obtain the best Lévy flight parameter. Both the financial and the geophysical time series exhibit long-range correlations since 0.5 < H, δ < 1. Empirical evidence from results suggest an inverse relationship between the DFA parameter H and the resulting Lévy parameter α. Similarly, an inverse relationship exists between the DEA parameter δ and the Lévy parameter α.
Finally, we present proofs to verify these mathematical relationships. However, one has to note that the choice of the α parameter for the Lévy processes means they are stochastic. They are influenced by the respective time variables, T = 1, 4, 8, 16. The appropriate Lévy parameter is selected at appropriate time periods. Another limitation of this study is that, we adjust the values of A, the arbitrary scale parameter l and the characteristic exponent α of the Lévy flight model in the numerical simulations to get the best fit of the cumulative distribution function of the Lévy process. It is also worth noting that because we standardized the Lévy model we should only expect an approximate inverse relationship between the self-similar parameters (H, δ) and the Lévy parameter (α).

Appendix B
Plots obtained from the numerical simulation of the various financial and geophysical time series data are shown in Figures A1-A18 in this appendix.
• BLUE points depict the Normalized Data