Regularity in Stock Market Indices within Turbulence Periods: The Sample Entropy Approach

The aim of this study is to assess and compare changes in regularity in the 36 European and the U.S. stock market indices within major turbulence periods. Two periods are investigated: the Global Financial Crisis in 2007–2009 and the COVID-19 pandemic outbreak in 2020–2021. The proposed research hypothesis states that entropy of an equity market index decreases during turbulence periods, which implies that regularity and predictability of a stock market index returns increase in such cases. To capture sequential regularity in daily time series of stock market indices, the Sample Entropy algorithm (SampEn) is used. Changes in the SampEn values before and during the particular turbulence period are estimated. The empirical findings are unambiguous and confirm no reason to reject the research hypothesis. Moreover, additional formal statistical analyses indicate that the SampEn results are similar both for developed and emerging European economies. Furthermore, the rolling-window procedure is utilized to assess the evolution of SampEn over time.


Introduction
The vast majority of the literature in finance relies on the informational market efficiency assumption, which implies unpredictability of financial markets. The concept of informational efficiency is central in finance and it is strictly connected with the Efficient Market Hypothesis (EMH) [1]. An efficient market is defined as one in which new information is quickly and correctly reflected in current security prices [2]. The classic taxonomy of information sets distinguishes between: (1) weak-form efficiency (the information set includes only the history of prices or returns), (2) semi-strong-form efficiency (the information set includes all public available information), and (3) strong-form efficiency (the information set includes all information known to any market participant) [3]. Although the EMH is simple in principle, it remains an elusive concept [4]. Therefore, testing for efficiency and predictability of markets is difficult, which implies that empirical results are ambiguous [2].
There is an important strand of the existing literature, known as Algorithmic Information Theory (AIT), that explores predictability in terms of sequential regularity of time series based on the existence of patterns. The AIT could be employed to investigate the regularity/irregularity in data series by analyzing its entropy [5].
Entropy was defined by Shannon as a measure of information, choice and uncertainty [6]. The concept of entropy has originated from physics (precisely, from thermodynamics), but it has been employed in various research fields to assess the information content of a probability distribution, and to describe the complexity of a system. Entropy properly characterizes the uncertainty, particularly the unpredictability, of a random variable [7]. The highest uncertainty of the system corresponds to the highest entropy.
are illustrated with the corresponding graphs which indicate that entropy (measured by SampEn) substantially decreased during the COVID-19 pandemic, especially in March-April 2020.
Second, the results are similar both for developed and emerging economies, and document that entropy of European developed markets does not differ significantly compared to the European emerging markets. Therefore, the findings do not support the hypothesis that developed markets are generally more efficient than emerging ones (see, e.g., [35]).
The value-added of this research derives from novel empirical findings that have not been reported in the literature thus far. These findings are important for academics and practitioners as they support the thesis that a sequential regularity in financial time series exists and even rises during extreme event periods, which implies a possibility of returns prediction. To the best of the authors' knowledge, this is the first comparative study that investigates the group of 36 European stock markets in the context of their sequential regularity measured by SampEn.
The rest of this study is organized as follows. Section 2 presents a brief literature review. Section 3 describes the methodological background concerning the SampEn algorithm and contains data description. Section 4 presents and compares empirical results on the European stock markets and the U.S. market. The last section summarizes and discusses the main findings and indicates some further research directions. The paper is supplemented with three appendixes.
For instance, Zunino et al. [8] introduce and utilize two quantifiers for stock market (in)efficiency, namely the number of forbidden patterns and the normalized permutation entropy. Maasoumi and Racine [36] use a metric entropy measure of dependence to examine predictability of stock market returns. Oh et al. [37] assess efficiency of 17 foreign exchange markets using the approximate entropy approach. Risso ( [35,38]) investigates informational efficiency of various stock market indices utilizing the Shannon entropy and the symbolic time series analysis. Eom et al. [39] evaluate the relationship between efficiency and predictability in 27 stock markets. They use the Hurst exponent and the approximate entropy procedure to analyse a long period of time. Gu [40] aims to predict the DJIA Index values in both short-term and long-term employing the multi-scale Shannon entropy. Ortiz-Cruz et al. [41] investigate informational complexity and efficiency of several crude oil markets with the multi-scale approximate entropy approach. Liu et al. [42] develop the conditional entropy and the transfer entropy to accommodate various trading activities in the context of market efficiency. Alvarez-Ramirez et al. [46] use entropy methods for measuring a time-varying structure of the U.S. stock market informational efficiency. Bekiros and Marcellino [43] propose a new wavelet-based approach with minimum-entropy decomposition to explore predictability of currency markets at different timescales. Gencay and Gradojevic [44] use parametric and non-parametric entropy-based methods in order to obtain an early indication of financial crisis and to predict market behavior. Wang and Wang [45] employ a multi-scale entropy-based method to analyse efficiency of various financial time series during the COVID-19 pandemic. Kim and Lee [21] use the approximate entropy, the sample entropy, and the Lempel-Ziv measure for the complexity of a time sequence to investigate predictability in cryptocurrency markets during the pandemic period. However, studies that deeply explore wide groups of stock markets in the context of their regularity and predictability are scarce.

Methodological Background and Data Description
This section presents the methodological background concerning the Sample Entropy algorithm (SampEn) and contains the real-data description.

The Sample Entropy Algorithm
In this research, the SampEn algorithm code in R has been implemented based on the paper [5], and therefore the similar notation has been used.
Let us consider a time sequence u = {u(1), u(2), . . . , u(N)} of length N, an integer 0 ≤ m ≤ N, which is the length of sequences to be compared, and a real number r > 0, which denotes the tolerance for accepting matches. The parameters N, m, and r must be fixed for each computation.
The vectors x m (i) = {u(i), u(i + 1), . . . , u(i + m − 1)} and x m (j) = {u(j), u(j + 1), . . . , u(j + m − 1)} are defined and then the Chebyshev distance between them is calculated based on Equation (1): The number of vectors x m (j) within r of x m (i) without allowing self-counting is defined by Equation (2): In the next step, the total number of possible vectors B m (r) is calculated based on Equation (3), and it denotes the empirical probability that two sequences match for m points: Analogically, the number of vectors x m+1 (j) at a distance r of x m+1 (i) without allowing self-matching is defined by Equation (4): Next, the total number of matches A m (r) is computed based on Equation (5), and it denotes the empirical probability that two sequences are similar for m + 1 points (matches).
Since the number of matches (A m (r)) is always less than or equal to the number of possible vectors (B m (r)), the ratio A m (r) B m (r) < 1 is a conditional probability [5]. In the last step, the SampEn value of the time sequence u is computed as follows: The SampEn(m, r, N) given by Equation (6) is the statistical estimator of the parameter SampEn(m, r): For regular, repeating data, the term B m (r) in Equation (7) nears one, and therefore Sample Entropy nears zero [47].

Real-Data Description
The data set includes daily observations for the 36 European stock market indices and the S&P500 index. The sample covers the period from January, 2006 to December, 2021. The returns of stock market indices are calculated as daily logarithmic rates of return given by Equation (8): where P t is the daily value of the particular market index on day t. Table 1 presents brief information about all analyzed indices, in order of decreasing value of stock market capitalisation in 31 December 2020, as well as the basic statistics for daily logarithmic rates of return within the whole sample period. Several results in Table 1 need comments. The sample means are not statistically different from zero. The test statistic for skewness and excess kurtosis is the conventional t-statistic. The measure for skewness indicate that almost all series are skewed at the 0.05 level of significance, except for Cyprus (p-value 0.287) and Bosnia and Herzegovina (p-value 0.894). The values of excess kurtosis show that all series are highly leptokurtic with respect to the normal distribution. Furthermore, the Jarque-Bera (J-B) test [48] rejects normality for each return series as all of the J-B statistic values are greater than 3505 with the p-value approximately equal to zero (these values are not reported in Table 1 but are available upon a request). It is worth noting that the obtained empirical findings are typical for return time series and are consistent with the literature (e.g., [49]). The similar Tables A1 and A2 that report the basic statistics for daily logarithmic rates of return within the turbulence sub-periods are presented in Appendix A.

Results
This section presents empirical findings concerning sequential regularity and predictability of the 36 European stock markets and the U.S. market within the turbulence periods.

Empirical Experiments
In this subsection, the research hypothesis proposed in Introduction is examined. Changes in the SampEn values for the pre-turbulence and turbulence periods are estimated to assess whether entropy of equity market indices decreased during extreme event periods. To calculate the changes in entropy before and during the particular turbulence period, the following pairs of sub-periods of equal length are investigated:
An important expected feature of the SampEn algorithm is the relative consistency (e.g., [20,50]). This property follows from the Kolmogorov-Sinai definition of entropy [17]. The notion of relative consistency was introduced by Pincus [19]. In terms of the SampEn procedure, this can be written as the following property: This property means that if series A exhibits more sequential regularity than series B for one set of the parameters (m 1 , r 1 ), then this holds true for any other set (m 2 , r 2 ) [20]. This expected property enables us to compare two processes for a single set (m 1 , r 1 ) and draw conclusions for all sets of input parameters.
As mentioned in Section 3.1, the SampEn statistic depends on three parameters: N, m, and r, where N is a time series length, m is the length of sequences to be compared, and a real number r > 0 denotes the tolerance for accepting matches. Based on the literature, the suggestion is that m should be 1 or 2, since there are more template matches for m = 1, but m = 2 (or greater) reveals more of the dynamics of the data. Moreover, the authors of the SampEn procedure suggest that r should be 0.2 times the standard deviation σ of the empirical data set [47]. Therefore, in this research, the m = 2 and r = 0.2σ parameters are used. Table 2 includes the SampEn empirical findings within the Global Financial Crisis and COVID-19 pandemic outbreak. The columns entitled 'Change' report changes in entropy before and during particular turbulence period. The down arrows show entropy decrease, while the (rare) up arrows visualize entropy increase.  Table 2 require some explanations and interpretations. In general, the empirical findings are unambiguous and confirm no reason to reject the research hypothesis. The evidence is that entropy decreased within the GFC period for the U.S. and the vast majority of the European markets, except for nine countries (i.e., Switzerland, Sweden, Finland, Ireland, Serbia, Malta, Cyprus, Estonia, Bosnia and Herzegovina). Both developed and emerging markets are among them. The probable reason of the differences in the obtained results is that the GFC periods for some countries were slightly different (for details see, e.g., [33]).
However, the comparative results for the pre-COVID-19 and COVID-19 sub-periods are homogenous and they decidedly support the evidence that regularity and predictability of the U.S. and almost all European stock markets (apart from Ukraine) increased during the COVID-19 outbreak. Due to the investigated period (2020-2021), the isolated case of Ukraine is rather coincidental and is not connected with the Russian aggression in Ukraine on 24  To formally test whether the mean results of SampEn for the whole group of markets during the turbulence period differ significantly compared to the corresponding pre-turbulence period, the t statistic for sample means given by Equation (9) is utilized: where x 1 and x 2 are sample means, s 2 1 and s 2 2 are sample variances, while n = 36 denotes the stock markets sample size.
The following two-tailed hypothesis is tested: where µ 1 and µ 2 are the expected values of SampEn for the whole group of stock market indices during the compared periods, and the null hypothesis states that two expected values are equal. Calculations of the t statistic values (Equation (9)) are based on the results presented in Table 2. The null hypothesis is rejected when |t| > t * , where the critical value of t-statistic at the α significance level is equal to t * = t α;2n−2 . In our research, the critical values are equal to: t * = 1.667 (α = 0.10), t * = 1.994 (α = 0.05), and t * = 2.648 (α = 0.01), respectively. The obtained empirical t-statistics are equal to: (1) t = 3.325 > t * for the pair of periods (pre-GFC, GFC), and (2) t = 5.036 > t * for the pair of periods (pre-COVID, COVID). This indicates that the H 0 hypothesis was rejected in both cases and the SampEn mean values substantially differed (specifically, decreased) during both extreme event periods.
What is important, the SampEn findings are consistent with the literature as they confirm that entropy of stock market indices usually decreases during the economic downturns (see, e.g., [41,45]). The equity market crash initiates a declining trend, which reduces entropy but increases time series regularity. As a consequence, predictability of a market increases within turbulence periods since a number of repeated patterns increases. It is worth noting that this evidence is in accordance with investors' intuition.

Sample Entropy of Developed versus Emerging European Stock Markets
An interesting and important question is whether developed stock markets differ substantially from emerging markets in their predictability, in the sense of their sequential reg-ularity. Therefore, in this subsection, the comparative assessment of regularity/irregularity in the European developed and emerging markets is presented.
Based on the recent MSCI reports, and especially on the report "MSCI Global Market Accessibility Review. Country comparison" [51], the following 15 European countries are classified as developed markets (in the order of decreasing value of stock market capitalisation in 31 December 2020 reported in Table 1): France, United Kingdom, Germany, Switzerland, Netherlands, Sweden, Spain, Italy, Denmark, Belgium, Finland, Norway, Ireland, Austria, and Portugal. The remaining 21 European countries are recognized as emerging, including also frontier and stand-alone equity markets (see Table A3 in Appendix B). Figure 1 presents the boxplots of the SampEn results within the pre-turbulence and turbulence periods, for two groups of the European developed (the yellow boxplots) and emerging (the green boxplots) stock markets. The boxplots that visualize the SampEn results are based on Tables A4 and A5 (Appendix B). The boxplot width depends on the number of the stock market indices, and these numbers are: 15 (the European developed markets) and 21 (the European emerging markets). One can observe that entropy measured by the SampEn statistic substantially fell during the turbulence periods compared to the pre-turbulence periods, respectively. The down arrows in Tables A4 and A5 illustrate the substantial falls of median and percentile values.
The SampEn median for the European developed markets was equal to 1.88 (within the pre-GFC period) versus 1.79 (within the GFC period). Similarly, the corresponding SampEn median values for the European emerging markets were equal to: 1.74 (within the pre-GFC period) and 1.53 (within the GFC period), respectively (see Table A4).
As for the pre-COVID-19 and COVID-19 sub-periods, the changes in entropy were even more significant. For the European developed markets the SampEn median values were equal to 2.04 versus 1.58, while for the European emerging markets, 1.96 versus 1.59 (see Table A5).
To formally test the hypothesis concerning the median values within pre-turbulence and turbulence periods, the following conditions are proposed: where Me 1 is a SampEn median value before particular turbulence period, while Me 2 denotes a SampEn median value during a turbulence period, respectively. The null hypothesis states that two median values are equal. To examine the hypothesis, the Wilcoxon-Mann-Whitney test [52] is used and the calculations are reported in Table 3. The numbers in brackets are p-values. The test results indicate that the null hypothesis H 0 should be rejected in all cases, both for developed and emerging markets. Hence, the evidence is that the median values during the turbulence periods were significantly lower compared to the corresponding pre-turbulence periods. The boxplot height means the interquartile range, which is a measure of statistical dispersion as it is equal to the difference between Q3 (75th) and Q1 (25th) percentiles. The evidence is that the level of entropy dispersion for the European developed market indices was similar and low, regardless of the time period choice. The results for the European emerging markets are mixed, but the main probable reason is that these markets are much more diverse. However, one can observe that the interquartile range for the emerging markets has substantially decreased during the turbulence periods (see Tables A4 and A5).
The singular points denote outliers. The SampEn outliers were: (1) within the GFC period: Switzerland, Finland, Turkey, Poland, Cyprus (significantly higher values of the Sam-pEn) and Slovakia (significantly lower value of the SampEn), (2) within the pre-pandemic period: Finland (significantly higher value of the SampEn) and Bosnia and Herzegovina (significantly lower value of the SampEn), and (3) within the pandemic period: Denmark (significantly higher value of the SampEn) and Slovakia and Bosnia and Herzegovina (significantly lower values of the SampEn). Within the pre-GFC period outliers did not appear.
To formally test the hypothesis concerning the comparison between the SampEn median values of the European developed and emerging stock markets within various sub-periods, the following H 0 and H 1 conditions (Equation (12)) are proposed: where Me 1 is a SampEn median value of the group of the European developed markets, while Me 2 denotes a SampEn median value of the group of the European emerging markets, respectively. The null hypothesis states that two median values are equal. To examine the hypothesis, the Wilcoxon-Mann-Whitney test [52] for two independent groups is used, and the calculations are reported in Table 4. The numbers in brackets are p-values. The test results indicate that the null hypothesis H 0 should be rejected only during the GFC period (p-value 0.0019), while there is no reason to reject the null hypothesis for other periods. Therefore, the evidence is that the SampEn median values did not differ significantly between developed and emerging markets during the remaining three sub-periods. To summarize, the findings for both the European developed and emerging equity markets are homogenous. The analyzed groups of market indices do not differ substantially in their sequential regularity. The aforementioned SampEn results indicate that entropy visibly fell during each extreme event period compared to the corresponding pre-event period. It implies that predictability of market indices rose, which confirmed no reason to reject the main research hypothesis.

The Evolution of Sample Entropy over Time
In this subsection, the evolution of SampEn over time is analyzed. A rolling-window dynamic approach is employed to capture the changes in market index regularity (measured by SampEn) through time, for daily logarithmic index returns.
In line of the existing literature, the sample size N should be within the range of [10 m , 30 m ] (see, e.g., [5,45]). As pointed out in Section 4.1, in this research m = 2, hence the minimal time window length should be equal to 100. Therefore, a window N = 100 business days is utilized in this study.
The broad group of 36 stock markets is explored. The use of the rolling-window method requires the corresponding figures that show the changes in SampEn over time. Hence, it should be 36 × 2 = 72 figures reported in the paper as the graphic representation of the rolling-window procedure. Therefore, only selected dynamic SampEn results for developed and emerging markets are illustrated, i.e., the results for stock markets with the highest absolute value of the change in SampEn (based on Table 2). Due to the space restriction, the remaining figures are available upon a request.
Subsequent Figures 2-4 show the evolution of SampEn over time within the period from January 2018 to December 2021 (two combined pre-COVID-19 and COVID-19 subperiods). Figures 2 and 3 present graphs for the European developed and emerging markets, respectively. Finally, Figure 4 plots the dynamics of SampEn for S&P500 index. The SampEn procedure implemented on the rolling-window scheme indicates and confirms that entropy visibly decreased during the COVID-19 pandemic, especially in March-April 2020, both for developed and emerging markets. It is rather clear that the main reason of such homogenous results is that all investigated stock markets have been affected by the COVID-19 pandemic in the same time and to the similar extent.
By analogy, the rolling-window procedure is utilized to investigate the evolution of the SampEn during the period from May 2006 to February 2009 (two combined pre-GFC and GFC sub-periods). The findings are reported and discussed in Appendix C.

Discussion and Conclusions
The goal of this empirical study was to investigate changes in sequential regularity in the 36 European and the U.S. stock market indices within major turbulence periods. Two periods were analyzed: the Global Financial Crisis in 2007-2009 and the COVID-19 pandemic outbreak in 2020-2021. To capture regularity in the daily time series of stock market indices, the SampEn algorithm was utilized. Changes in the SampEn values before and during the particular turbulence period were calculated and compared. The research hypothesis that entropy of an equity market index decreases during turbulence periods was examined. The main contribution of this research lies in important empirical findings which indicate no reason to reject the research hypothesis. Our research belongs to the strand of the literature known as Algorithmic Information Theory (AIT). The AIT explores predictability in terms of sequential regularity in various time series based on the existence of patterns.
The obtained results are homogenous and statistically significant for both investigated turbulence periods, and for both independent groups of stock markets (developed and emerging). The findings imply that regularity in stock market index returns increases during extreme event periods.
Our results contribute to the discussion concerning predictability of financial markets. It seems that the conclusions could be generalized as the SampEn empirical findings are in line with the relatively scarce previous literature which documents that entropy of various financial time series usually decreases during market crashes, financial crisis and other turbulence periods. For instance, Ortiz-Cruz et al. [41] utilized the multi-scale approximate entropy procedure and they indicated that returns from crude oil markets were less uncertain during economic downturns. Wang and Wang [45] assessed informational efficiency of S&P500 Index, gold, Bitcoin, and US Dollar Index during the COVID-19 pandemic with a multi-scale entropy-based method. They confirmed that a decline of entropy was particularly large for S&P500 Index. Moreover, their results of dynamic informational efficiency of the S&P500 Index are similar to ours. Risso [38] investigated several market indices during financial crashes. He showed that short-time market trends (both 'up' and 'down') usually reduce entropy of an index daily time series due to more frequent patterns.
Moreover, it is worth noting that, during the turbulence periods, all public information is especially important for investors and determines investment decisions. However, the used information set includes only the history of index returns. Therefore, our research relates to the literature concerning the weak form of market informational efficiency. The obtained results indicate that informational efficiency of stock market indices decreases during turbulence periods. This evidence is especially useful for investors as it provides information about a possibility of financial forecasting.
The findings of our research might be interesting for academics and practitioners since the entropy-based indicators can generate predictive signals and can be useful in predictive modelling (see, e.g., [44,53]). Moreover, there are some innovative applications of entropy for financial time series forecasting (see, e.g., [43,54]). Gradojevic and Caric [54] emphasize that although volatility and entropy are related measures of market risk and uncertainty, entropy can be more useful in predictive modelling. Taking the above into consideration, we hope that the results of our research could be generally of special importance for investors as the entropy-based procedures might be used as helpful tools in various systems that support investment decisions.
Since the analyzed GFC and COVID-19 periods have affected all financial markets in the world, the promising direction for further research could be an extensive comparative assessment of predictability in the context of sequential regularity in time series of stock market indices within the world, for instance in continent-based regions. Moreover, the influence of the recent extreme event, i.e., the Russian invasion in Ukraine, could be investigated.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

Appendix A. Basic Statistics for Sub-Periods
Tables A1 and A2 report the basic statistics for daily logarithmic rates of return within the turbulence sub-periods. N denotes the number of observations. The stock markets are presented in the same order as in Table 1.  Table A3 presents two groups of the investigated stock markets: (1) the European developed markets and (2) the European emerging markets. This division is the recent one since it is based on the report "MSCI Global Market Accessibility Review. Country comparison" [51].

Appendix B. Developed and Emerging Markets
Tables A4 and A5 report the SampEn basic statistics within the pre-turbulence and turbulence periods, respectively. Two groups of the European countries (presented in Table A3) are explored. Based on the MSCI report [51], in the market order as in Table 1. According to the literature, the financial crisis timeline, from the U.S. perspective, was marked by the following events: (1)  It is important to note that the crisis began in the U.S., but initially it did not fully and strongly affect all financial markets. For instance, Claessens et al. [30] identify five groups of countries based on the date they were affected by the crisis. Hence, the investigated stock markets were not affected by the GFC in the same time and to the same extent. This is the probable reason why empirical findings of the SampEn dynamics for various countries are ambiguous. Figure A1 shows the dynamics of SampEn of the S&P500 index. Moreover, Figures A2  and A3 illustrate the rolling-window dynamic results of the SampEn algorithm within the period from May 2006 to February 2009 (two combined pre-GFC and GFC sub-periods), for selected European developed and emerging markets, respectively. The highest absolute value of the change in SampEn (reported in Table 2) was the main criterion for the choice.
As reported in Section 4.1 (Table 2), formal statistical analyses confirm that the basic statistics of entropy (measured by SampEn) decreased significantly during the GFC period but, in general, the results are not such homogenous as in the case of the COVID-19 pandemic period. This evidence can be observed in Figures A1-A3.