The lack of reversibility during financial crisis and its identification

The focus of this study to measure the varying irreversibility of stock markets. A fundamental idea of this study is that financial systems are complex and nonlinear systems that are presented to be non-Gaussian fractal and chaotic. Their complexity and different aspects of nonlinear properties, such as time irreversibility, vary over time and for a long-range of scales. Therefore, our work presents approaches to measure the complexity and irreversibility of the time series. To the presented methods we include Guzik’s index, Porta’s index, Costa’s index, based on complex networks measures, Multiscale time irreversibility index and based on permutation patterns measures. Our study presents that the corresponding measures can be used as indicators or indicator-precursors of crisis states in stock markets.


Introduction
Complex systems are open systems that exchange energy, matter, and information with the environment. Investigating complex systems in the natural sciences, Prigogine made a fundamental generalization, indicating the need for consideration of the phenomena of irreversibility and non-equilibrium as principles of selection of space-time structures that are implemented in practice [1]. Later it became clear that this generalization extends to complex systems of another nature: social, economic, biomedical, etc. [2]. Prigogine believed that the most important changes in the modern scientific revolution are related to the removal of previous restrictions in the scientific understanding of time. The nonlinear world is characterized by features of temporality, i.e., irreversibility and transience of processes and phenomena. Self-organization is considered as a spontaneous process of formation of integrating complex systems. It is due to the ambiguity of choice at bifurcation points that time in theories of self-organization becomes truly irreversible. In contrast to linear dynamic theories -classical, relativistic, quantum (where time is reversed), in the thermodynamics of dissipative structures created by Prigogine, time ceases to be a simple parameter and be-comes a concept that expresses the pace and direction of events.
Thus, the irreversibility of time is a fundamental property of non-equilibrium dissipative systems, and its loss may indicate the development of destructive processes [2,3].
Considering the statistical properties of a signal under study, its evolution could be called irreversible if there is the lack of invariance, i.e., the same signal would have been obtained if we measured it in the opposite direction. The function f could be applied to find characteristics that differ forward and backward versions, i.e., time series would be irreversible if f (X d ) f (X r ). The main idea of this definition there is no any restrictions on f .
Our study implies that a stationary process X is called statistically inverse in time if the probability distributions of the forward and backward in time systems are approximately the same [4][5][6]. The irreversibility of time series indicates the presence of nonlinear dependencies (memory) [7] in the dynamics of a system far from equilibrium, including non-Gaussian random processes and dissipative chaos. Since the definition of the irreversibility of the time series is formal, there is no a priori optimal algorithm for its quantification. Several methods for measuring the irreversibility of time have been proposed [2][3][4][8][9][10][11][12][13]. Such methods significant as their purpose to deal with signals that exclude linear Gaussian random processes and, there by, allow to quantify the degree of predictability in the system.
In the first group of methods, the symbolization of time series is performed, and then the analysis is performed by statistical comparison of the appearance of a string of symbols in the forward and reverse directions [9]. Sometimes additional compression algorithms are used [8]. An important step for this group is the symbolization -the conversion of the time series into a character series requires additional special information (e.g., division of the range or size of the alphabet) and, therefore, contains the problem of the algorithm's dependence on these additional parameters. The second problem arises when considering the large-scale invariance of complex signals. Since the procedures of typical symbolizations are local, taking into account different scales can cause some difficulties [3].
Another group of methods in formalizing the index of irreversibility does not use the symbolization procedure but is based on the use of real values of the time series or returns.
One such approaches is based on the asymmetry of the distribution of points of the Poincare map, built on the basis of the values of the analyzed time series [10,13].
Recently, a fundamentally new approach to measuring the irreversibility of time series has been proposed, which uses the methods of complex network theory [4,12] and which combines two tools: the algorithm for visibility of time series recovery into a complex network and the Kullbak-Leibler divergence algorithm [12]. The first forms a directional network according to the geometric criterion. The degree of irreversibility of the series is then estimated by the Kullbak-Leibler divergence (i.e., the resolution) between the distribution of the input and output stages of the associated count. This method is computationally efficient, does not require any special symbolization of the process, and, according to the authors, naturally takes into account multiscale.
In this study, we apply irreversibility analysis and construct indicators or indicators-precursors of crashes and critical events, which dynamics is associated with luck of irreversibility the system. To these measures we include Guzik's index, Porta's index, Costa's index, based on complex networks, multiscale time irreversibility index with measure based on ordinal patterns.
For analyzing and explaining basic characteristics of stock market with time irreversibility measures, we have chosen Dow Jones Industrial Average index (DJIA) as the most quoted financial barometer in the world. In order to have better look on its intraday dynamics, we have separated its time series into two parts: from 2 January 1920 to 3 January 1983 and second part from 4 January 1983 to 3 March 2021. Both periods of daily values have been obtained through Yahoo Finance (http://finance.yahoo.com/) and Investing.com (https://www.investing.com/).
• Critical events are those falls that, during their existence, have not had such serious changes in price as crashes. Table 1 shows the major crashes and critical events related to our classification. As it is seen from the Table, during DJIA existence, many crashes and critical events shook it. According to our classification, events with number (1,10,13,15,20) are crashes, all the rest -critical events.
The calculations of indicators for them will be carried out within the sliding window approach. According to the procedure, we emphasize the frame of a predefined length in which the calculation of the corresponding measure is obtained. For this fragment measure of irreversibility is obtained regarding normalized returns, where returns are calculated as (1) and normalized (standardized) returns as where σ ≡ G 2 − G 2 is the standard deviation of G, ∆t is the time shift (in our case ∆t = 1), and . . . is the average over studied time period.
Then, the time window is shifted along the time by a predefined value, and the procedure is repeated until the entire series is exhausted. Comparing the calculated measure of irreversibility (asymmetry) and the actual time series of DJIA, we can analyze changes of complexity in the system. Our measures can be called indicators or precursors if they behave in a definite way for all periods of crashes, for example, decreases or increases during the pre-crash or pre-critical period. For our calculations time frame with the length 500 and step 1 are seemed to be the most reasonable parameters.

Assessing financial crises throughout irreversibility analysis 2.1 Irreversible complexity measures based on Poincaré diagrams
The Poincaré diagram for the time series is a graph on the x axis of which the normalized returns for current time g(t) are plotted, and subsequent values g(t + 1) on the y axis. In Figure 1 the Poincaré diagram for the initial and shuffled series of the DJIA is shown. All consequent values that are equal to each other (g(t) = g(t + 1)) are located on the line of identity (LI). Intervals, representing increasing in returns, above LI (g(t) < g(t + 1)), whereas shortenings of two succeeding returns represent points below this line (g(t) > g(t + 1)). By assessing the asymmetry of points in the diagram, further, we will present quantitative measures for varying degree of irreversibility in the DJIA.

Guzik's index
Guzik's index (GI) was defined as the distance of points above LI to LI divided by the distance of all points in Poincaré plot except those that are located on LI [10,24]. Specifically, where a = C(P + i ) means the number of points above LI; m = C(P + i ) + C(P − i ) means the number of points in Poincaré plot except those which are not on LI; D + i is the distance of points above the line to itself, and D i is the distance of point P i (g(i), g(i + 1)) to LI which can be defined as In fugure 2 is illustrated GI for two periods of the DJIA.
As we can see from illustration above, GI for crashes and critical events noticeably falling before deviant event and rising during emerging crises, which makes it as an excellent indicator-precursor of abnormal events.

Porta's index
Porta's index (PI) [13] was defined as the number of points below LI divided by the total number of points in Poincaré plot except those that are located on LI, specifically where b = C(P − i ) is the number of points below LI, and m = C(P + i ) + C(P − i ) is the total number of points below and above LI.
In figure 3 is illustrated PI for two periods of DJIA. As we can see, according to Porta's index, irreversibility decreases during crash and critical events similarly to previous index which makes it appropriate indicator.

Costa's index
Costa's index represents a simplified version of [24] where number of increments (x(i + 1) − x(i) > 0) and decrements (x(i + 1) − x(i) < 0) are taken into account. They are presented to be symmetric if equal to each other. The procedure is implemented for coarse-grained time series. For scale τ, we consider the time series [3], which displays the asymmetry of the probability distribution of positive and negative returns, is calculated by the formula: The generelized Costa's index according to can be defined as where L is the maximal scale.
In figure 4 CI presents the similar pehavior for the two periods of DJIA as in previous two measures.

Complex network methods
Visibility graphs (VGs) are based on a simple mapping from the time series to the network domain exploiting the local convexity of scalar-valued time series {x i | i = 1, . . . , N} where each observation x i is a vertex in a complex network. Two vertices i and j are linked by an edge (i, j) if for all vertices k with t i < t k < t j the following condition is applied [25]: This is, the adjacency matrix (A i j ) of the following undirected and unweighted VG is presented as: where H(·) is the Heaviside function. Horizontal visibility graphs (HVGs) provide a simplified version of this algorithm [26]. For a given time series, the vertex sets of VG and HVG are the same, whereas the edge set of the HVG maps the mutual horizontal visibility of two observations x i and x j , i.e., there is an edge (i, j) if VG and HVG capture essentially the same properties of the system under study (e.g., regarding fractal properties of a time series), since the HVG is a subgraph of the VG with the same vertex set, but possessing only a subset of the VG's edges. Note that the VG is invariant under a superposition of linear trends, whereas the HVG is not.
Since the definition of VGs and HVGs takes the timing (or at least time-ordering) of observations explicitly into account, the direction of time is intrinsically interwoven with the resulting network structure. To account for this fact, we define a set of novel statistical network quantifiers based on two simple vertex characteristics: (i) As the number of edges incident to a given vertex i can be defined as k r i = j A i j , for a (H)VG, we rewrite this quantity for a vertex of time t i , regarding where k i = k r i + k a i , and k r i with k a i referred to as the retarded and advanced degrees. As it is defined in [12], following measures correspond to the in-and out-degrees of time-directed (H)VGs.
(ii) The local clustering coefficient j,k A i j A jk A ki is another vertex property of higher order characterizing the neighborhood structure of vertex i [27]. Similarly to (11) and (12), for studying the connectivity due to past and future prices, we rewrite the standard coefficient as the retarded and advanced local clustering coefficients According to graph-based method, we will utilize the probability density functions (PDFs) of (11)-(14). If our system is presented to be time-reversible, we conjecture that probability distributions of forward and backward in time characteristics should be the same. For irreversible processes, we expect to find statistical non-equivalence. According to [12], this deviation will be defined through Kullback-Leibler divergence: where, in our case, p responds to a distribution of the retarded characteristics and q is of the advanced. Figure 5 presents D KL measure for the distribution of degrees and local clustering coefficients.
As it can be seen for figure 5 and b, both irreversibility measures for degrees and local clustering decrease during crashes and critical events which tells about luck of irreversibility during them. Also, it is shown in figure 4 that the first period of the DJIA is presented to be more reversible as the distance between distribution of degrees is close to zero for almost the entire period. Local clustering coefficient is seemed to be more robust and informative comparing to degree.

Multiscale time irreversibility index
For the following procedure [24], first of all, we need to construct goarse-grained time series which can be defined as Then, using a statistical physics approach, we make the simplifying assumptions that each transition (increase or decrease of y τ ( j)) is independent and requires a specific amount of "energy" E. The probability density function of this class of system [28] can be assumed to follow ρ ∝ exp(−βE − γQ) where Q represents the non-equilibrium heat flux across the boundary of the system, and β and γ are the Lagrange multipliers derived from the constraints on the average value of the energy E per transition and the average contribution of each transition to the heat flux Q.
Since the time reversal operation on the original financial index time series inverts an increase to a decrease and vice versa, the difference between the average energy for the activation of information rate, i.e., βE + γQ y τ >0 , and the relaxation of information rate, i.e., βE + γQ y τ <0 , can be used as measurement of time reversal asymmetry.
Taking into consideration that the assumption of the distribution function ρ links the energy to the empirical distribution, we, following , define the next measure of temporal irreversibility: The time series is called reversivle if a(τ) = 0. Sometimes it is important for us to know not only the degree of irreversibility but also whether it reversed in time or not. For this purpose, we will replace equation (17) by the following one: The time series is said to be irreversible for all scale τ if A(τ) > 0. In case when A(τ) = 0, the time series may be reversible or not for scale τ. For the analysis of discrete values, equation (18) can be presented as: A(τ) = y τ >0 Pr(y τ ) ln Pr(y τ ) y τ Pr(y τ ) ln Pr(y τ ) − y τ <0 Pr(y τ ) ln Pr(y τ ) y τ Pr(y τ ) ln Pr(y τ ) .
The generalized multiscale asymmetry index (A I ) is defined as the summation ofÂ(τ) obtained for a predefined range of scales, i.e., The figures illustrate that time series are significantly irreversible. For initial time series (for approximately 5-10 scales), the transition of prices is presented to be reversible (symmetric). After it, transitions presented to be asymmetric. Draws attention and noticeable unevenness introduced measures, which correlate with the fluctuations of the input time series. Identifying significant changes in the time series and comparing them with the corresponding changes of non-reversible measures of complexity, it is possible to construct the corresponding indicators.

Time series irreversibility measure based on permutation patterns
The idea of analyzing the permutation patterns (PP) was initially introduced by Bandt and Pompe [29] to provide researchers with a simple and efficient tool to characterize the complexity of the real systems dynamics. With respect to other approaches, as entropies, fractal dimensions, or Lyapunov exponents, it avoids amplitude threshold and instead dealing with casual values inhereted from time series dynamics, deals with ordinal permutation patterns [30]. Their frequencies allow us to distinguish deterministic processes from completely random. The calculations of PP assume that the time series is partitioned with the embedding dimension d E (number of elements to be compared) and the embedding delay τ (time separation between elements). In our opinion, d E ∈ {3, 4} and τ ∈ {2, 3} are the best parameters that encapsulate all the necessary quantitative information.
Further, all embedded patterns are assigned to their ordinal rankings. As an example, let us consider a fragment of the DJIA time series for period 18 According to mentioned steps, we will construct embedded matrix of overlapping column vectors with d E = 3 and τ = 2. Our sampled data is partitioned as follows: After it, our time-delayed vectors are mapped to permutations or ordinal patterns of the same size. Our example consists 3! = 6 different ordinal patterns in total: Figure 6: Dynamics of asymmetry index for first (a) and second (b) periods.
As an example, the corresponding permutation of the first column from (21)  = 210 since x(3) ≤ x(2) ≤ x(1). Therefore, after mapping from the time-series data into a series of permutations , we obtain the ordinal matrix: Finally, the probability of each pattern is calculated as where # {·} denotes the cardinality of a set, and permutation entropy is calculated regarding a probability distribution P, whose elements p i ≡ p(π i ) are the probabilities associated with the i th permutation pattern, i = 1, . . . , d E !: Interesting for us time irreversibility of permutation patterns is not related on (24), but on the probability distribution of ordinal patterns. That is, we find probabilities of finding corresponding ordinal patterns for both initial and reversed times series. Correspondingly, if both types have approximately the same probability distributions of their patterns, time series is presented to be reversible and the opposite conclusion for the other case.
The difference between distributions of direct time series (P d ) and reversed (P r ) can be estimated with equation (15).
From the presented figures it can be seen that as financial crisis comes, the distance between two distributions becomes more close to zero, denoting that those period is less irreversible and efficient. Moreover, in this case we see that D KL for permutaiton patterns acts as a measure of complexity. The dynamics before crisis events starts do decrease, presenting trend to be more predictable, and after them it increases, demonstrating the increasing complexity.

Conclusions
Financial systems does not always evolve with precisely the same values. Instead, their prices increase or decrease over time due to different market conditions, political, and economical situations in concrete countries or in the word.
In this work we have presented how to deal with (statistical) time irreversibility, varying over time. Using the time series of Dow Jones Industrial Average index and the sliding window procedure, first of all, we have presented our classification of crisis events in DJIA index, and we have constructed econophysical and econometrical indicators of financial crashes and critical events. Our study affirms ranging degrees of irreversibility in DJIA stock index. Some of its periods of existence are presented to be more irreversible comparing to others. Namely, periods of