Abstract
Time irreversibility, i.e., the lack of invariance of the statistical properties of a system under time reversal, is a fundamental property of all systems operating out of equilibrium. Time reversal symmetry is associated with important statistical and physical properties and is related to the predictability of the system generating the time series. Over the past fifteen years, various methods to quantify time irreversibility in time series have been proposed, but these can be computationally expensive. Here, we propose a new method, based on permutation entropy, which is essentially parameter-free, temporally local, yields straightforward statistical tests, and has fast convergence properties. We apply this method to the study of financial time series, showing that stocks and indices present a rich irreversibility dynamics. We illustrate the comparative methodological advantages of our method with respect to a recently proposed method based on visibility graphs, and discuss the implications of our results for financial data analysis and interpretation.
Keywords: time irreversibility, permutation entropy, visibility graphs, efficient market hypothesis
1. Introduction
Time irreversibility is the lack of invariance of the statistical properties of a signal under the operation of time reversal. In other words, consider a time series describing the evolution of a system, with and its time reversal, i.e., the time series that would have been obtained had the system evolved in the opposite direction, or . Irreversibility means that it is possible to find a characteristic that differs in the forward and backward versions, i.e., a function f calculated over the two time series such that ; in other words, the observer can distinguish the forward, from the backward version of a given process. Note that the above definition does not impose any restriction on f.
Irreversibility can be due to the presence of memory, which acts as a hidden dissipative external force in a process [1] while the presence of noise results in a loss of irreversibility [2]. Thus, estimating the degree of irreversibility of a time series implicitly quantifies the degree of nonlinear dependences (memory), and, therefore, the degree of time series predictability. Importantly, since linear Gaussian random processes and static nonlinear transformations of such processes are reversible, significant time irreversibility excludes Gaussian linear processes as models for the generating dynamics, implying instead nonlinear dynamics, non-Gaussian (linear or nonlinear), or linear autoregressive moving average (ARMA) models as possible generative processes [3,4,5].
The mere statistics of observed time series allows extracting information on the physics of the system under study. In particular, time reversal asymmetry provides information about the entropy production of the physical mechanism generating the series, even when the details of the underlying generating system are unknown [6]. Various methods to quantify time reversibility have been proposed [7,8,9,10,11] and applied to the study of both biological [12,13] and financial systems [2,14,15,16,17,18,19,20,21].
Here, we introduce a new method, based on permutation entropy [22,23], to evaluate irreversibility of time series at various temporal scales. With respect to existing methods, the proposed one presents various advantages: (1) it has no free parameters other than the embedding dimension of the permutation entropy; (2) similar to visibility graph methods [9], it is temporally local, and therefore allows assessing fluctuations; (3) assessing significance is straightforward, and does not rely on scaling arguments as in visibility graph methods; and (4) it has a convergence speed advantage over visibility graph methods.
We first illustrate our method by evaluating the time irreversibility of a set of simple dynamical models, including stochastic models and chaotic dynamical systems, for which such property has theoretically been studied. We further show how the proposed approach can help elucidate the complex irreversibility dynamics of financial time series, representing 30 major European stocks and 12 world indices.
The time-reversal properties of financial time series allow testing the so-called efficient market hypothesis (EMH) [20]. The EMH asserts that financial markets are efficient with respect to an information set, i.e., that stocks incorporate all publicly available information useful in evaluating their prices and no single market agent can consistently outperform the market with information based trading [24]. Importantly, efficiency is related to the amount of information available to predict future market prices, with lower efficiency corresponding to higher residual predictive information in the past sequence of stock prices [25]. The stringency of EMH’s requirements suggests that no real market can ever be efficient stricto sensu [26] and that EMH should not be approached as an all-or-nothing property [27]. Various empirical studies have then undertaken to quantify the extent to which the EMH holds and, as a result to identify the sort of process governing market behaviour [27,28,29,30]. While financial series have been found to generally be time irreversible [2,14,20,31], it is possible to discriminate different degrees of such property. For instance, some stocks have been found to be more irreversible than others [11]. Likewise, emerging markets have been shown to be more time irreversible than developed ones, lending support to the relationship between efficiency and irreversibility [32].
We show that stocks’ and indices’ time series present a rich dynamics in terms of irreversibility. Specifically, while some time series may globally be reversible, they can become irreversible at specific temporal resolutions, i.e., when windows of specific length are considered. Additionally, such irreversibility may appear in a temporal localised way, suggesting that the dynamics of the element was somehow perturbed at that time.
The remainder of the paper is organised as follows. Firstly, the proposed method is described in Section 2; we also include a brief overview of the visibility graph (Section 2.3) and of the Markov chain (Section 2.4) approaches, as they are used to benchmark our solution. We then validate the permutation patterns’ method in synthetic (Section 3) and financial (Section 4) time series. Some conclusions are finally drawn in Section 5.
2. Assessing Time Series Reversibility
2.1. Permutation Patterns
The idea of analysing the permutation patterns present in a time series was initially introduced by Bandt and Pompe [22] to provide researchers with a simple and efficient tool to characterise the complexity of the dynamics of real systems. With respect to other approaches, as entropies, fractal dimensions, or Lyapunov exponents, it presents the advantage of being independent from any arbitrary thresholds or binning procedures [23]. For the sake of completeness, we here briefly review the process of calculating these permutation patterns.
Given a time series , with , this is usually divided in overlapping regions of length D, such that:
| (1) |
D is called the embedding dimension, and controls the quantity of information included in each region, while is the embedding delay. s further controls the beginning of each region, and thus the degree of overlap between regions. Without loss of generality, in the following, we consider and .
The second step involves associating an ordinal pattern to each region. Values are sorted in increasing order, and the ordinal pattern corresponding to the required permutation is saved for further analysis. In other words, the permutation of is defined to fulfil:
| (2) |
To illustrate, suppose a time series . As , the first region would include the values , and the order required for sorting them is —that is, the second value is the smallest, followed by the first and by the last. Similarly, the second region is associated with the pattern ; and the third region with .
2.2. Time Reversibility of Permutation Patterns
After estimating all the permutation patterns in a time series, we analyse their frequency of appearance, taking into account a time reversal process.
The total number of permutation patterns that may appear is given by . These patterns can be paired together, such that each pattern composing a pair is the time reversal of the other. For instance, for , six patterns are generated, which can pairwise be related as:
| (3) |
| (4) |
| (5) |
with representing a time reversal transformation.
To clarify this idea, let us consider the simple example of a time series resembling a sawtooth, . The series is stationary, as the average oscillates around , and five permutation patterns of side can be extracted: , , , and . It can be observed that the system has non-trivial dynamics, as it always increments in two consecutive steps at a time—hence, the upward pattern . Let us now consider the time reversed series, i.e., the same series observed from the end to the beginning: . The new (time reversed) permutation patterns are , , , and . As it should be expected, the new time series can only diminish through the permutation pattern—which is, of course, the time reversal equivalent of . Note that this allows us to conclude that the time series X is irreversible. Specifically, let us suppose that we observe a realisation of X with two consecutive increasing values, i.e., ; as this can only appear in the original time series, and not in the time reversed one, we can then be certain about the time directionality. In a similar fashion, if we observe the pattern , we can conclude that we are observing the time reversed series.
This can further be generalised: a time series will be reversible if and only if all permutation patterns composing the previous pairs appear with approximatively the same frequency. In the previous example, we can observe that the probability of and in the original time series are different—respectively, and . Once again, X is then expected to be irreversible. This idea constitutes the basis of the reversibility statistical test described below.
The value of has here been chosen for the sake of clarity. While in principle larger values of D may yield a richer description of the dynamics, this also results in the need of longer time series to reach statistically significant results—both topics will be further discussed in the conclusions.
The previously defined pattern pairs and their frequency of appearance can be analysed in two ways: in terms of the magnitude of the irreversibility, through the Kullback–Leibler divergence [33], and in terms of its statistical significance, through a binomial test.
The irreversibility magnitude can be quantified by comparing two probability distributions, one represented by the probability of all patterns appearing in the direct (or original) time series, and a second one with the probabilities for the time-reversed time series. Following the previous example for , the first distribution is composed of the frequencies of patterns . As for the second distribution, it can be calculated by actually reversing the time series, or more simply by using the previous time reversal transformations—i.e., by considering the distribution . The difference between both distributions can then be estimated through the Kullback–Leibler divergence:
| (6) |
If the time series is perfectly reversible, the probabilities associated to patterns forming a pair should be the same, thus yielding a . On the other hand, the higher the value of , the more irreversible the time series is. Note that is not the only possibility for comparing the two distributions, being the Jensen–Shannon divergence a good alternative [34]. While the latter presents the advantage of being symmetric, the former is commonly used in statistical physics [9,35]. Additionally, it has to be noted that Equation (6) diverges when one or more permutation patterns are forbidden, i.e., their frequency is zero. This may happen when the time series under analysis is trivially irreversible, and possibly non-stationary. This is for instance the case of the ramp function previously described; when in Equation (6), the argument of the logarithm becomes , and thus . While this clearly indicates that the time series is (infinitely) irreversible, the divergence of may make subsequent calculations more complicated. This can easily be solved by adding a very small value to all probabilities, i.e.,
| (7) |
such that and . This situation is nevertheless seldom encountered in real time series, provided their length is large enough.
If the Kullback–Leibler divergence tells us the magnitude of the irreversibility of a time series, it yields little information about the statistical significance of the value. This problem can be solved by levering on the binomial nature of the patterns composing a pair. Specifically, if the time series is reversible, the number of times the two permutation patterns forming a pair appear should not statistically be different. Following the previous example, let us denote by and , respectively, the number of times the patterns and have appeared; and let us define:
| (8) |
The time series is not reversible if we can reject the null hypothesis that in a two-sided binomial test. Note that the test should be repeated for all pairs of permutation patterns—three times in the case of .
One final discussion should here be added on the relationship between irreversibility and stationarity, and how such relationship affects the proposed methodology. On the one hand, it is intuitive that a non-stationary process must also be irreversible—as a net change from state a to state b necessarily implies a time direction. Time irreversibility has therefore normally been assessed only in the presence of stationarity. On the other hand, it has recently been proposed that reversibility can be assessed even in non-stationary systems, by moving from a qualitative to a quantitative metric [35]. In the case of the methodology here proposed, the degree of irreversibility of a time series can be assessed by the magnitude of (or of a Jensen–Shannon divergence), provided no permutation pattern is forbidden, i.e., for all i. This quantitative aspect will be further explored in Section 4.
2.3. Directed Horizontal Visibility Graphs
One of the most recent and efficient ways of assessing the irreversibility of a time series is through the so-called directed Horizontal Visibility Graphs (dHVG). In what follows, this method is used for benchmark purposes, and, for the sake of completeness, is here briefly introduced.
From a general point of view, dHVG belong to a family of methods that map a time series into nodes of a network, based on geometric criteria [36,37]. In all of these methods, a complex network [38] is created, whose nodes correspond to the individual data of the time series; pairs of nodes are then connected when they fulfil some geometrical rule, usually based on whether one value can “see” the other one. In the specific case of dHVG, two nodes are connected if the line connecting both values is not obstructed by another intermediate point [37]. Mathematically, given two nodes i and j, a link is created if:
| (9) |
being the element of the time series mapped into node i.
The resulting network can then be analysed using the wide set of tools provided by complex networks theory [39]. Of relevance for this work, the irreversibility of a time series can be assessed by comparing the distributions of in- and out-degrees (i.e., respectively the number of links arriving to and departing from a given node), and by calculating a Kullback–Leibler divergence [9,11]. Note that the in-degree of a node becomes its out-degree under a time reversal transformation. Therefore, for reversibility to holds both distributions ought to be equal, and the corresponding Kullback–Leibler divergence should converge to zero. For more details on the dHVG approach and the assessment of irreversibility, we refer the reader to the following studies [9,11,37].
2.4. Markov Chain Approach
We finally consider a classical method for detecting time series irreversibility, based on the representation of the underlying system as a Markov chain. In the case of a Markov chain with a transition matrix and steady-state distributions , time symmetry implies ; a time series is then reversible if and only if , for all is and [40]. We use this property to construct a simple test, which requires: (i) binning the elements of the original time series into a set of bins (note that the number of bins is a parameter of the method); (ii) calculate the transition matrix ; and (iii) perform a binomial statistical test on each pair , with , to test the hypothesis that .
3. Validation with Synthetic Time Series
We validate the permutation patterns approach to irreversibility assessment, and compare it with the visibility graph one, through the application to a set of synthetic time series whose reversible or irreversible nature has already been studied theoretically. These are:
Two reversible stochastic processes, namely a time series of values drawn from a Gaussian distribution , and an Ornstein–Uhlenbeck process, a mean-reverting linear Gaussian process T [41].
Two dissipative chaotic maps, respectively, a logistic map (defined as , with ) and a Henon map (, , with and ). Dissipative systems are by definition irreversible [42].
The Arnold Cat map, and example of a conservative chaotic map (. The analysed time series corresponds to the evolution of the x variable.
The Lorenz chaotic system, defined as , , and (with , and , integration step of ). Unless otherwise stated, the analysed time series corresponds to the evolution of the x variable.
Time series generated through an Autoregressive Conditional Heteroskedasticity (ARCH) model [43] defined as , with and being independent random numbers drawn from an uniform distribution . Note that is a parameter controlling the strength of the time dependence between present and past values of x, and hence its irreversibility.
Time series generated through a Generalised Autoregressive Conditional Heteroskedasticity (GARCH) model [44] defined as , with and being independent random numbers drawn from an uniform distribution . Note that the difference with respect to the ARCH model resides in the fact that here depends directly on its past. As in the previous case, is controlling the time irreversibility of the model.
For each of them, Figure 1 reports: (i) the average divergence yielded by the permutation patterns (blue line and one standard deviation band) and the visibility graph (black line and band) approaches; and (ii) the fraction of times the time series is detected as irreversible by the permutation patterns approach in a statistical significant way (red dotted line, right Y axis, significance ). The irreversibility of the time series created by the ARCH and GARCH models is reported in Figure 2, as a function of the parameter . The two examples of stochastic processes and the Arnold map are recognised as irreversible in less than of the realisations—as expected from the choice of a statistical significance level of . On the other hand, the irreversibility frequency rapidly converges to one for the two dissipative chaotic maps, which are known to be irreversible [42]. Intermediate results can be observed in the case of the ARCH and GARCH models, for which a robust irreversibility is detected in the case of long time series and high values of . Finally, a special situation can be observed for the Lorenz system: while its time series are mostly irreversible at short temporal scales, they become highly reversible when sufficiently long time windows are considered. To understand if such behaviour is a general property of the system, Figure 3 (Left) reports the evolution of the irreversibility as a function of time series length, for the three channels of the Lorenz system. While the X and Y channels have a similar dynamics, the Z one is substantially different: first it is completely irreversible over long time scales, and second, the evolution of the irreversibility is not monotonic, with a minimum around 70 and a peak every 60 time points. This abnormal behaviour for the Z time series is possibly due to its dynamics, which is well known to differ from those of the X and Y channels in terms of Lyapunov exponent [45] and autocorrelation (see Figure 3, Right).
Figure 1.
Irreversibility analysis of several synthetic dynamical models, as a function of the time series length. From left to right, top to bottom, the six panels represent Gaussian noise, an Ornstein–Uhlenbeck process, logistic, Henon and Arnold maps, and a Lorenz oscillator—see main text for details and parameters. In the left Y axis, the blue solid and black dashed lines, respectively, represent the average Kullback–Leibler divergence obtained by the permutation patterns and the visibility graph approach—note the blue and grey bands, depicting one standard deviation. On the right Y axis, the dotted red line indicates the fraction of simulations in which the time series is irreversible in a statistical significant way, with .
Figure 2.
Irreversibility of time series generated by: ARCH model (Left); and GARCH model (Right). Each line indicates the fraction of simulations in which the time series is irreversible in a statistical significant way, with , as a function of the time series length and of the value of (see main text for definitions).
Figure 3.
(Left) Fraction of irreversible time series yielded by a Lorenz chaotic system, as a function of the time series length, where black (dashed), blue (solid) and red (dash-dot) lines correspond respectively to the X, Y and Z channels of the system; and (Right) autocorrelation of the same three time series.
Figure 1 further suggests that the permutation patterns approach to irreversibility can be more sensitive than the visibility graph one—note that the blue lines usually have a steeper slope, and converge faster than the black ones. Figure 4 depicts the fraction of times the three considered methods detect that the underlying time series is irreversible in a statistical significant way (), for very short time series lengths and for the two systems that were detected as irreversible (i.e., respectively, the Logistic and Henon maps). Note that, to calculate the statistical significance of the divergence yielded by the visibility graph approach, this has been compared with the ones obtained from randomly shuffled versions of the time series, and the probability of finding a larger in the random realisations expressed as a p-value. Figure 4 indicates that the permutation pattern approach requires shorter time series to reach a consistent output, something that is particularly conspicuous in the case of the Henon map. Additionally, these results highlight the benefit associated to parameter-free methods. Specifically, the Markov chain method has been tested with two different numbers of bins, respectively 4 (green dotted lines) and 8 (grey dotted lines), yielding different results depending on the underlying dynamics. The fact that the proposed methodology required no parameter estimation or tuning thus becomes an important practical advantage.
Figure 4.
Analysis of the time series length required to reach a consistent irreversibility assessment. Both panels depict the fraction of times the permutation patterns (blue solid lines), the visibility graph algorithms (black dashed lines) and the Markov chain method (dotted lines) detect a statistically significant irreversibility, as a function of the time series length: (Left) logistic map; and (Right) Henon map.
Finally, Figure 5 explores the resilience of the proposed method with respect to the presence of noise. Specifically, we consider the previously described logistic map, and added a Gaussian noise:
| (10) |
with and being independent random numbers drawn from a Gaussian distribution . Note that noise is inherently reversible, and therefore its presence is expected to mask the irreversibility of the logistic map. We then measure the minimum time series length that allows to detect the irreversibility of the system the of the times, and plot this as a function of the noise level . The two solid lines in Figure 5 report the results, and indicate that the permutation patterns approach is more resilient than the visibility graph one.
Figure 5.
Resilience to noise. The two solid lines (left Y axis) depict the evolution of the time series length required to reach a detection of irreversibility for the logistic map, according to the permutation patterns approach (black) and the visibility graph one (blue), as a function of the level noise. The dashed line (right Y axis) indicates the fraction of times the visibility graph method is detecting an irreversibility, when the permutation patterns method has reached a .
Taken together, the numerical experiments carried out on synthetic time series indicate that the permutation patterns approach is comparable to the visibility graph one in assessing irreversibility. The former is nevertheless more sensitive, as it relies more on local patterns (of dimension D), and more resilient to noise, thus more suitable for the analysis of short time series. We take advantage of this in Section 4 by analysing the temporal evolution of the irreversibility of real time series. Finally, the local nature of the permutation patterns approach makes it extremely computationally efficient—with a computational cost that scales linearly with the number of data points, as opposed to the quadratic growth of the visibility graph approach.
4. Application to Financial Time Series
To further validate the proposed methodology, we assess the irreversibility of several financial time series. These can be thought of as relatively short realisations of complex stochastic processes whose dynamics is richer than most of the generated time series, and their characteristics (including reversibility) can change over time. Dynamical repertoire richness and time series shortness are two desirable aspects from a validation view-point. As previously introduced, if financial time series were shown to be irreversible, i.e., if some permutation patterns were favoured over their corresponding time-reversed counterparts, this would disprove the efficient market hypothesis (EMH) [20], as the asymmetry would be associated with information with which to improve the prediction of future prices.
We consider two sets of time series representing the daily evolution of, on the one hand, the Top-30 European stocks by capitalisation; and, on the other hand, of 12 representative world stock market indices. Table 1 and Table 2 report the two full lists, along with some basic characteristics. Both sets of time series have been obtained through Yahoo Finance, and include data from 1 January 2008 to 1 January 2018—note that the actual number of data points may differ, e.g., due to local bank holidays. To ensure the stationarity of all time series, the original values have been transformed to . The resulting series have been tested through an Augmented Dickey–Fuller unit root test [46], and for all of them the presence of a unit root was rejected in a statistically significant way (the larger p-value being for the BNP.PA stock).
Table 1.
List of the 30 considered stocks.
| Stock Code | Name | Country | Capitalisation |
|---|---|---|---|
| ABI.BR | Anheuser Busch Inbev NV | Belgium | 182.039 B€ |
| AI.PA | Air Liquide | France | 46.635 B€ |
| AIR.PA | Airbus SE | France | 72.22 B€ |
| ALV.DE | Allianz SE | Germany | 91.67 B€ |
| ASML.AS | ASML Holding N.V. | Netherlands | 71.596 B€ |
| BAYN.DE | Bayer AG | Germany | 87.425 B€ |
| BBVA.MC | Banco Bilbao Vizcaya Argentaria, S.A. | Spain | 49.919 B€ |
| BMW.DE | Bayerische Motoren Werke AG | Germany | 62.545 B€ |
| BN.PA | Danone SA | France | 44.386 B€ |
| BNP.PA | BNP Paribas SA | France | 84.307 B€ |
| CA.PA | Carrefour SA | France | 14.13 B€ |
| DBK.DE | Deutsche Bank AG | Germany | 32.651 B€ |
| DPW.DE | Deutsche Post AG | Germany | 48.763 B€ |
| DTE.DE | Deutsche Telekom AG | Germany | 69.937 B€ |
| EI.PA | Essilor International SA | France | 24.22 B€ |
| ENEL.MI | Enel SpA | Italy | 53.528 B€ |
| ENGI.PA | ENGIE SA | France | 34.648 B€ |
| ENI.MI | Eni S.p.A. | Italy | 53.801 B€ |
| FRE.DE | Fresenius SE & Co. KGaA | Germany | 37.235 B€ |
| G.MI | Assicurazioni Generali S.p.A. | Italy | 25.281 B€ |
| IBE.MC | Iberdrola, S.A. | Spain | 42.207 B€ |
| INGA.AS | ING Groep N.V. | Netherlands | 64.689 B€ |
| ITX.MC | Industria de Diseño Textil, S.A. | Spain | 89.425 B€ |
| MC.PA | LVMH Moët Hennessy Louis Vuitton S.E. | France | 121.994 B€ |
| OR.PA | L’Oréal S.A. | France | 102.244 B€ |
| ORA.PA | Orange S.A. | France | 39.275 B€ |
| PHIA.AS | Koninklijke Philips N.V. | Netherlands | 31.07 B€ |
| SAF.PA | Safran SA | France | 37.748 B€ |
| SAN.PA | Sanofi SA | France | 87.918 B€ |
| SU.PA | Schneider Electric S.E. | France | 42.25 B€ |
Table 2.
List of the 12 considered market indices.
| Index Code | Name | Country |
|---|---|---|
| BVSP | IBOVESPA | Brasil |
| DJI | Dow Jones Industrial Average | USA |
| FCHI | CAC 40 | France |
| GDAXI | DAX | Germany |
| GSPC | S&P 500 | USA |
| HSI | Hang Seng Index | Hong Kong |
| IXIC | NASDAQ Composite | USA |
| MERV | MERVAL Buenos Aires | Argentina |
| MXX | IPC Mexico | Mexico |
| N100 | EURONEXT 100 | Europe |
| N225 | Nikkei 225 | Japan |
| STOXX50E | EURO STOXX 50 | Europe |
Each time series was analysed in three different ways. The first one entails estimating global irreversibility, i.e., taking into account the whole time series. This corresponds to the irreversibility of the system, under the assumption that such property is stationary, or to the assessment of the average irreversibility. Three stocks and four indices resulted irreversible: BBVA.MC, ENEL.MI, and G.MI; and DJI, GDAXI, GSPC and IXIC, respectively. This indicates that markets have preferred ways (or patterns) when rallying up- or downwards, and are therefore strictly not efficient. It is also interesting to observe that irreversibility is more frequent in indices (four out of twelve) than in individual stocks; this may suggest that irreversibility is a collective (or emergent) phenomenon, which is difficult to see in the dynamics of individual elements, but shows up when considering groups of them.
Even when the complete time series is reversible, it is possible to find shorter sub-windows which are not reversible in a statistically significant way. Thus, it may happen that time series are globally reversible, but locally irreversible. We explore this possibility in a second analysis, in which we extract all possible sub-windows of a given length from each time series, and calculate their average irreversibility. Note that this allows estimating irreversibility as a function of the time window length, and thus the relationship between irreversibility and time scales. In other words, this second approach enables to study the local vs. global nature of irreversibility. Results of this analysis, in terms of the fraction of windows yielding a statistically significant irreversibility () as a function of the window length, are presented in Figure 6 and Figure 7. Three general ideas can be drawn from these results. First, many time series that are globally reversible display noisy results, with very low irreversibility probabilities, and usually around or below the significance threshold. Secondly, those time series that are globally irreversible gain such properties at relatively long time scales—the evolution of the fraction of irreversible windows constantly increases with the window size. Specifically, when the average irreversibility of each time series is calculated for window lengths comprised between and ), the resulting correlation coefficient is of for the 30 stocks and of for the 12 indices. This seems to indicate that the time series are highly noisy, and therefore that long time windows are required to reach a stable result—as previously shown in Figure 5. Finally, some time series, which are globally reversible, can contain irreversible windows with a significant probability; it thus seem that, for those time series, irreversibility is a property confined to some specific time scales. This is the case, for instance, of BAYN.DE (maximum of for lengths of 225) or CA.PA ( at 575).
Figure 6.
Reversibility of the 30 biggest European stocks by capitalization. The solid line of each panel depicts the fraction of windows in which the absence of reversibility was statistically significant (, Y axes), as a function of the window size in days (X axes). The horizontal dashed line represents the significance level of . An asterisk in the top right corner of a panel indicates that the stock is reversible when considering the whole time series.
Figure 7.
Reversibility of 12 market indices. The solid line of each panel depicts the fraction of windows in which the absence of reversibility was statistically significant (, Y axes), as a function of the window size in days (X axes). The meaning of the horizontal dashed lines and of the asterisks is the same as in Figure 6.
Given that irreversibility is, in many cases, a localised effect, we finally checked whether different stocks present a synchronised dynamics, i.e., if different stocks tend to become irreversible at the same time. Figure 8 presents a time map of the irreversibility of the 30 analysed stocks, when considering windows of 200 data points. While irreversibility seems to be slightly more probable at the end of the considered period, deviations from the expected value are not enough to support the hypothesis of synchronous dynamics.
Figure 8.
Analysis of the synchronicity between irreversible windows: (Top) the time intervals when each stock time series is detected as irreversible, using windows of 200 data points; and (Bottom) the evolution of the number of stocks that were irreversible at the same time. The dashed red line represents the expected number of irreversible stocks under the assumption of independence.
5. Discussion and Conclusions
We proposed a new method to quantify irreversibility in time series based on permutation entropy. We tested our method on synthetic time series from various processes with known irreversibility properties and on financial time series of stock prices and indices. For synthetic time series, the results from our method are consistent with known irreversibility properties of the respective time series. Remarkably, particularly for the Lorenz system, the method could detect non-trivial irreversibility dynamics. Our results also show that, while most financial time series are globally reversible, the proposed method highlighted an interesting dynamics, with time windows in which the dynamics was significantly irreversible. While the results from the permutation entropy-base method were in line with those obtained with the dHVG-based method (see Figure 9), the former method compared favourably in terms of convergence speed, indicating that it can be more suitable for relatively short time series. Additionally, the proposed method is able to better handle singular situations, provided the modified version of Equation (7) is used. For instance, it is able to detect the extreme irreversibility of a ramp function; on the contrary, for such time series, the dHVG-based method yields regular networks with a constant degree of 1, as in both directions each value can only “see” the following one, thus returning a of zero and wrongly suggesting a perfect reversibility.
Figure 9.
Analysis of the similarity of the irreversibility, as yielded by the proposed method and by the visibility graph approach: (Left) stocks time series; and (Right) indices time series.
Our results with synthetic time series are consistent with theoretical results, indicating that the proposed method correctly identifies the underlying process. On the other hand, some results for financial time series are somehow surprising. In particular, our method returned higher irreversibility for some markets previously known to be among the most efficient ones (see Figure 7). These results were in good agreement with those obtained using dHVGs. Insofar as the presence of irreversibility may be associated with violation of the EMH, our results suggest that permutation entropy-based irreversibility and dHVGs may capture a dynamical feature that differs from standard measures of market efficiency. Further investigations will be needed to clarify the reasons for this discrepancy. Additionally, it is important to exercise caution against too literal an interpretation of financial systems’ random walk in the same thermodynamic terms (viz., friction and dissipation) as the original Langevin equation [20]. Finally, it is worth pointing out that various studies [2,20,32] have suggested that a complete picture of irreversibility in financial time series should be based on a multiscale analysis, as the relationship among scales may contain important features ultimately determining time irreversibility [20]. On the other hand, analyses at given scales, as in the present study, should be interpreted in terms of irreversibility at that particular scale.
One final note should be made on the choice of the embedding dimension D, which we set to in this study. Using higher values of D increases the richness with which the dynamics of the system is captured—see for an example [47]. In addition, it has been shown that the permutation entropy (a closely related concept) is an approximation that converges to the true entropy rate of the system in the limit of increasing embedding dimension. It is thus logical to expect a similar behaviour for the proposed measure of reversibility, which may converge to a real value for large values of D. It is nevertheless important to take into account that increasing D also comes with several disadvantages. First, obtaining reliable statistics on the appearance of the permutation patterns and reducing the influence of random fluctuations requires longer time series—as a rule of thumb, it is usually recommended to have time series of length of at least [48]. This limits the resolution of the irreversibility analysis, and precludes detecting interesting phenomena at short time scales (as shown in Figure 3). Second, although, from a theoretical point of view, nothing precludes the use of higher embedding dimensions in the methodology proposed in this study, the computational cost scales exponentially with the embedding dimension—a limitation that may become serious when analysing large datasets as in some real-time applications.
Acknowledgments
D.P. acknowledges financial support from the program Accueil de Talents of the Métropole Européenne de Lille.
Author Contributions
All authors developed the idea. M.Z. executed the numerical experiments and prepared the figures. All authors wrote and reviewed the manuscript.
Conflicts of Interest
The authors declare no conflict of interest.
References
- 1.Puglisi A., Villamaina D. Irreversible effects of memory. Europhys. Lett. 2009;88:30004. doi: 10.1209/0295-5075/88/30004. [DOI] [Google Scholar]
- 2.Xia J., Shang P., Wang J., Shi W. Classifying of financial time series based on multiscale entropy and multiscale time irreversibility. Phys. A Stat. Mech. Appl. 2014;400:151–158. doi: 10.1016/j.physa.2014.01.016. [DOI] [Google Scholar]
- 3.Lawrance A. Directionality and reversibility in time series. Int. Stat. Rev. 1991;59:67–79. doi: 10.2307/1403575. [DOI] [Google Scholar]
- 4.Stone L., Landan G., May R.M. Detecting time’s arrow: A method for identifying nonlinearity and deterministic chaos in time-series data. Proc. R. Soc. Lond. B. 1996;263:1509–1513. doi: 10.1098/rspb.1996.0220. [DOI] [Google Scholar]
- 5.Cox D.R., Hand D., Herzberg A. Foundations of Statistical Inference, Theoretical Statistics, Time Series and Stochastic Processes. Cambridge University Press; London, UK: 2005. [Google Scholar]
- 6.Roldán É., Parrondo J.M. Estimating dissipation from single stationary trajectories. Phys. Rev. Lett. 2010;105:150607. doi: 10.1103/PhysRevLett.105.150607. [DOI] [PubMed] [Google Scholar]
- 7.Daw C., Finney C., Kennel M. Symbolic approach for measuring temporal “irreversibility”. Phys. Rev. E. 2000;62:1912–1921. doi: 10.1103/PhysRevE.62.1912. [DOI] [PubMed] [Google Scholar]
- 8.Kennel M.B. Testing time symmetry in time series using data compression dictionaries. Phys. Rev. E. 2004;69:056208. doi: 10.1103/PhysRevE.69.056208. [DOI] [PubMed] [Google Scholar]
- 9.Lacasa L., Nunez A., Roldán É., Parrondo J.M., Luque B. Time series irreversibility: A visibility graph approach. Eur. Phys. J. B. 2012;85:217. doi: 10.1140/epjb/e2012-20809-8. [DOI] [Google Scholar]
- 10.Donges J.F., Donner R.V., Kurths J. Testing time series irreversibility using complex network methods. Europhys. Lett. 2013;102:10004. doi: 10.1209/0295-5075/102/10004. [DOI] [Google Scholar]
- 11.Flanagan R., Lacasa L. Irreversibility of financial time series: A graph-theoretical approach. Phys. Lett. A. 2016;380:1689–1697. doi: 10.1016/j.physleta.2016.03.011. [DOI] [Google Scholar]
- 12.Costa M., Goldberger A.L., Peng C.K. Broken asymmetry of the human heartbeat: loss of time irreversibility in aging and disease. Phys. Rev. Lett. 2005;95:198102. doi: 10.1103/PhysRevLett.95.198102. [DOI] [PubMed] [Google Scholar]
- 13.Squartini F., Arndt P.F. Quantifying the stationarity and time reversibility of the nucleotide substitution process. Mol. Biol. Evol. 2008;25:2525–2535. doi: 10.1093/molbev/msn169. [DOI] [PubMed] [Google Scholar]
- 14.Ramsey J.B., Rothman P. Time irreversibility and business cycle asymmetry. J. Money Credit Bank. 1996;28:1–21. doi: 10.2307/2077963. [DOI] [Google Scholar]
- 15.Chen Y.T., Chou R.Y., Kuan C.M. Testing time reversibility without moment restrictions. J. Econometrics. 2000;95:199–218. doi: 10.1016/S0304-4076(99)00036-6. [DOI] [Google Scholar]
- 16.Belaire-Franch J., Contreras D. Tests for time reversibility: A complementarity analysis. Econ. Lett. 2003;81:187–195. doi: 10.1016/S0165-1765(03)00169-1. [DOI] [Google Scholar]
- 17.Chen Y.T. Testing serial independence against time irreversibility. Stud. Nonlinear Dyn. Econ. 2003;7:1–30. doi: 10.2202/1558-3708.1114. [DOI] [Google Scholar]
- 18.Racine J.S., Maasoumi E. A versatile and robust metric entropy test of time-reversibility, and other hypotheses. J. Econom. 2007;138:547–567. doi: 10.1016/j.jeconom.2006.05.009. [DOI] [Google Scholar]
- 19.Sharifdoost M., Mahmoodi S., Pasha E. A statistical test for time reversibility of stationary finite state Markov chains. Appl. Math. Sci. 2009;52:2563–2574. [Google Scholar]
- 20.Zumbach G. Time reversal invariance in finance. Quant. Financ. 2009;9:505–515. doi: 10.1080/14697680802616712. [DOI] [Google Scholar]
- 21.De Sousa A.M.Y.R., Takayasu H., Takayasu M. Detection of statistical asymmetries in non-stationary sign time series: Analysis of foreign exchange data. PLoS ONE. 2017;12:e0177652. doi: 10.1371/journal.pone.0177652. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Bandt C., Pompe B. Permutation entropy: A natural complexity measure for time series. Phys. Rev. Lett. 2002;88:174102. doi: 10.1103/PhysRevLett.88.174102. [DOI] [PubMed] [Google Scholar]
- 23.Zanin M., Zunino L., Rosso O.A., Papo D. Permutation entropy and its main biomedical and econophysics applications: A review. Entropy. 2012;14:1553–1577. doi: 10.3390/e14081553. [DOI] [Google Scholar]
- 24.Fama E.F. Efficient capital markets: A review of theory and empirical work. J. Financ. 1970;25:383–417. doi: 10.2307/2325486. [DOI] [Google Scholar]
- 25.Eom C., Oh G., Jung W.S. Relationship between efficiency and predictability in stock price change. Phys. A Stat. Mech. Appl. 2008;387:5511–5517. doi: 10.1016/j.physa.2008.05.059. [DOI] [Google Scholar]
- 26.Campbell J.Y., Lo A.W.C., MacKinlay A.C. The Econometrics of Financial Markets. 2nd ed. Princeton University press; Princeton, NJ, USA: 1997. [Google Scholar]
- 27.Lim K.P. Ranking market efficiency for stock markets: A nonlinear perspective. Phys. A Stat. Mech. Appl. 2007;376:445–454. doi: 10.1016/j.physa.2006.10.013. [DOI] [Google Scholar]
- 28.Cajueiro D.O., Tabak B.M. The Hurst exponent over time: Testing the assertion that emerging markets are becoming more efficient. Phys. A Stat. Mech. Appl. 2004;336:521–537. doi: 10.1016/j.physa.2003.12.031. [DOI] [Google Scholar]
- 29.Barunik J., Kristoufek L. On Hurst exponent estimation under heavy-tailed distributions. Phys. A Stat. Mech. Appl. 2010;389:3844–3855. doi: 10.1016/j.physa.2010.05.025. [DOI] [Google Scholar]
- 30.Wang Y., Liu L., Gu R., Cao J., Wang H. Analysis of market efficiency for the Shanghai stock market over time. Phys. A: Stat. Mech. Appl. 2010;389:1635–1642. doi: 10.1016/j.physa.2009.12.039. [DOI] [Google Scholar]
- 31.Fong W.M. Time reversibility tests of volume–volatility dynamics for stock returns. Econ. Lett. 2003;81:39–45. doi: 10.1016/S0165-1765(03)00146-0. [DOI] [Google Scholar]
- 32.Jiang C., Shang P., Shi W. Multiscale multifractal time irreversibility analysis of stock markets. Phys. A Stat. Mech. Appl. 2016;462:492–507. doi: 10.1016/j.physa.2016.06.092. [DOI] [Google Scholar]
- 33.Kullback S., Leibler R.A. On information and sufficiency. Ann. Math. Stat. 1951;22:79–86. doi: 10.1214/aoms/1177729694. [DOI] [Google Scholar]
- 34.Fuglede B., Topsoe F. Jensen-Shannon divergence and Hilbert space embedding; Proceedings of the 2004 IEEE International Symposium on Information Theory; Chicago, IL, USA. 27 June–2 July 2004; p. 31. [Google Scholar]
- 35.Lacasa L., Flanagan R. Time reversibility from visibility graphs of nonstationary processes. Phys. Rev. E. 2015;92:022817. doi: 10.1103/PhysRevE.92.022817. [DOI] [PubMed] [Google Scholar]
- 36.Lacasa L., Luque B., Ballesteros F., Luque J., Nuno J.C. From time series to complex networks: The visibility graph. Proc. Nat. Acad. Sci. USA. 2008;105:4972–4975. doi: 10.1073/pnas.0709247105. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Luque B., Lacasa L., Ballesteros F., Luque J. Horizontal visibility graphs: Exact results for random time series. Phys. Rev. E. 2009;80:046103. doi: 10.1103/PhysRevE.80.046103. [DOI] [PubMed] [Google Scholar]
- 38.Strogatz S.H. Exploring complex networks. Nature. 2001;410:268–276. doi: 10.1038/35065725. [DOI] [PubMed] [Google Scholar]
- 39.Costa L.d.F., Rodrigues F.A., Travieso G., Villas Boas P.R. Characterization of complex networks: A survey of measurements. Adv. Phys. 2007;56:167–242. doi: 10.1080/00018730601170527. [DOI] [Google Scholar]
- 40.Norris J.R. Markov Chains. 2nd ed. Cambridge University Press; London, UK: 1998. [Google Scholar]
- 41.Weiss G. Time-reversibility of linear stochastic processes. J. Appl. Probab. 1975;12:831–836. doi: 10.2307/3212735. [DOI] [Google Scholar]
- 42.Mori H., Kuramoto Y. Dissipative Structures and Chaos. Springer; Berlin, Germany: 2013. [Google Scholar]
- 43.Hamilton J.D., Susmel R. Autoregressive conditional heteroskedasticity and changes in regime. J. Econom. 1994;64:307–333. doi: 10.1016/0304-4076(94)90067-1. [DOI] [Google Scholar]
- 44.Bollerslev T. Generalized autoregressive conditional heteroskedasticity. J. Econom. 1986;31:307–327. doi: 10.1016/0304-4076(86)90063-1. [DOI] [Google Scholar]
- 45.Wolf A., Swift J.B., Swinney H.L., Vastano J.A. Determining Lyapunov exponents from a time series. Phys. D Nonlinear Phenom. 1985;16:285–317. doi: 10.1016/0167-2789(85)90011-9. [DOI] [Google Scholar]
- 46.MacKinnon J.G. Approximate asymptotic distribution functions for unit-root and cointegration tests. J. Bus. Econ. Stat. 1994;12:167–176. [Google Scholar]
- 47.Bian C., Qin C., Ma Q.D., Shen Q. Modified permutation-entropy analysis of heartbeat dynamics. Phys. Rev. E. 2012;85:021906. doi: 10.1103/PhysRevE.85.021906. [DOI] [PubMed] [Google Scholar]
- 48.Amigó J.M., Zambrano S., Sanjuán M.A. True and false forbidden patterns in deterministic and random dynamics. Europhys. Lett. 2007;79:50001. doi: 10.1209/0295-5075/79/50001. [DOI] [Google Scholar]









