Measuring the Topological Time Irreversibility of Time Series With the Degree-Vector-Based Visibility Graph Method

Time irreversibility of a time series, which can be defined as the variance of properties under the time-reversal transformation, is a cardinal property of non-equilibrium systems and is associated with predictability in the study of financial time series. Recent pieces of literature have proposed the visibility-graph-based approaches that specifically refer to topological properties of the network mapped from a time series, with which one can quantify different degrees of time irreversibility within the sets of statistically time-asymmetric series. However, all these studies have inadequacies in capturing the time irreversibility of some important classes of time series. Here, we extend the visibility-graph-based method by introducing a degree vector associated with network nodes to represent the characteristic patterns of the index motion. The newly proposed method is parameter-free and temporally local. The validation to canonical synthetic time series, in the aspect of time (ir)reversibility, illustrates that our method can differentiate a non-Markovian additive random walk from an unbiased Markovian walk, as well as a GARCH time series from an unbiased multiplicative random walk. We further apply the method to the real-world financial time series and find that the price motions occasionally equip much higher time irreversibility than the calibrated GARCH model does.

. In other words, if S and its time-reversed version S t.r.
x N , . . . , x 1 } { have identical properties, we can assert that the series is time-reversible. Then, the time irreversibility of time series can be defined as the absence of time reversibility, i.e., S and S t.r. have somewhat different properties. Time irreversibility is a fundamental property of nonequilibrium systems [3][4][5] and also a dynamics that is under the influence of non-conservative forces (e.g., memory effects) [6]. Since the source of the invariance between S and S t.r. varies, it is natural to consider different degrees of time irreversibility within the sets of innately timeasymmetric time series such as those resulting from non-stationary, non-linear, or non-Markovian processes [7]. themselves. For example, in the realm of physiology, it has been suggested that the time irreversibility in heartbeat weakens with aging or heart disease, and, therefore, a quantitative measurement of time (ir)reversibility may provide a way to assess the functionality of the biological system [8].
Among various application studies, the time irreversibility of financial time series attracts much interest from researchers for the following two reasons. First, it can help us to reveal the mechanisms of stylized facts concerned with the asymmetry of fluctuations in financial markets, specifically the gain-loss asymmetry and the leverage effect. Stylized facts of financial markets are a set of robust empirical patterns or properties that have been derived from data analytic studies across different financial markets or assets [9][10][11] such as fat-tailed distribution of returns [11][12][13], volatility clustering [11,[14][15][16][17][18], and the gain-loss asymmetry [10,19]. A major research approach of financial markets is to build theoretical or numerical models that can reproduce stylized facts, and utilize the models to investigate their cause, or to predict the outcome of financial policies [11]. Hence, providing a novel tool for the investigation of their precise features or for the calibration of the models is of fundamental importance. The second reason is that one can estimate the predictability of financial index (e.g., stock price) from the time irreversibility of the series 1 . The connection between the time irreversibility and the predictability of financial time series is explained via the so-called efficient market hypothesis (EMH, in its weak form). The efficiency of a financial market here means that all the publicly available information is incorporated into the present market price; hence, a completely efficient market has no residual information available for predicting the future market prices. In turn, the existence of the predictability in financial time series requires a somewhat inefficiency of the market, which corresponds to the existence of extra information in the past sequence (i.e., memory). This existence of residual information implies that the time series should be sensitive to the direction of time (i.e., the existence of time irreversibility). The link between inefficiency, predictability, and time irreversibility in a financial market (or of time series associated with the market) has been analyzed, tested [20], and even utilized to, for example, rank different financial markets for constructing a better portfolio [21,22].
Borrowing tools from network science, namely, the visibility graph (VG)-based method [23] and the horizontal visibility graph (HVG)-based method [24], Lacasa et al. [7,25] recently introduced seminal measurement as well as working definitions for the time-series time reversibility. Employing these methods, one first transforms time series into a graph based on certain geometric criteria and then quantifies the time irreversibility by identifying properties of the graph-theoretical representations. Lacasa et al. show that time series derived from irreversible dynamics correspond to an asymmetry between the degree distribution (i.e., probability distribution of how many connections a node has) of graphs transformed from S and that from S t.r. . The finding also illustrates the usefulness of their methods as the working definition of time (ir)reversibility. Compared to other existing methods, these network-based approaches present two advantages [7]: 1) they do not require any ad hoc parameters that can alter the results of measurement; 2) they can quantify different levels of time irreversibility within the class of innately time-irreversible time series such as those linked to non-stationary or non-linear dynamics.
Although there are literatures that already applied the visibility graph to time series in various fields including economics, physiology, or cultural study (e.g. [26][27][28][29][30]), both the HVGbased and VG-based measurements of time (ir)reversibility have critical shortages. The major inadequacy of the HVGbased method is that it cannot tell the difference in the geometry of index motion (e.g., whether the trajectory is concave or convex). This is because the construction criteria of HVG are only based on ordinal information of the original series. Hence, it cannot differentiate the accelerated and the decelerated motions. This shortage is particularly critical if one wants to use HVG in financial applications, where not only the trend (whether rising or falling) of the index motion but also the speed is of interest. In the case of the VG-based method, although it has the ability to identify the downward convexity of the motion, it fails to capture some important causes of time irreversibility, particularly the existence of memory effects. This is not a trivial deficiency because the presence of memory is one of the primary sources of the time irreversibility [2,6] and needs to be identified accordingly. Although the reason behind this deficiency of VG is not as clear as that of HVG's, we conjecture that it is because too much information is missed through the transformational process. Indeed, we shall show later in this paper that we can discriminate the existence of memory effects by defining a refined version of time irreversibility measure with the family of visibility algorithms.
To solve the shortages of the existing network-based measurement methods for the time (ir)reversibility of a time series, we start with a hypothesis: All the non-trivial information of a time series (e.g., the existence of memory effects) is stored in the topology of its trajectories. Under such a hypothesis, one needs to capture the topological properties of time series' trajectories for a sufficient measurement of the degree of the time-series time irreversibility.
Accordingly, our research questions are set as follows: Research Question 1. How can we capture the topological properties of time series? Research Question 2. How can we quantitatively measure the time irreversibility from the topological perspective?
To answer the first question, we use the concept of visibility and invisibility, a major variety of visibility algorithms, to differentiate convexity and concavity. We also propose a parametric "degree vector" to map a trajectory into a vector with four components that corresponds to a particular geometric pattern of the index motion. After this, we answer the second question by building the degree-vector-based measurement method of the time irreversibility and by validating it via comprehensive numerical simulations.
The remainder of the paper is organized as follows. In Methods, we first review two of the existing network-based methods and point out their shortages (VG and HVG-Based Measurement); then, we propose the new method, the degreevector-based method, as a refinement of the existing methods (Refinement of the Method). In Validation of DV-VG, we validate the degree-vector-based method via numerical simulations of seven synthetic time series. After that, we employ the new measurement method to investigate the properties of realworld financial time series in Demonstrations of Real Stock Indices. Finally, in Conclusion, we summarize and briefly discuss possible future applications of the degree-vector-based method.

METHODS
We first review the existing network-based measurement methods for time series' time irreversibility. These methods include (directed) visibility graph (VG)-based and (directed) horizontal visibility graph (HVG)-based method.

Network Representations
A directed 2 visibility graph (VG) of time series, S x t N t 1 , is a directed graph of N nodes; G(S) V, E} { , where V and E stand for vertices (nodes) and edges, respectively. Each node of the graph i 1, . . . , N is labeled by the time order of its corresponding datum x i . Then, two nodes i and j (assume i < j without loss of generality) are connected by a directed edge from i to j; e i,j ∈ E, if all the data between the two points are below the straight line connecting the pair. Formally, i and j are connected if and only if is the slope of the line between node i and j. Equation 2.1 is called the "visibility criterion". To understand the analogy of "visibility", consider each datum of the time series as a pillar standing at t i with the height of x i . Assume that one sat at the top of the pillar at i, if you could see the top of the pillar at j (i.e., node j), then these two nodes will be connected because they are visible to each other. See Figure 1A for a graphical illustration of the visibility criterion. The horizontal visibility graph (HVG) G h (S) V, E h } { , has the same structure as VG except for a different geometric criterion to decide which pair of nodes should be connected. According to the "horizontal visibility criterion", a directed horizontal edge e h i, j ∈ E h from node i to j exists if and only if Note that horizontal visibility criterion is a sufficient condition for the visibility criterion, i.e., E h ⊂ E. See Figure 1B for a graphical illustration of the horizontal visibility criterion.

Notations
After a time series is mapped into a directed network (G or G h ) 3 , we introduce notations for the comparison between the timereversed pairs. Let k in (t) N t 1 [G] denote the in-degree sequence of G where k in (t) is the ingoing degree of node t. Similarly, let k out (t) N t 1 [G] be the outgoing degree sequence where k out (t) is the outgoing degree of node t. Note that the ingoing degree k in (t) is defined as the number of edges that start from the past nodes and end at node t, and the outgoing degree k out (t) is the number of edges that start from node t and end at the future nodes.
An important remark here is that an ingoing edge is counted as an outgoing edge if viewed from the reversed time horizon; thus, ingoing and outgoing degree sequences are interchangeable under the time-reversal transformation: 3) The identity of Eq. 2.3, which is common among the family of visibility graph algorithms, is crucially important when later we define the measurement of the time (ir)reversibility.
Next, let us define the ingoing and outgoing degree distributions of G (VG or HVG) constructed from S as the following: As a result, the property of Eq. 2.3 can be formulated in terms of the degree distributions: (2.5)

Quantifying the Time (Ir)reversibility
As stated at the beginning of this paper, the time reversibility of a time series stands for the invariance of properties under the timereversal transformation. Hence, to quantify the time irreversibility, we need to compare the property of the original series with its timereversed counterpart. With the language of VG or HVG, one may compare ingoing (outgoing) degree distribution of the original time series S with the corresponding probability distribution in the time-reversed time series S t.r. . As shown in Eq. 2.5, the ingoing degree distribution of S t.r. is equivalent to the outgoing degree distribution in S. Based on such an identity, we can recast the definition of the time reversibility of a time series, via VG and HVG, as the following: A time series of length N; S x 1 , . . . , x N } { is VG/HVG reversible if and only if the in-degree and out-degree distributions are asymptotically equal: For time series of a finite size, we can assess the degree of time (ir)reversibility, namely, how much time-(ir)reversible the series is, by the quantitative measurement of the distance between P in and P out . For this purpose, we use the Kullback-Leibler divergence (KLD) between ingoing and outgoing degree distributions: KLD is defined as a semi-distance that vanishes if and only if the two probability distributions are identical and has a positive value otherwise. KLD is not only convenient to quantify the distance between probabilities but also significant in statistical mechanics, in such a way that it can be used to estimate the average entropy production of the associated system [7]. Here, the measured value is the KLD between probability distributions associated with observables (e.g., time series, network) obtained from a certain process and its time reversal.
One additional technical remark is that Eq. 2.7 may diverge when one or more degree k realizes only within the in-degree distribution (i.e., ∃k, P in (k) > 0, P out (k) 0). This may happen especially in the time series with small length. While this divergence of KLD does indicate that the series is completely irreversible, the infinite value may make it difficult to interpret the measured time irreversibility value. We can practically solve this problem by adding a very small value to all the probabilities [22]: ). Since degree distributions derived from an actual time series would fluctuate with its size, in practice, we will measure the speed of decay of the measure (D(S) as a function of series size (N) to qualitatively evaluate the degree of time (ir)reversibility of the process.

Intuitions
As our refinement of the VG algorithm is based on the hypothesis made in Introduction that the topology of trajectories stores all the information of time series, what we need to do is to capture the topological properties of time series and to effectively quantify the time (ir)reversibility.
First, let us describe the proposed procedure to capture the topological properties of a time series: 1. Set a moving time window and divide the whole series into a sequence of overlapping trajectories with the fixed length of the time window. 2. Identify the geometric properties of each trajectory of the time series in the moving windows. 3. Aggregate the geometric properties of each piece to evaluate the geometric property of the whole series.
The primary issue regards what characteristics we need to tell apart. Here, we discriminate trajectories based on direction (rise or fall) as well as the shape (convex, concave, or otherwise). Note that the shape of a trajectory's geometry is difficult to define merely via statistical approaches because realized trajectories are the convolution of different temporal modes [31]. Hence, we keep employing the family of visibility algorithms; in the meantime, we also try to give a remedy to deficiencies of the VG-based or HVGbased method. Specifically, besides the visibility criterion, we also employ the invisibility criterion to construct the network from a time series, because both criteria can reflect the convexity and concavity of functions in a straightforward manner. Note that the visibility of two distant data points directly relates to the convexity of a trajectory, and the invisibility relates to the concavity.
The invisibility criterion here refers to the algorithm introduced by Yan et al., named as the "absolute invisibility algorithm" [27], which is just the opposite of the visibility criterion (Eq. 2.1). A pair of nodes, i and j ( > i), in an invisibility graph is formed by connecting a directed edge from i to j if and only if: where, again, s(x i , x j ) indicates the slope of line between data x i and x j . See Figure 1C for a graphical illustration of the invisibility criterion.

Visibility Graph With Colored Edges
We construct a new kind of visibility graph, "the degree-vectorbased visibility graph" (DV-VG hereafter), from a time series S as graph with each datum x i in the series associated to node i of the graph. Indices of edges are defined as the following: RV for "rise and visible"; RIV for "rise and invisible"; FV for "fall and visible"; FIV for "fall and invisible". Hence, the directed edge from i to j is further colored with an index θ denoted as e θ i,j , θ ∈ RV, RIV, FV, FIV} { , and is an instance of E θ if the following conditions are satisfied. Criteria for the linkage of nodes are stated as follows.
1. The neighborhood condition [27] j − i ≤ ω, (2.10) where ω ∈ N is the length of time window, the only parameter of the DV-VG method.

The direction and shape condition
• Rise and Visible (RV) (for e RV i,j ) j−i is the slope between node i and j. • Rise and Invisible (RIV) (for e RIV i,j ) To summarize, the neighborhood condition, Eq. 2.10, should be satisfied for all types of edges, while one of the four conditions for direction and shape (i.e., Eqs 2.11.14.-.Eqs 2.2.14) needs to be satisfied depending on the color of edges. See Figure 2 for a graphical illustration of the distinction among the criteria for different θ.
Owing to the neighborhood condition, a node in DV-VG can at most have 2ω degrees; thus, DV-VG associated with a time series of length N contains at most ωN edges. To check whether a pair of nodes i and j( > i) are connected by an edge of any color, in the simplest case, one needs to consider the values of slopes between i and all the following nodes until j; x i+1 , . . . , x j } . Again, the neighborhood condition assures us that the length of x i+1 , . . . , x j } does not exceed ω. Hence, the worst-case computational cost for constructing DV-VG is O(ω 2 N). Since we regard ω to be a negligibly small number compared to N, the cost reduces to O(N).

The Degree Vector
Let us prepare some notations for the description of properties of DV-VG.
is the ingoing degree vector of node t, whose components read as the following, ] as the outgoing degree vector sequence with v out (t) being the outgoing degree vector of node t.
To define time reversibility with the use of ingoing and outgoing degree vectors of the DV-VG representations, we need to hold the symmetry between the ingoing and the outgoing degree vector under the time-reversal transformation, namely, (2.16) Among the three conditions for the construction of DV-VG described in Visibility Graph With Colored Edges, the neighborhood criterion and the shape (visibility/invisibility) criteria are not altered through the time-reversal transformation. In contrast, as shown in Figure 3, the upward trend along with the original time direction would become a downward trend when viewed from the opposite time horizon. In other words, the direction criterion for of DV-VG is reversed under the time-reversal transformation. Thus, to keep the timereversal property (Eq. 2.16), components of the outgoing degree vector need to be permuted as: The difference in the order of four elements composing v in (t) in Eq. 2.15 and v out (t) in Eq. 2.17 requires extra caution.

Interpretations of the Degree Vector
The ingoing degree vector at time t, namely, v in (t), represents the topological property of the index trajectory consisting of the last ω + 1 data points, i.e., x t−ω , x t−(ω−1) , . . . , x t } . Analogously, the outgoing degree vector v out (t) is the representation of the geometric property of the local trajectory consisting of next ω + 1 data points x t , x t+1 , . . . , x t+ω } { . Indeed, we can regard the new graph representation as a mapping of time series from a sequence of scalar values to a sequence of geometric patterns of (ω + 1) length: As a concrete example, Figure 4 shows the relationship between the ingoing degree vectors and the corresponding geometric patterns in the case of ω 2. We have totally six possible degree vectors for ω 2. Each degree vector has a definite correspondence to a geometric pattern, which can be characterized as accelerated/decelerated rise/fall, or otherwise zigzag motion. For instance, v in (2, 0, 0, 0) corresponds to a monotonically accelerated rise motion (i.e., a convex uptrend), and v in (1, 1, 0, 0) corresponds to a monotonically decelerated rise motion (i.e., a concave uptrend).

Quantifying the Time (ir)reversibility
As we have converted the time series into a sequence of degree vectors that correspond to specific geometric patterns for each piece of the local trajectories of index motion, let us define the distributions of ingoing or outgoing degree vectors for DV-VG constructed from S as follows: (2.19) Note that the property indicated in Eq. 2.16 shall be inherited to the degree vector distributions. Hence, DG-VG, by definition [i.e., regardless of the existence of the time (ir)reversibility], holds the following equality properties: (2.20) Based on this symmetry between ingoing and outgoing degree distributions under time-reversal transformation, we generalize a new working definition of time reversibility: A time series S x 1 , . . . , x N } { is topologically time-reversible if and only if the distributions of ingoing and outgoing degree vectors are asymptotically identical, namely, For the time series with a finite size, however, we can assess how much the time series is time-(ir)reversible through quantifying the distance between distribution P in and distribution P out . To this end, again, we may apply the KLD between the ingoing degree vector and the outgoing degree vector distributions with a small perturbation parameter: On the specific meaning of KLD, see Quantifying the Time-(Ir) reversibility. As is the case with previous methods, since degree vector distributions derived from an actual time series fluctuate with its size, we measure the speed of decay of the measure (D(S)) as a function of series size (N) for evaluating the degree of time (ir)reversibility of the process.

Discussions on DV-VG
The proposed working definition of time reversibility with the use of DV-VG is essentially a topological description such that it quantifies the similarity between the original and reversed time series in terms of the occurrence distributions of short-length geometric patterns. The topological time reversibility does not necessarily require the identical joint distribution for S and S t.r. , which in turn enables us to differentiate the existence of memory effects, linear trends, or volatility clustering within the class of non-stationary or even non-ergodic processes as will be shown in Validation of DV-VG. This characteristic is useful especially for the application to financial time series, where we need to examine the asymmetric properties of non-stationary series.
The distinctive aspects of DV-VG compared to the original visibility graph (VG) method lie in twofold:locality and detailedness.
As the first characteristic, DV-VG uses local rather than global information. In contrast, the VG mapping from a time series to network is done by using the whole series [25]. We propose this division of the whole series into a sequence of the local subseries based on the fact that the aggregation of local trajectories should certainly include the information of the whole series. This locality, as we will show in Section 3.1.3, enables us to preclude the effect of non-ergodicity when analyzing multiplicative random walks. Additionally, the idea of focusing on local information when coarse graining the series provides us some conveniences. First, it requires a much lower computational cost. The computational cost for the construction of VG with a naïve algorithm increases as O(N 3 ). Although a faster algorithm employing the so-called divide-and-conquer approach has been recently proposed, which does reduce the average-case time complexity to O(N log N) [32], the computational cost can still be O(N 2 ) for some unfavorable cases. What is worse is that the nearly worst case could be encountered rather frequently if one had to tackle time series similar to the multiplicative random walks. On the other hand, the computational cost for DV-VG increases always (i.e., for any inputs) as O(N), because we only need to check a finite size (ω) data for each time step. One more notable advantage of keeping the construction criteria local is that it makes the method well suited for analyzing the so-called online time series (i.e., the system keeps producing new data points). As VG needs to take the whole series into account, adding extra data points x N+1 , . . .} { can always change the degree k(t) for nodes at any past time t, results of the analysis always need to be updated whenever new data arrives. For DV-VG, the degree vector at t will never be altered once that the ω-length time step has passed from t.
The second characteristic of DV-VG is that it contains more detailed information about the topological properties of trajectories. When mapping a data point x t in the time series into ingoing and outgoing degree vectors (v in (t), v out (t)), DV-VG discriminates on both the direction (rise/fall) and the shape (convexity/concavity) of the local trajectory around x t . In contrast, VG ignores the direction and only partially examines the shape in the mapping process.

VALIDATION OF DV-VG
In this section, we first validate DV-VG via the measurement of time irreversibility for time series generated by numerical simulations. Furthermore, we shall employ DV-VG to investigate the properties of real-world financial time series.
As is explained in Discussions on DV-VG, the distinctive features of DV-VG refer to both locality and detailedness of the mapping procedure. The effectiveness of DV-VG needs to be demonstrated through comparisons of different methods. To ensure the fairness of such comparisons, besides VG, we further employed a modified VG equipped with the locality of DV-VG. In particular, a localized VG; is employed, which builds its edge with both the visibility and the neighborhood criteria. Hereafter, the localized VG shall be referred to as LVG. Note that the set of edges built in LVG is a subset of that in VG (i.e., E local ⊂ E) corresponding to the same time series.
In the following section, we shall apply three methods, i.e., VG, LVG, and DV-VG, to measure time irreversibility of a set of synthetic time series. Note that we set ω 100 for LVG 4 , and ω 2 for DV-VG 5 . In total, we have investigated eight synthetic time series. Seven of these time series are selected following Lacasa and Flanagan [7] for comparison. The eighth time series is generated by the GARCH process, which is an important subclass of multiplicative random walks for modeling financial time series. The tested series are listed as follows. x t+1 6. Unbiased multiplicative random walk: where E[log ξ t ] < 0(e.g. ξ t ∼ U[0.9, 1.1 ) ] . 8. GARCH (1, 1) process:

Stationary Processes
We first consider two canonical stationary processes: White noise and Chaotic logistic map. Figure 5 shows the time irreversibility of (A) White noise and (B) Chaotic logistic map as a function of the time series length N. In each plot, blue, cyan, and red lines stand for results obtained via VG, LVG, and DV-VG, respectively. Each data point is the average over 10 times realizations and the error bars indicate 10 and 90% quantiles. Same quantiles are used for all the following log-log plots in the paper unless otherwise stated. Comments on the time (ir)reversibility of the two kinds of time series are provided as follows.

(A) White noise
In all the three results, the measured KLD decays asymptotically as 1/N, indicating that the time irreversibility due to the finite size of time series will vanish rapidly with the increase of N. Hence, time series obtained from white noise can be categorized as time-reversible.

(B) Chaotic logistic map
Via all the three measurement methods, the convergence of KLD to a finite and positive value is shown as the size of the time series increases, thus the process is categorized as timeirreversible. Note that measurement by DV-VG is insensitive to the size of time series.
To summarize, our results are in good agreement with previous theory, in which the white noise is, by definition, time-reversible, and the chaotic map is, also by definition as a dissipative chaotic process, time-irreversible.
Additive Random Walks For VG and LVG, the measured KLD vanishes asymptotically, implying that the process is time-reversible. This erroneous result owes to the visibility criterion (not the trend condition) being invariant under the addition of linear trends [7]. In contrast, the measured KLD via DV-VG converges to a finite value manifesting that the trending motion of the time series brings about the time irreversibility. The reason for DV-VG to distinguish a trend is clear: the differentiation of rising (uptrend) and falling (downtrend) trajectories have been taken into account when constructing the degree vectors.
(C) Unbiased ARW with memory effect Similar to case (B), the measurement via VG or LVG breeds a decreasing KLD as the series size gets larger, while the measurement via DV-VG results in the KLD converging to a finite positive value. By differentiating geometric patterns more precisely, our new method alone can successfully distinguish the existence of memory effects on additive random walk as a source of the time irreversibility. In the case of the VG, the measured KLD does not vanish along with the increase of series length, indicating the timeirreversible nature. In contrast, in the cases of the LVG and DV-VG, as KLD vanishes asymptotically, the process is judged as time-reversible. Here, the result differs depending on the measurement methods employed. The multiplicative random walk is known to have a non-ergodic nature and contains extremely rare but extremely different events. In the case of the original VG, a node will be connected to all the visible nodes no matter how far away they are. As the non-ergodicity of MRW is inherited, the degree distribution will be dominated by extreme events. In other words, the degree distribution has a fat tail resulting from the large fluctuation over realizations [7]. If we add the neighborhood condition, thus cut off the impact of extreme events, the non-ergodicity of MRW itself shall not be inherited to the degree distribution or degree vector distribution of its graph representations. As a result, the time irreversibility measure vanishes with N −1 in case of LVG and DV-VG, judging the unbiased MRW as time-reversible.

(B) MRW with negative drift
The KLD value computed via the VG does not vanish with the series length as is the case in the unbiased MRW. In contrast, the KLD value computed via LVG vanishes asymptotically as about 1/N. Most interestingly, the KLD value computed via DV-VG  converges to a finite positive value at around N 10 3 , clearly differentiating unbiased and biased (in logarithmic space) MRWs.

(C) GARCH
The GARCH model is a typical extension of the MRW that can model the tendency of large changes to cluster in log-returns of index [16], which is typically called volatility clustering and is known as one of the stylized facts of financial time series. Since the process contains additional directional information, GARCH should be more time-irreversible than the unbiased MRW. First, in the case of VG, the measured KLD does not decrease and rather starts fluctuating strongly as the series' length gets longer. Although it seems that VG is capable of capturing the time irreversibility of the GARCH model, it is not clear whether the measure captures the time-irreversible nature, which is rooted in the volatility clustering since VG has produced an erroneous nonvanishing KLD in the unbiased MRW. Second, in the case of LVG, the KLD vanishes asymptotically, suggesting that the method fails to detect GARCH's time irreversibility. Finally, the KLD obtained through DV-VG does not vanish and converges to a finite value with a large N( > 10 4 ), suggesting that the method can capture the time-irreversible nature originated from the volatility clustering and discriminate the GARCH time series from the unbiased MRW.

DISCUSSION
As shown in the previous subsections, we have tested the capability of different methods for the measurement of time reversibility for a set of synthetic time series that are generated from eight canonical processes. Among these test cases, the newly proposed DV-VG method can yield a renormalized time irreversibility measure, which vanishes asymptotically if the process is unbiased (in the logarithmic space for the multiplicative random walks) or converges to a finitely positive value if the process contains linear trend, memory effect, or volatility clustering. Note that the previous method (i.e., VG) fails in detecting non-Markovianity within the class of additive random walk. Again, the reason why DV-VG is superior to its original version is that one can examine in detail whether certain geometric patterns occur more/less frequently in the forward series; G d. v. (S), than they do in the backward series, G d. v. (S t.r. ). Let us emphasize that the higher detectability of DV-VG is realized through the following: 1) focusing on local information, and 2) differentiating geometric patterns more precisely.

DEMONSTRATIONS OF REAL STOCK INDICES
In this section, we further demonstrate the capability of DV-VG by exploratorily analyzing the time (ir)reversibility of financial time series generated from real markets. Specifically, we have investigated time (ir)reversibility of stock indices of six representative financial markets: We use the daily closing price during the period from June 28, 1999 to June 28, 2019, which yields around 5 × 10 3 data points for each index.
One important note here is that raw values [i.e., x(t)] instead of log-returns [i.e., r(t) log(x t /x t−1 )] of the stock prices are analyzed in our study. Log-returns are the most prevalent form used in the analyses of financial time series mainly because they are known to be closer to the stationarity and can be well approximated by multiplicative random walk processes [21,33]. However, as we have validated that DV-VG works well for the non-stationary processes (as VG does [7]), we no longer need to consider the stationarity of the series.
The precise methodology (for the analysis of each index price) is described as follows.
1) We construct a working time window of n 10 3 data points and divide the original time series x t } { of N( ≈ 5 × 10 3 ) data into a sequence of (N − n + 1) overlapping sub-series with n data in each. We chose n 10 3 since it is the minimum size of the time series to sufficiently detect the time irreversibility rooted in trends and memory effects.
2) For each of these sub-series, we construct the associated DV-VG and compute the KLD via its degree vector distributions. 3) We also calibrate 7 the parameter of GARCH (1, 1) by fitting the model to the log-return (i.e., log x t − log x t−1 ) series. 4) Using calibrated parameters and GARCH (1, 1) model, we regenerate a sample price time series with the length n 10 3 and compute its time irreversibility. 5) We compute the mean level time irreversibility of the associated GARCH (1, 1) process via a Monte Carlo simulation, by repeating 4) 50 times and calculating the mean and the standard deviation of the aggregated results. 6) Finally, we compare the level of time irreversibility obtained from the real data with the associated GARCH (1, 1) model. Figure 8 shows the degree-vector-based time irreversibility plotted as a function of date. Each data point of thick red lines denotes the time irreversibility of last 10 3 business days counted from that date.
Overall, three observations should be noted: 1) all the index series can be judged as time-irreversible as a whole, but 2) the degree of the time irreversibility varies across indices and 3) the degree of time irreversibility also varies over time, which are in good accordance with the previous research [21]. Besides these observations, there are several findings from our results. First, the KLD values from any indices are significantly larger than those constructed from the unbiased multiplicative random walk (with the same length: N ≈ 5 × 10 3 ). Second, although the degree of time irreversibility varies across indices, all the indices but DJI have similar temporal trajectories. Specifically, two big peaks of time irreversibility emerge in the most indices during approximately the same periods. The cross-correlation between every pair of indices except DJI is essentially positive. Thirdly, what is particularly interesting to us is that, if we compare the degree of time irreversibility of each stock index with that of the calibrated GARCH (1,1) model, we find that there are some periods during which they are similar, and there are other periods during which the former becomes much higher. This result suggests that the GARCH model may deviate from the real markets in terms of the time irreversibility, which has never been seriously investigated in previous studies. These deviations may be caused by time-irreversible effects other than volatility clustering. Although we are not able not clarify what exactly these effects are in the current study, we are almost sure that the main reason would be the emergence of a trend. Also note that the trending motion may not be captured once the log-return data are used, just as what we would do in the conventional analysis of financial data.

CONCLUSION
Let us remind readers that the main objective of our study is to answer the following two questions: Research Question 1. How can we capture the topological properties of time series? Research Question 2. How can we quantitatively measure the time irreversibility from the topological perspective?
As for the answer to the first question, the newly defined "degree vector" has enabled us to characterize the topological property of each piece of the local (short) trajectories. The degree vector can be determined with three different geometrical criteria, namely, 1) the neighborhood condition, 2) the trend condition, and 3) the shape condition. With respect to the shape condition, we utilized visibility and invisibility algorithms for the classification of different kinds of edges. In summary, our answer to the RQ1 is that the proposed degree vector at t has the definite correspondence to the topological property of trajectory adjacent to t, and by aggregating the sequence of degree vectors into the occurrence frequency distribution, we can, in a qualitative sense, capture the topological property of the whole series.
Regarding the second question, a new measurement method for the time irreversibility of time series is proposed based on the degree vector representation, i.e., DV-VG. To validate the new measurement method, the results of the measurement of the numerical simulation of eight classes of synthetic time series are compared with those of the other measurement methods, that is, VG and LVG. By using DV-VG, we successfully detect the timeirreversible nature rooted in 1) linear trends and 2) memory effects (i.e., non-Markov property), which are not detectable via the other two methods. Hence, although we are not yet able to provide exact mathematical proofs, we may answer RQ2 as "yes" with the current numerical evidence. Furthermore, we have applied DV-VG to time series generated from the GARCH model, which is a basic extension of the unbiased multiplicative random walk to model financial time series. The degree-vector-based time irreversibility does not vanish and converges to a finite value with large enough N( > 10 4 ), suggesting that the time-irreversible nature of the GARCH Frontiers in Physics | www.frontiersin.org November 2021 | Volume 9 | Article 777958 models comes from the phenomenon that large volatility is likely to be followed by large volatility. As a preliminary study, we further applied DV-VG to six stock index time series from canonical real markets and compared the results with the calibrated GARCH (1, 1) model in terms of the time irreversibility. Interestingly, we found that the GARCH (1,1) model can reproduce the time irreversibility only during certain periods; the degree of time irreversibility of the real stock indices measured by DV-VG is much higher out of these periods. This result suggests that though the GARCH model has become a mature model of realworld stock indices in general, it still lacks the capability in capturing the time irreversibility of financial time series.
As the final remark, we propose three possible applications of our method (i.e., the degree vector) for the future investigation. First, we can search specific geometric patterns from time series by employing the degree vector. For example, if the accelerated rise in a time series is of interest, one can search the degree vectors with large k RV in [e.g., v in (7, 0, 0, 0)] within DV-VG associated with the time series. This application may be useful for practical use, such as automated rule-based monitoring or anomaly detection. Second, because our method can quantify the topological property of a time series, we can compare the property between multiple different time series. We may be able to apply this comparability to the context of model selection or machine learning-based reproduction of similar time series. Finally, we may be able to employ the degree vector to measure other mathematical concepts that are important but are also difficult to define precisely, such as self-similarity, as we did for the concept of time (ir)reversibility of time series.

DATA AVAILABILITY STATEMENT
The datasets presented in this study can be found in an online repository (https://github.com/ryutau/refined-timeirreversibility).

AUTHOR CONTRIBUTIONS
RM, RL, and YC contributed to the conception of the study; RM performed the data analyses and wrote the article; RL and CY helped perform the analyses with constructive discussions.