Mutual Information Based Analysis for the Distribution of Financial Contagion in Stock Markets

This paper applies mutual information to research the distribution of financial contagion in global stock markets during the US subprime crisis. First, we symbolize the daily logarithmic stock returns based on their quantiles. Then, the mutual information of the stock indices is calculated and the block bootstrap approach is adopted to test the financial contagion. We analyze not only the contagion distribution during the entire crisis period but also its evolution over different stages by using the sliding window method.The empirical results prove the widespread existence of financial contagion and show that markets impacted by contagion tend to cluster geographically.The distribution of the contagion strength is positively skewed and leptokurtic.The average contagion strength is low at the beginning and then witnesses an uptrend. It has larger values in the middle stage and declines in the late phase of the crisis. Meanwhile, the cross-regional contagion between Europe and America is stronger than that between either America and Asia or Europe and Asia. Europe is found to be the region most deeply impacted by the contagion, whereas Asia is the least affected.


Introduction
From the "Black Monday" in 1987 to the recent European sovereign debt crisis, the world has experienced several severe financial crises in the past few decades [1].These crises spread panic in markets, causing not only a plunge in assets prices but also a grave deterioration of the financial and economic systems.Usually, the shock caused by the financial crisis is not confined to the country of its origin.It also affects other countries, spreading like a contagious virus [2].To study this phenomenon, researchers introduced the concept of financial contagion.In this paper, we adopt the widely used definition from Gallegati et al. [3][4][5].They defined financial contagion as a significant increase in cross-market linkages after a shock to one country or group of countries [6].
As globalization is one of the main features of the contemporary world economy, researching financial contagion is helpful for investors and policymakers [7][8][9].This field has already attracted many studies.For example, Caporale and Arestis examined the Asian stock markets during the 1997 Asian financial crisis and found evidence of contagion [10,11].
Using a regression-based approach, Van Horen et al. tested the data of five Asian foreign exchange markets [12].To analyze the US subprime crisis, Chen et al. applied a multifractal volatility method to study the high frequency data of the US and Chinese stock markets [13].Dungey et al. studied the daily data of stock indices using different methods.All of them discovered evidence for contagion [14][15][16].Wen and Guo explored the contagion effect across different types of markets [17,18].To understand the European sovereign debt crisis, Suh analyzed sovereign debt yields data and discovered that the contagion varies drastically with time [19].Ahmad and Dewandaru explored the contagion in stock markets and discovered evidence of its impact [20,21].Shen et al. researched the contagion effect of the European debt crisis on the Chinese market.They found that the contagion had a significant influence on the macro economy channel but limited impact on the psychology of investors in the Chinese market [22].
In this paper, we apply mutual information (MI) to research financial contagion.The correlation coefficient, Kendall's tau, Spearman's rho, and copula are typical statistical methods for measuring financial contagion [6,[23][24][25].However, the correlation coefficient can only measure linear correlation and cannot capture nonlinear dependence commonly observed in stock markets [26,27].Kendall's tau and Spearman's rho can only detect the monotonic functional dependence [28].Although copula can capture both linear and nonlinear dependence, one needs to select certain copula functions before adopting it as a method [29].This introduces an element of subjectivity.Compared with these methods, MI has three main advantages.First, it measures both linear and nonlinear dependence [30][31][32].Second, it does not make any assumption on the underlying relationship of the variables [33].Thus, it is independent of the model and completely data driven.Third, it is robust to noise [34].There are also two main drawbacks of MI.It is computationally expensive and its analytical statistical test is generally unavailable [35,36].The bootstrap method can be used to infer the statistical features of MI [37].As computer technology advances, the computation time taken by a personal computer is acceptable and MI has already been applied in many disciplines [38][39][40][41][42][43].
This article researches financial contagion using a multimarket perspective and concentrates on the regional characteristics of the markets affected by the contagion.It mainly studies the following questions: (1) How is the financial contagion distributed in the stock markets?(2) How does the distribution of the contagion evolve during the crisis period?(3) Which region is impacted most by the financial contagion?Which one is the least affected?
The rest of this paper is organized as follows.Section 2 introduces the data and methods.Section 3 displays the empirical results and gives some analyses and discussions.Section 4 concludes the paper.

Data and Methods
2.1.Data.In this paper, 32 stock markets were researched for analyzing the US subprime crisis, which delivered a strong shock to the world's economy.These markets span four continents and we divide them into three groups, according to their geographical location.All data was downloaded from the WIND database which is a commercial finance information provider in China.We choose the same time range and period division in the literatures [44,45].The data is from January 3, 2005, to December 7, 2009.This range is further divided into the precrisis and crisis period.The precrisis period extends from January 3, 2005, to July 31, 2007.The crisis period begins on August 1, 2007, and ends on December 7, 2009 [44, 45].Table 1 displays the names and numbers of these countries (or regions) and their stock indices.
As stock markets are not open on weekends and festivals, the data is unavailable on these days.To deal with this circumstance, we follow Chiang and Voronkova to consider that the stock price stays the same as the latest trading day [46,47].
Since different markets have different trading hours, Forbes and Rigobon applied rolling average two-day return to deal with the effect [6].However, it was found that the results obtained were not significantly different.A drawback with this method is that it tends to introduce serial correlation [46].Considering the weekly return was another solution proposed by researchers [48], but most of the daily information gets ignored in this approach.The lagged return method was also considered in the literature [49].However, this approach may bring in more random noise [50].Therefore, we leave this topic for future research and follow the literatures [16,25,45,51] by using unlagged daily data in this paper.
The logarithmic returns for daily closing price are calculated by formula (1) and we use them for further computation.All computation programs are implemented by MATLAB software.
where () stands for the logarithmic return and () and ( − 1) denote the daily closing price of time  and time  − 1, respectively.

MI.
To introduce MI, we at first present the Shannon entropy () which is crucial for information theory.It is defined as where () is the probability of .It measures the extent of uncertainty.The base of the logarithm is commonly chosen as 2; the unit is the bit.Another important concept is the joint entropy (, ) which is described as where (, ) is the joint probability of  and .
The definition of MI between  and  is given in the following formula [52]: According to formulas (2) and (3), MI could be rewritten as the following formula [53]: MI (, ) =  () +  () −  (, ) . ( MI measures the information which one variable discloses about another one.And if two variables are interdependent, their MI will be greater than zero.Stronger interdependence produces larger MI [31]. We concentrate on the extreme events that are usually caused by financial crises.With reference to Dimpfl et al. [54][55][56][57], the 0.05 and 0.95 quantiles are suitable thresholds for the normal and extreme values, respectively.We follow the method of Dimpfl and Sensoy [54,55] to symbolize the stock returns using formula (6).Symbol 0 means normal returns, whereas the symbols −1 and 1 stand for extreme returns.The range of symbol 0 keeps wide to reduce the effect of normal pattern [55].
where  = 0.05 and   and  1− are the  and 1 −  quantiles, respectively.After the symbolization, we calculate the MI according to the above definitions.In order to examine the robustness of the results, we also analyzed the results obtained by using  = 0.01,  = 0.1, and  = 0.15.

Contagion Test and Measure.
In this article, we concentrate on the regional features of the financial contagion, and thus we follow the literatures [8,58,59] to adopt an undirected symmetric measure.Following the definition of Gallegati [3], contagion occurs when the cross-linkages between markets increase significantly after a financial shock.We test this by examining whether the MI rises significantly after the US subprime crisis breaks out.
For the period  which is the entire or a sliding window of the crisis period, let  and  be two symbolized stock return series; the null hypothesis supposes that there is no significant increase of MI and no contagion between  and .The hypotheses are described as follows: where MI  pre and MI   are the MI values of  and  during the precrisis period and period , respectively.
Here, we apply the block bootstrap method for the statistical inference.For time series  1 ,  2 , . . .,   , its procedure is as follows [60].

(8)
Step 1. Sample uniformly with replacement to choose  + 1 blocks out of the −+1 blocks where  = floor(/); floor(⋅) is the function which gets the integral part.
We implement the above procedures 1000 times on the precrisis period and period  data of  and .We sample  and  simultaneously.This means whenever   is selected,   is selected [62].We calculate every time the MI values MI  pre and MI   for the two bootstrap samples of the precrisis period and period .Then, their difference At last, we could get the distribution of    which is approximate to that of MI  pre − MI   .With reference to Mills and Shrout [63,64], we can get the one-side bootstrap confidence interval (−∞,  1− ], where  1− is the 1− quantile of the    distribution.In this paper, we take  as 5%.If 0 is not in the confidence interval, the null hypothesis is rejected at the significance level of .Thus, we can consider that the contagion happens in period .Otherwise, we consider there is no contagion. Following Da Silva et al. [59], we adopt the increment in interdependence to measure the contagion strength (CS).If there exists contagion between the indices  and  in period , we represent CS   as shown in formula (9).If there is no contagion, CS   is 0.
The total contagion strength (TCS) of the market  affected is defined as the sum of contagion strength with other stock markets, as shown in the formula below: where  is the number of other stock markets.
To measure the contagion intensity of a group of markets, we define a variable called the group average contagion strength (GACS).The GACS for group ℎ is the average TCS of all markets in the group.It is given by the following formula: where  is the number of the markets in the group ℎ.
To measure the cross-contagion strength of two groups, we use average cross-group contagion strength (ACGCS).For the groups  and , the ACGCS  is the average contagion shared by a country in group  with a country in group .It is symmetric for groups  and  and is defined as where  and  are the numbers of countries in groups  and , respectively.

Maximum Spanning
Tree.Maximum spanning tree (MaxST) is a useful tool to analyze the structure of graphs [65,66].We use it in this study to analyze the structure of the contagion distribution.Kruskal's algorithm is generally used to construct a minimum spanning tree.Following Sarkar et al. [67], we modify it to build MaxSTs by taking the edges of the graph which maximize the sum of weights instead of minimizing it.The edge weight corresponds to the contagion strength.At the same time, the color map method, which is a convenient way to visualize the contagion spread, is applied.
In order to investigate the evolution of the contagion distribution, we apply the sliding window method during the crisis period.Jaccard similarity coefficient (JSC) [68] is adopted to measure the similarity of the MaxSTs of two consecutive windows.Formula (13) describes its definition.
where |() ∩ ()| means the number of the same edges in graphs  and .|() ∪ ()| is the number of the edges in the union set of graphs  and .

Empirical Results and Discussions
As it is lengthy to show the MI evolution of all stock markets, we at first analyze the evolution of the MI values between the US and G7 countries.These countries are chosen as they play a significant role in the world's finance and economy.The sliding windows are with the length of 300 days and the slide step is 10 days.From the results shown in Figure 1, we find that the curves could be divided into two parts at the 100th window, which begins on September 21, 2007.This is near the start of the subprime crisis.Before that time, the MI values between these countries are relatively low.However, after that time, a sudden spike is witnessed in all curves.This indicates an increase in interdependence and financial contagion.during the precrisis period.In Figure 2, we observe that the precrisis probability density curve is leptokurtic.The values concentrate around the mean value.During the crisis period, the probability density and cumulative functions support the notion that the values are more varied and usually larger.
We test the financial contagion between every pair of the stock markets and get a contagion matrix (CM) with the size of 32 × 32.The value of CM(, ) is the contagion strength CS   defined in formula (9). Figure 3 shows the color map of the CM for the entire crisis period.The numbers on the row and column axes are the numbers of the stock markets in Table 1.The color reflects the contagion strength.
In Figure 3, we find the widespread existence of the financial contagion phenomenon; moreover, it is found that its strength varies across markets.There are two regions in the map showing strong contagion.The first one is in the upper right corner corresponding to markets number 14 to number 32.These are the European and American markets, which show a strong effect of contagion.The other one is in the lower left corner corresponding to markets number 1 to number 13; however, the intensity of contagion in these markets is relatively lower.These are the Asian and Oceanian countries.The level of contagion in the remaining parts of the map is quite low.This indicates that markets in Asia and Oceania mainly share contagion with their geographical neighbors and have mild contagion with European and American countries.Despite relatively strong cross-regional contagion in the European and American region, we can still divide it into two subparts.The first subpart covers countries number 14 to number 26, all of which are in Europe.The second one is due to countries number 27 to number 32, which are all in the American region.Thus, it can be inferred that countries tend   to share contagion more with their geographical neighbors.
The GACS values for the Asian, European, and American regions are 1.7262, 3.4823, and 2.7393, respectively.We construct the MaxST according to the CM. Figure 4 describes the MaxST for contagion distribution during the entire crisis period.We can see that the nodes with the same symbol are connected with each other, which means that those in the same region tend to cluster.
Table 3 shows the statistics of the contagion strength across markets for the entire crisis period.It is inferred that the distribution does not follow a Gaussian distribution.It is right skewed, with a steeper peak.
In order to explore the evolution of the contagion distribution, we study it in each sliding window.The beginning time is the time which the subprime crisis began at.The window length is 300 days.And the slide step is 14 days.There are 40 windows in total.Figure 5 shows the statistics of the contagion strength in every window.
It can be observed that the mean value is low at the beginning and then witnesses an uptrend.Around the 30th window, the value starts to decrease but is still higher than that at the beginning of the selected time span.The standard deviation also increases gradually at first and gets smaller in the closing phase.The skewness is always above 0 and the kurtosis is above 3, indicating that the distribution is positively skewed and leptokurtic.The Jarque-Bera tests are all significant at the 0.1% level, confirming that the distribution is not normal.
We select four representative windows to display the color maps.The 5th, 15th, 25th, and 35th windows are selected.And the starting dates of the windows are 2007.9.27, 2008.2.14, 2008.7.3, and 2008.11.20, respectively.The 5th window represents the early stage of the crisis.The 15th and 25th windows cover the middle stage.The 35th window is from the late phase of the crisis.Figure 6 shows the color maps for these windows.In order to compare them, the color bar has been adjusted to the same range.
From Figure 6, it can be found that the contagion strength is very low in the 5th window.The European region and Asian region, which includes two Oceanian countries, have relatively stronger contagion.The contagion in the American region is weak.Moreover, the cross-regional contagion effect of the three regions is slight.In the 15th window, the contagion intensity has increased.All three regions show greater contagion and the cross-regional contagion gets stronger as well.In the 25th window, the contagion strength continues to grow.In the 35th window, the contagion starts to weaken.However, both Europe and America display a relatively strong contagion effect.The contagion in the Asian region has become mild.The cross-regional contagion exists mainly between the European and American markets.From the figure, we can conclude that contagion is relatively weak early on, becomes stronger in the middle stage, and weakens in the later stage.The European region experiences relatively strong contagion throughout.We calculate the GACS and ACGCS values for the European, American, and Asian groups.In Figure 7, we can see that the values are low at first, followed by an uptrend.In the middle phase, we see a surge in values.There is a decline in the later stage.The mean GACS values for the European, American, and Asian groups are 3.9918, 3.2212, and 2.1805, respectively.Europe is the region which is worst impacted.The mean ACGCS values for Europe-America, America-Asia, and Asia-Europe are 0.1212, 0.0540, and 0.0593, respectively.The cross-contagion intensity between European and American regions is stronger than the intensity between these two regions and Asia.
Figure 8 presents the MaxSTs for the CMs of the 5th, 15th, 25th, and 35th windows.The structures of these trees are different, but countries in one region still tend to connect with other countries from that region.
The JSC values of the MaxSTs in two consecutive windows are presented in Figure 9.The number on the row axis is the number of the sliding windows.We can see that the values fluctuate and the mean value of these windows is 0.7051.Since each slide step covers two weeks, we can infer that, on average, the structures of the MaxSTs evolve steadily.
In order to examine the robustness of the results, we also apply  = 0.01,  = 0.1, and  = 0.15 in formula (6) to symbolize the returns and compute the results.Figure 10 shows the MaxSTs of the contagion distribution for the entire crisis period under these  values.Although the structures of these trees vary, countries still tend to cluster geographically.
Figure 11 shows the GACS and ACGCS values for  = 0.01,  = 0.1, and  = 0.15.It can be observed that when  = 0.1 or  = 0.15, the curves are similar to the ones in  Figures 11(d), 11(e), and 11(f), it also can be observed that the cross-regional contagion strength with respect to Europe and America is stronger than that between Europe and Asia, as well as that between Asia and America.

Conclusions
Using the data from 32 stock markets, we utilized MI to research the distribution of the financial contagion in this paper.We symbolized the stock returns based on their quantiles and calculated the MI values for the stock markets.
Following the definition, we then applied the block bootstrap algorithm to test the financial contagion by examining whether there is a significant MI increase during the crisis period.We researched not only the contagion distribution for the entire crisis period, but also the evolution of the distribution by using sliding windows.Besides these, the robustness of the results was also analyzed.
The empirical results show that financial contagion is widespread in the stock markets and the countries that suffer contagion tend to cluster geographically.With the deepening of financial globalization, the interconnections among different countries have increased greatly.This provides convenience for the transmission of financial distress [69].Meanwhile, regional economic integration contributes to the sharing of contagion with neighboring markets.The distribution of contagion strength is found to be right skewed and leptokurtic, which suggests the heterogeneity of the contagion.The results indicate that Europe experienced strong contagion throughout the crisis period.Asia was the least affected region.Europe and America had a relatively higher level of cross-regional contagion.Since European economies are highly integrated, one country's financial turmoil easily propagates to other countries in the region.On the other hand, the interdependence of Asian stock markets is weaker than of America and Europe [70].This not only abates the transmission of the contagion but also makes the Asian region a possible area for portfolios diversification.We also find that the contagion grows from weak to strong and then weakens again towards the end of the crisis.The mean JCS value is found to be high, indicating that, on average, most of the links of the MaxSTs in two consecutive windows remain intact.This implies that the spread of contagion between stock markets is not instantaneous.It tends to persist and evolve steadily.
This research suggests that it would be useful for policymakers to consider the impact of contagion from other markets, especially neighboring ones, when framing policies to deal with a financial crisis.Further, international cooperation and communication could help in halting the transmission of the financial turmoil.Our research also supplies reference for assets managers who diversify portfolios internationally.Investing in the markets which are less affected by financial contagion could be a possible way for avoiding losses.Furthermore, this study provides literature for understanding the mechanism of financial contagion.

Figure 1 :
Figure 1: The evolution of the MI values between US and G7 countries.

Figure 2 :
Figure 2: The probability density function curves (a) and the cumulative probability function curves (b) for the MI values of the entire precrisis and crisis periods.

Figure 3 :
Figure 3: The color map of the contagion distribution for the entire crisis period.

Figure 4 :Figure 5 :
Figure 4: The MaxST of the contagion distribution for the entire crisis period.Asian and Oceanian markets are shown as yellow circles.European markets are shown as blue triangles.American markets are shown as red squares.

Figure 6 :
Figure 6: The color maps of the contagion distribution in different windows.(a) The color map for the 5th window.(b) The color map for the 15th window.(c) The color map for the 25th window.(d) The color map for the 35th window.

Figure 7 .Figure 7 :
Figure 7: (a) The GACS values for European (blue line), Asian (black line), and American (red line) groups.(b) ACGCS values for the three groups: Europe-America group (green line), Asia-Europe group (yellow line), and America-Asia group (magenta line).

Figure 8 :
Figure 8: The MaxSTs for the contagion distribution in different windows.(a) The MaxST for the 5th window.(b) The MaxST for the 15th window.(c) The MaxST for the 25th window.(d) The MaxST for the 35th window.Asian and Oceanian markets are shown as yellow circles.European markets are shown as blue triangles.American markets are shown as red squares.

Figure 9 :Figure 10 :
Figure 9: JSC values for the MaxSTs in sliding windows.

Table 1 :
Details of the 32 countries (or regions) and their stock indices.

Table 2
describes the statistical properties of the MI values between the 32 stock indices.We can see that the value of average MI during the crisis period is larger than that

Table 2 :
Descriptive statistics of the MI values for the 32 stock indices.

Table 3 :
Descriptive statistics of the contagion strength for the entire crisis period.