Nonlinear dependencies on Brazilian equity network from mutual information minimum spanning trees
Mutual information minimum spanning trees are used to explore nonlinear dependencies on Brazilian equity network in the periods from June 2015 to January 2016 and from January 2016 to September 2016, corresponding to the government transition from President Dilma Rousseff to the current President Michel Temer, respectively. Minimum spanning trees from mutual information and linear correlation between stocks returns were obtained and compared. Mutual information minimum spanning trees present higher degree of robustness and evidence of power law tail in the weighted degree distribution, indicating more risk in terms of volatility transmission than it is expected by the analysis based on linear correlation. In particular, a remarkable increase of stock returns nonlinear dependencies indicates that Michel Temer’s period is more risky in terms of volatility transmission network structure. Also, we found evidence of network structure and stock performance relationship.
keywords:Stock market network, Emerging markets, Mutual information, Nonlinear dependence, Minimum spanning tree.
Financial Markets are complex systems whose structure and behavior are strongly dependent on their components interrelations. In particular, network theory has contributed to characterize and understand the behavior of financial markets. Previous studies indicate that market network structure may contain useful information to characterize and even to predict the market behavior such as the occurrence of a financial crisis. An interesting method to analyze such structures started with the seminal work of Ref. mantegna_1999-9u () using minimum spanning trees (MST). The MST is particularly suitable for extracting the most important information when a large number of linkages is under consideration. However, most of these studies are based on linear dependencies given by Pearson’s linear correlation coefficient miccich_2003-4w (); coelho_2007-Rg (); tabak_2010-Ab (); gilmore_2010-8b (); zhang_2011-iD (); heiberger_2014-lp (). Thus, it is important to introduce measures of nonlinear dependence between components of a network. In particular, mutual information is a promising alternative to Pearson’s coefficient as a measure of nonlinear dependence fraser_1986-gH (); kraskov_2004–8 (); kinney_2014-rB (). Actually, the combination of information theory and network analysis has already proved useful for research on financial markets dionisio_2004-Fg (); yang_2014-7H (); fiedor_2014-m1 (). Moreover, few studies kaya_2016 () systematically compares the networks generated through Pearson’s correlation with those generated through mutual information.
The Brazilian equity market is one of the most important in Latin America and of emerging markets. It has a significant number of worldwide big companies, like Itaú Bank (42nd), Bradesco Bank (67th), Vale do Rio Doce (2nd mining company) and Petrobrás (13rd oil & gas company), according to the latest Forbes ranking. Additionally, Brazil is currently the 9th largest economy in the world, according to International Monetary Fund. However, the country has been the target of a series of corruption and money laundering investigations, notably the largest operation of this kind in the world, the so called ”Lava Jato” (Car Wash) operation. This political turmoil has brought great volatility to financial market in recent years, even more after President Dilma Rousseff’s impeachment event in 2016. Inside this mess, the current president Michel Temer took on. Thus, understanding the economic and political role in the financial network is important. Concerning the Brazilian market, the few network-based studies are restricted to MST based on linear dependencies using Pearson’s correlation coefficient tabak_2010-Ab (); tabak_2009-KZ (). So, we consider important to extend this kind of analysis taking into account asset’s nonlinear interactions.
In this work we consider the role of nonlinear dependencies on the Brazilian equity network in a government transition period from president Dilma Rousseff to the current president Michel Temer. The main objective is to characterize both periods comparing the networks obtained from mutual information and Pearson linear correlation. We are interested in those periods because they are very dissimilar even during a short time window. While during Rousseff’s period, stocks values went down more than 40%, just six months after government transition, stocks valued up around 50%. We investigated such turbulence analyzing networks structures obtained from Bovespa’s high frequency stock returns. Our results suggest that the networks obtained from mutual information present a more interconnected overall dependence, with stronger volatility transmission structure, notably during Michel Temer’s period. Finally, the analysis of the network in the financial market via mutual information brings benefits to the investment decision making, particularly with regard to the analysis of the network structure and stock’s performance.
The article is organized as follows: in Section (2) we discuss the methodology to obtain and analyze mutual information minimum spanning trees. In Sec.(3) we present the data, and Sec. (4) shows the results by contrasting the networks obtained from mutual information with those obtained with Pearson’s linear correlation. Finally, in (5) we present the conclusion.
2.1 Nonlinear dependence and Minimum Spanning Tree
Here we are interested in analyze dependencies between stock price returns. The return of a given asset at time is defined by
where is the price of stock at time . To quantify the degree of dependence between assets we use a parameter based on mutual information. The mutual information between two stock returns and with joint probability density is defined as shannon_1948-5A (); cover_2005-yE ()
where and are the marginal densities of and , respectively. The MI is zero if the random variables and are statistically independent, i.e., if the joint density factorizes as . Also, it is well known that statistical independence imply the vanishing of Pearson’s correlation coefficient defined by
which is easily estimated from empirical data, and where stands for statistical mean. However, the vanishing of correlation does not in general imply that and are independent. Therefore, MI is a more general measure of dependence that goes beyond the usual linear relationship given by Pearson’s correlation.
On the other hand, Pearson’s correlation and MI are not directly comparable since the first one varies in the interval while the second one may assume values in the interval . Then, they should be scaled over the same range. In addition, the degree of linear dependence given by Pearson’s correlation is better associated with its absolute or its square value. In this paper we use a dependence coefficient whose definition is based on the fact that the MI for a bivariate normal density is given by cover_2005-yE ()
Eq. (4) shows that correlation implies dependence for a bivariate normal distribution . Now, the inversion of Eq. (4) allows to define the following global coefficient of dependence joe_1989-GX (); dionisio_2004-Fg ()
which is limited to the interval , and can be compared with the linear correlation absolute value. In addition, a value of indicates nonlinear dependence.
With the global dependence coefficient we can define a distance function
which can be directly compared with a distance based on Pearson’s correlation coefficient
The distances defined by Eqs. (6) and (7) will be used to obtain the network minimum spanning tree (MST). The MST is a simply connected graph that connects all nodes with edges such that the sum of all edge distances is a minimum, thus reducing the information contained in dependence coefficients to edges. Kruskal’s algorithm kruskal_1956-0c () is one of the main algorithms for searching a MST. It adds new weaker links until there are no new additions without making a cycle. This process finishes when the graph is fully connected.
Furthermore, to obtain the MI and the coefficient of dependence in Eq. 5, we need to estimate the empirical density functions , , and from data. Here we use the non-parametric method of kernel density estimation silverman_1986-VY (); scott_2015-Ra (); moon_1995-4U (). For a -dimensional set of variables and the given data set whose density is to be estimate, the multivariate kernel density estimator with kernel and window widths is defined as
where the kernel function satisfies . In this work we use the Gaussian kernel, which for a radially symmetric standard multivariate normal distribution is written as
Besides, for the window bandwidth we use the criteria that minimizes the density mean integrated square error and whose optimal value for a multivariate Gaussian kernel is given by scott_2015-Ra (); moon_1995-4U ()
where is the sample standard deviation of variable , and for a bivariate kernel.
2.2 Network measures
We also calculate a variety of network measures to characterize the MSTs. An important aspect of financial networks are their degree distribution. For example, a power law distribution is typical of scale free networks where hubs are much more connected then what is expected by Poisson distribution of random networks. This lack of scale can be analyzed by the scaling parameter of a power law distribution, whose calculation is given by the maximum likelihood estimator barabasi_2016-uP ()
where are the observed degree values, , and is a cut-off parameter that can be estimated using Kolmogorov-Smirnov statistic clauset_2009-26 (). For this purpose, the R poweRlaw package powerR () is employed. Since we are interested in the strength of the dependencies, we use the weighted degree distribution in our analysis. This means that a given degree will be weighted by the values of or .
To estimate network’s financial systemic risk, we can determine its robustness coefficient, given by barabasi_2016-uP ()
where and are the degree distribution first and second moments, respectively. The robustness coefficient represents the fraction of nodes in a network that we need to remove to lose its component structure. Here, we use this metric to evaluate the network’s concentration structure. The bigger the nodes that are very highly connected (a hub), the higher the network’s robustness coefficient, until it approximates to 1.
In order to measure hubs strength individually, we use the node’s eigenvector centrality. This parameter indicates that a node is important if it is connected to other nodes that are also important. So, the centrality of vertex is defined by newman_2010-jW ()
where for us (or ) are the entries of the MST weighted adjacency matrix , is the largest eigenvalue of , and is the centrality of neighbors of .
Those measures are useful to identify volatility transmission in financial networks. Volatility transmission means that once a hub gets affected by certain volatility, it spreads that instability through its connections, possibly causing a financial instability. This same logic can be used for a variety of systems, like the power grid network. For example, on August 10, 1996, Oregon, a line carrying 1,300 megawatts sagged close to a tree and snapped, while its current was automatically shifted to two lower-voltage lines. However, these too failed. This day, a full blackout happened in 11 US states. In this example, that line (a hub) had a significant energy that could not be tolerated by the other nodes if it fails, possibly causing a cascade effect. In financial networks, an important asset (hub) can also be affected by a certain volatility, such as a news about an accounting fraud in a big bank. Then, quickly many others might feel the impact of the news, especially if they have with it a strong dependence. Thus, a high value of robustness coefficient means that the network has a strong interconnected structure, that is, a significant overall dependence among assets. More, that it has a very significant hub. In this way, there’s more probability that a great turmoil affects more and more stocks, like in a domino effect dobson_2007-mp ().
The data set for this paper comes from the Bovespa Index (Ibovespa), which comprises a portfolio of the main Brazilian assets, and is the most important index of average performance for the Brazilian stock market prices. The share of each stock in the Ibovespa portfolio is directly related to its representativeness in terms of the number of trades and financial volume. This is given by the Stock Negotiability Index (SNI)
where is the number of deals with the stock , is the total number of trades, is the financial volume generated by the trades with the share, and is the total volume traded considering the spot market for all variables. We calculated the SNI from a window of 5 years (2012-2016) and selected the first 20% of the total shares with the highest negotiability. This sample gets almost 80% of the SNI, whose values were obtained from Economatica economatica ().
Our analysis is restricted to data from two periods that we consider relevant. The first period, from 06/01/2015 to 01/26/2016, was under the government of President Dilma Rousseff, with 159 trading sessions and index return of -42%, where we collected 3888 stock returns, given every 15 minutes. The second one, a period from 01/27/2016 to 09/08/2016, under the government of President Michel Temer, with 160 trading sessions and index return of 50%, where we obtained 3969 returns, given every 15 minutes. Data were collected from Bovespa ftp site bovespa (). It contains high frequency trading data for various Brazilian financial instruments. For this purpose, we used the GetHFData package from R software HFT ().
All statistical and network analysis obtained in this paper were carried out in R software, while Gephi was useful for network illustration design.
4 Results and discussion
Fig. 1a-b shows the MST network structure for the Dilma Rousseff’s (DR) period, obtained from the distances based on linear and global dependence, respectively. To identify individual differences, we highlighted into a square, stocks which may make up the portfolio that maximizes the so-called Sharpe index, through the efficient frontier selection technique sharpe_1964 (). This index selects portfolios with the best return-risk ratio. Fig. 2a-b shows the same as in Fig. 1 but for Michel Temer’s (MT) period. We observe that MST based on linear correlation the stocks with best Sharpe index are widespread throughout the network for both periods. For the mutual information MSTs, they are concentrated at the periphery for DR period, while they are more central for MT period. The mean distances for each network are depicted in the captions of Figs. 1 and 2, which shows that the MSTs based on MI are more concentrated, most notably during MT period.
To emphasize the role of nonlinear dependencies, we plot in Figs. 2(a) and 2(b) the frequency distribution of the absolute values of linear correlation and global dependence coefficient for DR and MT periods, respectively. For MT period, about 82% of the global dependence distribution is concentrated from 0.25 to 0.45, whereas for DR period this value is around 77%. In addition, there is a higher proportion of linear correlation values between 0 and 0.1 in MT period than in DR period, which means that the overall difference of mutual information and linear correlation is bigger in MT than in DR period. This conclusion is reinforced by Figs. 4a-b, where we show a pictorial representation of the symmetric matrix whose entries are given by the absolute value difference between the global dependence coefficient and linear correlation for both periods, and whose entries are represented by color intensity, so that dark points corresponds to a difference of at least . The higher concentration of dark points in Fig. 4b shows that this period is characterized by an increasing asset’s nonlinear dependence. In fact, the linear correlation structure in MT period has a lower overall dependence than in DR period, as shown in Fig. 3. This indicates that a risk analysis based on linear correlation for MT period is even less appropriate.
Figs. 4(a)-4(d) shows the weighted degree complementary cumulative distribution for the linear correlation network and the one obtained from the global dependence coefficient, highlighted in green the fit to a power law model, for both periods. In order to compare the tails decay we also include a log-normal density fitting (black line). By comparing Figs. 4(a)-4(c) with 4(b)-4(d), we see that the weighted degree distribution for linear correlation MSTs follows more closely the log-normal distribution, while for the mutual information MSTs the tail dependence is close to a power law. The power law tail is even more evident in Fig. 4(d), which corresponds to the period with more nonlinear dependencies. This tail behavior allows that we find nodes with very high degree values with a higher probability.
In Table 1, the assets were splitted into two groups, (a) containing the mean returns of the 20 assets with the highest and lowest eigenvector centrality, and (b) the mean weighted degree of the 20 stocks with the highest and lowest returns for the networks based on linear correlation and global dependence, and where and stands for mean and standard deviation of returns, and and are the mean and standard deviation of weighted degree. In this analysis, we are interested in setting the relationship between mean degree structure and stock returns. Table 1(a) shows that, in the MI networks, the most central stocks performed much better than the less central ones for MT period, and exactly the opposite happens for DR period. On the other hand, in the networks based on linear correlation the central and peripheral stocks present similar results. Table 1(b) shows that, in the MI networks, stocks with a very positive performance (return) have a mean weighted degree that is well above the weakest performance group, especially for MT period. That is far beyond what is verified by the network analysis via linear correlation. This indicates that MI networks contains much more useful information about the relationship between centrality and assets returns. For example, as shown in Table 1(a), if an investor, using the information of networks based on mutual information, put his money on the 20 assets with the largest centralities, during the MT period he would have gained 40% more than if he had only used an analysis based on linear correlation networks. Furthermore, for the DR period, if the investor uses the information of networks based on mutual information, he would also have saved almost 20% of loss, providing that he knows the strategy of investing in less central assets. In fact, in Table 1(b), we see that, in the MT period, the best assets returns are related to the highest weighted degree, and to the smallest in the DR period.
|Period||Dilma Rousseff||Michel Temer|
|(a) Returns of the 20 stocks with the highest and lowest eigenvector centralities|
|more central||less central||more central||less central|
|(b) Weighted degree of the 20 stocks with the highest and lowest returns|
|best returns||worst returns||best returns||worst returns|
Table 2 shows the main results of this work. Part (a) of Table 2 shows some network metrics. We see that for mutual information networks, the mean MST distance has declined 18% for period MT and just 12.5% for period DR. Despite the mean degree remains the same, the robustness coefficient, calculated from Equation (12), increases by 27% during period MT (during DR, it raises 5%), while power law parameter, calculated from Equation (11), decreases from 4.19 to 2.39 during period MT (for period DR it decreased from 3.03 to 2.44), which is a significant change.
The part (b) of Table 2 shows some MSTs qualitative features. As seen in Table 1(b), both linear correlation and mutual information spanning trees suggests that stock returns are related to their centralities, but this is much more evident for networks based on mutual information. In addition, in the linear correlation networks all the best Sharpe index assets are diffuse around the tree. On the other hand, in the mutual information networks, for DR period, the assets with the greatest Sharpe indices appears on the periphery of the graph, while for MT period these same stocks are now much more central. In fact, for DR period, the most central assets ’moved’ the market to a 42% negative return, whereas assets with the best Sharpe index remains into the periphery. During MT period, central assets now push the market to a 50% positive return. In this period, Sharpe’s best indices remain on the central part of the graph. These results suggests that the central stocks are the ones that really ’move’ the market.
Finally, Table 2(c) shows the importance of economic sectors within the networks based on their centrality. We see that Banks sector has the highest centrality in all networks, while industry, construction and energy sectors are always very clustered around network’s periphery, so indicating that they are relatively less important for volatility transmission. Indeed, a small number of high linear correlations are sufficient to separate the market sectors, especially banking, the industrial and the electric. In this case, high values of linear correlation also means high values for the global dependence coefficient. Thus, main sector structures did not show relevant changes in networks based on mutual information.
|PERIOD||Dilma Rousseff||Michel Temer|
|(a) MST METRICS|
|Mean weighted degree||1.98||1.98||1.99||1.99|
|(b) MST MAIN CHARACTERISTICS|
|(c) ECONOMIC SECTORS IMPORTANCE|
In this paper we studied nonlinear dependencies in Brazilian market network during the Brazilian government transition from president Dilma Rousseff to president Michel Temer. Minimum Spanning Trees based on mutual information and linear correlation were compared. We verified that the mutual information networks bring changes in their structures when compared to the networks based on linear correlation. The asset returns in MT period presents a larger number of nonlinear dependencies when compared to the returns of president DR period. The network for MT period is the most risky in terms of volatility transmission structure, both by the analysis of the robustness coefficient and by the power law tail evidence in the mutual information minimum spanning trees weighted degree distributions. Finally, mutual information network analysis seems to bring benefits to the investment decision making process, particularly concerning the analysis of network structure and stock performance. Moreover, those type of networks seems to be useful to identify risk not captured by a linear correlation network analysis. For further research it would be interesting to replicate this kind of study for other developing countries or to diverse types of markets, such as currencies.
Lastly, network analysis is a rapidly developing science, and it would not be surprising if we have much faster, more flexible and interactive methods of data analysis and visualization in a short time. For us, by now it is enough to think that if the key determinant for estimating financial risk models is the dependency structure among all its assets, it seems that having an accurate map at hand is already a great starting point.
The authors gratefully acknowledge financial support from the Brazilian agency CNPq.
R. Mantegna, Hierarchical
structure in financial markets, Eur. Phys. J. B 11 (1) (1999) 193–197.
S. MiccichÃ¨, G. Bonanno, F. Lillo, R. N. Mantegna,
stability of a minimum spanning tree of price return and volatility, Physica
A: Statistical Mechanics and its Applications 324 (1-2) (2003) 66–73.
R. Coelho, C. G. Gilmore, B. Lucey, P. Richmond, S. Hutzler,
evolution of interdependence in world equity markets: evidence from minimum
spanning trees, Physica A: Statistical Mechanics and its Applications 376
B. M. Tabak, T. R. Serra, D. O. Cajueiro,
properties of stock market networks: The case of brazil, Physica A:
Statistical Mechanics and its Applications 389 (16) (2010) 3240–3249.
C. G. Gilmore, B. M. Lucey, M. W. Boscia,
in government bond markets: A minimum spanning tree analysis, Physica A:
Statistical Mechanics and its Applications 389 (21) (2010) 4875–4886.
Y. Zhang, G. H. T. Lee, J. C. Wong, J. L. Kok, M. Prusty, S. A. Cheong,
us economy recover in 2010? a minimal spanning tree study, Physica A:
Statistical Mechanics and its Applications 390 (11) (2011) 2020–2050.
R. H. Heiberger,
network stability in times of crisis, Physica A: Statistical Mechanics and
its Applications 393 (2014) 376–381.
A. Fraser, H. Swinney,
Independent coordinates for
strange attractors from mutual information., Phys Rev A Gen Phys 33 (2)
A. Kraskov, H. StÃ¶gbauer, P. Grassberger,
information., Phys Rev E Stat Nonlin Soft Matter Phys 69 (6 Pt 2) (2004)
J. B. Kinney, G. S. Atwal,
information, and the maximal information coefficient., Proc Natl Acad Sci U
S A 111 (9) (2014) 3354–3359.
A. Dionisio, R. Menezes, D. A. Mendes,
information: a measure of dependency for nonlinear time series, Physica A:
Statistical Mechanics and its Applications 344 (1-2) (2004) 326–329.
C. Yang, X. Zhu, Q. Li, Y. Chen, Q. Deng,
on the evolution of stock correlation based on maximal spanning trees,
Physica A: Statistical Mechanics and its Applications 415 (2014) 1–18.
P. Fiedor, Networks in
financial markets based on the mutual information rate., Phys Rev E Stat
Nonlin Soft Matter Phys 89 (5) (2014) 052801.
- H. Kaya, Eccentricity in asset management, Journal of Network Theory in Finance 1 (2015) 1–31.
B. M. Tabak, T. R. Serra, D. O. Cajueiro,
expectation hypothesis of interest rates and network theory: The case of
brazil, Physica A: Statistical Mechanics and its Applications 388 (7) (2009)
C. E. Shannon,
mathematical theory of communication, Bell System Technical Journal 27 (4)
T. M. Cover, J. A. Thomas,
Elements of Information
Theory, John Wiley & Sons, Inc., Hoboken, NJ, USA, 2005.
- H. Joe, Relative entropy measures of multivariate dependence, J Am Stat Assoc 84 (405) (1989) 157–164.
J. B. Kruskal,
the shortest spanning subtree of a graph and the traveling salesman problem,
Proc. Amer. Math. Soc. 7 (1) (1956) 48–48.
B. W. Silverman,
for Statistics and Data Analysis, Springer US, Boston, MA, 1986.
D. W. Scott, Multivariate
Density Estimation: Theory, Practice, and Visualization, Wiley Series in
Probability and Statistics, John Wiley & Sons, Inc, Hoboken, NJ, 2015.
Y. Moon, B. Rajagopalan, U. Lall,
Estimation of mutual
information using kernel density estimators., Phys Rev E Stat Phys Plasmas
Fluids Relat Interdiscip Topics 52 (3) (1995) 2318–2321.
- A.-L. Barabasi, Network Science, Cambridge University Press, Cambridge CB2 8BS, United Kingdom, 2016.
A. Clauset, C. R. Shalizi, M. E. J. Newman,
distributions in empirical data, SIAM Rev. 51 (4) (2009) 661–703.
C. S. Gillespie, Fitting heavy tailed
distributions: The poweRlaw package, Journal of Statistical Software
64 (2) (2015) 1–16.
Oxford University Press, 2010.
I. Dobson, B. A. Carreras, V. E. Lynch, D. E. Newman,
Complex systems analysis of series
of blackouts: cascading failure, critical points, and self-organization.,
Chaos 17 (2).
- Economatica, https://economatica.com/, [Online; accessed 02-February-2017].
- Bovespa, ftp://ftp.bmf.com.br/, [Online; accessed 22-October-2017].
- M. Perlin, R. Henrique, Gethfdata: A r package for downloading and aggregating high frequency trading data from bovespa, Available at SSRN.
W. F. Sharpe,
prices: A theory of market equilibrium under conditions of risk, J Finance
19 (3) (1964) 425.