Interplay between past market correlation structure changes and future volatility outbursts

We report significant relations between past changes in the market correlation structure and future changes in the market volatility. This relation is made evident by using a measure of “correlation structure persistence” on correlation-based information filtering networks that quantifies the rate of change of the market dependence structure. We also measured changes in the correlation structure by means of a “metacorrelation” that measures a lagged correlation between correlation matrices computed over different time windows. Both methods show a deep interplay between past changes in correlation structure and future changes in volatility and we demonstrate they can anticipate market risk variations and this can be used to better forecast portfolio risk. Notably, these methods overcome the curse of dimensionality that limits the applicability of traditional econometric tools to portfolios made of a large number of assets. We report on forecasting performances and statistical significance of both methods for two different equity datasets. We also identify an optimal region of parameters in terms of True Positive and False Positive trade-off, through a ROC curve analysis. We find that this forecasting method is robust and it outperforms logistic regression predictors based on past volatility only. Moreover the temporal analysis indicates that methods based on correlation structural persistence are able to adapt to abrupt changes in the market, such as financial crises, more rapidly than methods based on past volatility.

We quantify the rate of change in the structure of the market correlation matrix by using two tools: (1) the "correlation structure persistence" 〈 ES〉 which is a measure of similarity between past correlation structures computed from network filtering; (2) the metacorrelation, that is the correlation between correlation matrices at different times; we discuss performances, advantages and disadvantages of the two approaches. We show how such measures exhibit significant predicting power on the market volatility, providing a tool to forecast it. We assess the reliability of these forecasting through out-of-sample tests on two different equity datasets.
The rest of this paper is structured as follows: we first describe the two datasets we have analysed and we introduce the correlation structure persistence and metacorrelation; then we show how our analyses point out a strong interdependence between correlation structure persistence and future changes in the market volatility; moreover, we describe how this result can be exploited to provide a forecasting tool useful for risk management, by presenting out-of-sample tests and false positive analysis; then we investigate how the forecasting performance changes in time; finally we discuss our findings and their theoretical implications.

Results
We have analysed two different datasets of equity data. The first set (NYSE dataset) is composed by daily closing prices of N = 342 US stocks traded in New York Stock Exchange, covering 15 years from 02/01/1997 to 31/12/2012. The second set (LSE dataset) is composed by daily closing prices of N = 214 UK stocks traded in the London Stock Exchange, covering 13 years from 05/01/2000 to 21/08/2013. All stocks have been continuously traded throughout these periods of time. These two sets of stocks have been chosen in order to provide a significant sample of the different industrial sectors in the respective markets.
For each asset i (i = 1, ..., N) we have calculated the corresponding daily log-return r i (t) = log (P i (t)) − log (P i (t − 1)), where P i (t) is the asset i price at day t. The market return r M (t) is defined as the average of all stocks returns: r M (t) = 1/N∑ i r i (t). In order to calculate the correlation between different assets we have then analysed the observations by using n moving time windows, T a with a = 1, ..., n. Each time window contains θ observations of log-returns for each asset, totaling to N × n observations. The shift between adjacent time windows is fixed to dT = 5 trading days: therefore, adjacent time windows share a significant number of observations. We have calculated the correlation matrix within each time window, {ρ ij (T a )}, by using an exponential smoothing method 25 that allows to assign more weight on recent observations. The smoothing factor of this scheme has been chosen equal to θ/3 according to previously established criteria 25 .
A measure of correlation structure persistence with filtering networks. From each correlation matrix {ρ ij (T a )} we computed the corresponding Planar Maximally Filtered Graph (PMFG) 26 which is one realization of a broader class of filtering networks associating a sparse graph to a correlation matrix 27 . Specifically, the PMFG is a sparse network representation of the correlation matrix that retains only a subset of most significant entries, selected through the topological criterion of being maximally planar 9 . In general, any correlation matrix can be represented as a graph, where each node is an asset and each link between two nodes represents the correlation between them. From this network, which is typically fully connected, several different planar graphs can be extracted as subgraphs: a graph is planar if it can be embedded on a plane without link crossing 26 . The Planar Maximally Filtered Graph (PMFG) is the planar graph associated with the original correlation matrix which maximizes the sum of weights accordingly with a given greedy algorithm 26 . The PMFG can be seen as a generalization of the Minimum Spanning Tree: the PMFG is able to retain a higher amount of information 9 , having a less strict topology constraint allowing to keep a larger number of links. Moreover, the MST is a subgraph of PMFG. In terms of computational complexity the algorithm that builds PMFG is O(N 3 ); recently 27 a new algorithm has been proposed, able to build a chordal planar graph (called Triangulated Maximally Filtered Graph, TMFG) with an execution time O(N 2 ), making possible a much higher scalability and the application to Big Data 27 . Such networks have been shown to provide a deep insight into the dependence structure of financial assets 9,10,28 .
Once the n PMFGs, G(T a ) with a = 1, ..., n, have been computed we have calculated a measure that monitors the correlation structure persistence, based on a measure of PMFG similarity. This measure, that we call ES(T a , T b ), computes the edges in common between a PMFG computed over the time-windows T a and T b of length θ. Its average over a set of L windows T b (see Fig. 1 and Eqs 2 and 3 in Methods) is denoted with 〈 ES〉 (T a ). This measure uses past data only and indicates how slowly the correlation structure measured at time window T a is differentiating from structures associated to previous time windows.
In Fig. 2 we show the ES(T a , T b ) matrices (Eq. 3) for the NYSE and LSE dataset, for θ = 1000. We can observe a block structure with periods of high structural persistence and other periods whose correlation structure is changing faster. In particular two main blocks of high persistence can be found before and after the 2007-2008 financial crisis; a similar result was found in a previous work 20 with a different measure of similarity. These results are confirmed for all values of θ considered.
A measure of correlation structure persistence with metacorrelations. We have considered a more direct measure of correlation structure persistence, the metacorrelation z(T a , T b ), that is the Pearson correlation computed between the coefficients of correlation matrices at T a and T b (see Methods for more details). Such measure does not make use of any filtering network. Let us note that, although conceptually simpler, this measure requires an equivalent computational complexity (O(N 2 )) than 〈 ES〉 (T a ) (when computed with the TMFG approach 27 ) but it requires a larger memory usage. Figure 3 displays the similarity matrices obtained with this measure for NYSE and LSE datasets: we can observe again block-like structures, that however carry different information from the ES(T a , T b ) in Fig. 2; in particular, blocks show higher intra-similarity and less structure. Similarly to the construction of ES(T a ). we have defined 〈 z〉 (T a ) as the weighted average over L past time windows (see Methods Eqs 2 and 5).
Scientific RepoRts | 6:36320 | DOI: 10.1038/srep36320   Scientific RepoRts | 6:36320 | DOI: 10.1038/srep36320 A forward looking measure of volatility: volatility ratio. The volatility ratio q(T a ) 29,30 is a foward-looking measure that, at each time window T a , compute the ratio between the estimated volatility in the following time-window T a foward and the one estimated from T a . Unlike 〈 ES〉 (T a ) or 〈 z〉 (T a ) the value of q(T a ) is not known at the end of T a as it requires information from the next time-window. Figure 1 shows a graphical representation of the time window set-up.
Interplay between correlation structure persistence and volatility ratio. To investigate the relation between 〈 ES〉 (T a ) and q(T a ) we have calculated the two quantities with different values of θ and L in Eqs 2 and 6, to assess the robustness against these parameters. Specifically, we have used θ ∈ (250, 500, 750, 1000) trading days, that correspond to time windows of length 1, 2, 3 and 4 years respectively; L ∈ (10, 25, 50, 100), that correspond (given dT = 5 trading days) to an average in Eq. 2 reaching back to 50, 125, 250 and 500 trading days respectively. θ forward has been chosen equal to 250 trading days (one year) for all the analysis.
In Fig. 4 we show 〈 ES〉 (T a ) and q(T a ) as a function of time, for θ = 1000 and L = 100. As expected, main peaks of q(T a ) occur during the months before the most turbulent periods in the stock market, namely the 2002 market downturn and the 2007-2008 credit crisis. Interestingly, the corresponding 〈 ES〉 (T a ) seems to follow a specular trend. This is confirmed by explicit calculation of Pearson correlation between the two signals, reported in Tables 1 and 2: as one can see, for all combinations of parameters the correlation is negative.

Table 1. NYSE dataset: correlation between 〈ES〉(T a ) and q(T a ), for different combinations of parameters θ and L.
Stars mark those correlation coefficients whose confidence interval excludes zero with a 95% (one star) or a 99% confidence (two stars). The confidence intervals are computed from the block-bootstrapped sample. **p < 0.001, *p < 0.01.  Table 2. LSE dataset: correlation between 〈ES〉(T a ) and q(T a ), for different combinations of parameters θ and L. Stars mark those correlation coefficients whose confidence interval excludes zero with a 95% (one star) or a 99% confidence (two stars). The confidence intervals are computed from the block-bootstrapped sample. **p < 0.001, *p < 0.01.
Scientific RepoRts | 6:36320 | DOI: 10.1038/srep36320 In order to check the significance of this anticorrelation we cannot rely on standard tests on Pearson coefficient, such as Fisher transform 31 , as they assume i.i.d. series 32 . Both 〈 ES〉 (T a ) and q(T a ) are instead strongly autocorrelated, due to the significant overlapping between adjacent time windows. In Supplementary Material, Fig. S3, the autocorrelation of q(T a ) is analysed at different lags. Therefore we have calculated confidence intervals by performing a block bootstrapping test 33 . This is a variation of the bootstrapping test 34 , conceived to take into account the autocorrelation structure of the bootstrapped series. The only free parameter in this method is the block length, that we have chosen applying the optimal selection criterion proposed in literature 35 : such criterion is adaptive on the autocorrelation strength of the series as measured by the correlogram. We have found, depending on the parameters θ and L, optimal block lengths ranging from 29 to 37, with a mean of 34 (corresponding to 170 trading days). By performing block bootstrapping tests we have therefore estimated confidence intervals for the true correlation between 〈 ES〉 (T a ) and q(T a ); in Tables 1 and 2 correlations whose 95% and 99% confidence intervals (CI) do not include zero are marked with one and two stars respectively. As we can see, 14 out of 16 correlation coefficients are significantly different from zero within 95% CI in the NYSE dataset, and 12 out of 16 in the LSE dataset. For what concerns the 99% CI, we observe 13 out of 16 for the NYSE and 9 out of 16 for the LSE dataset. Non-significant correlations appear only for θ = 250, suggesting that this length is too small to provide a reliable measure of structural persistence. Very similar results are obtained by using Minimum Spanning Tree (MST) 36 instead of PMFG as network filtering.
Given the interpretation of 〈 ES〉 (T a ) and q(T a ) given above, anticorrelation implies that an increase in the "speed" of correlation structure evolution (low 〈 ES〉 (T a )) is likely to correspond to underestimation of future market volatility from historical data (high q(T a )), whereas when the structure evolution "slows down" (high 〈 ES〉 (T a )) there is indication that historical data is likely to provide an overestimation of future volatility. This means that we can use 〈 ES〉 (T a ) as a valuable predictor of current historical data reliability. This result is to some extent surprising as 〈 ES〉 (T a ) is derived from PMFGs topology, which in turns depends only on the ranking of correlations and not on their actual value: yet, this information provides meaningful information about the future market volatility and therefore about the future covariance.
In Tables 3 and 4 we show the correlation between 〈 z〉 (T a ) and q(T a ). As we can see, although an anticorrelation is present for each combination of parameters θ and L, correlation coefficients are systematically closer to zero than in Tables 1 and 2, where 〈 ES〉 (T a ) was used. Moreover the number of significant Pearson coefficients, according to the block bootstrapping, decreases to 12 out of 16 in NYSE and to 10 out of 16 in LSE dataset. Since 〈z〉 (T a ) does not make use of PMFG, this result suggests that the filtering procedure associated to correlation-based networks is enhancing the relation between past correlation structure and future volatility changes. We shall however see in the next session that for forecasting purposes network filtering might not be always beneficial.
Forecasting volatility with correlation structure persistence. In this section we evaluate how well the correlation structure persistence 〈 ES〉 (T a ) can forecast the future through its relation with the forward-looking volatility ratio q(T a ). In particular we focus on estimating whether q(T a ) is greater or less than 1: this information, although less complete than a precise estimation of q(T a ), gives us an important insight into possible overestimation (q(T a ) < 1) or underestimation (q(T a ) > 1) of future volatility. The equivalent assessment of forecasting power of 〈 z〉 (T a ) is reported in Supplementary Material (Tables S1-S4 and Fig. S1).  Table 3. NYSE dataset: correlation between 〈z〉(T a ) and q(T a ), for different combinations of parameters θ and L. Stars mark those correlation coefficients whose confidence interval excludes zero with a 95% (one star) or a 99% confidence (two stars). The confidence intervals are computed from the block-bootstrapped sample. **p < 0.001, *p < 0.01.  Table 4. LSE dataset: correlation between 〈z〉(T a ) and q(T a ), for different combinations of parameters θ and L. Stars mark those correlation coefficients whose confidence interval excludes zero with a 95% (one star) or a 99% confidence (two stars). The confidence intervals are computed from the block-bootstrapped sample. **p < 0.001, *p < 0.01.
Scientific RepoRts | 6:36320 | DOI: 10.1038/srep36320 We have proceeded as follows. Given a choice of parameters θ and L, we have calculated the corresponding set of pairs {〈 ES〉 (T a ), q(T a )}, with a = 1, ..., n. Then we have defined Y(T a ) as the categorical variable that is 0 if q(T a ) < 1 and 1 if q(T a ) > 1. Finally we have performed a logistic regression of Y(T a ) against 〈 ES〉 (T a ): namely, we assume that 37 : Once the model has been calibrated, given a new observation 〈 ES〉 (T n+1 ) = x we have predicted Y(T n+1 ) = 1 if P{Y(T n+1 ) = 1|〈 ES〉 (T n+1 ) = x} > 0.5, and Y(T n+1 ) = 0 otherwise. This classification criterion, in a case with only one predictor, corresponds to classify Y(T n+1 ) according to whether 〈 ES〉 (T n+1 ) is greater or less than a threshold r which depends on β 0 and β 1 , as shown in Fig. 5 (right graphs) for a particular choice of parameters. Therefore the problem of predicting whether market volatility will increase or decrease boils down to a classification problem 39 with 〈 ES〉 (T a ) as predictor and Y(T a ) as target variable.
We have made use of a logistic regression because it is more suitable than a polynomial model for dealing with classification problems 37 . Other classification algorithms are available; we have chosen the logistic regression due to its simplicity. We have also implemented the KNN algorithm 39 and we have found that it provides similar outcomes but worse results in terms of the forecasting performance metrics that we discuss in this section.
We have then evaluated the goodness of the logistic regression at estimating Y(T n+1 ) given a new observation 〈 ES〉 (T n+1 ). To this end, we have computed three standard metrics for assessing the performance of a classification method: the probability of successful forecasting P + , the True Positive Rate TPR and the False Positive Rate FPR. P + represents the expected fraction of correct predictions, TPR is the method goodness at identifying true positives (in this case, actual increases in volatility) and FPR quantifies the method tendency to false positives (predictions of volatility increase when the volatility will actually decrease): see Methods for more details. Overall these metrics provide a complete summary of the model goodness at predicting changes in the market volatility 37 .
In order to avoid overfitting we have estimated the metrics above by means of an out-of-sample procedure 37,39 . We have divided our dataset into two periods, a training set and a test set. In the training set we have calibrated the logistic equation in Eq. 1, estimating the parameters β 0 and β 1 ; in the test set we have used the calibrated Probabilities of successful forecasting P + are reported in Tables 5 and 6, for f test = 30%. As we can see P + is higher than 50% for all combinations of parameters in NYSE dataset, and in almost all combinations for LSE dataset. Stars mark those values of P + that are significantly higher than the same probability obtained by using the most recent value of q instead of 〈 ES〉 (T a ) as a predictor for q(T a ) in the logistic regression (let us call + P q such probability, reported in Tables S5 and 6 in Supplementary Material ). Specifically, we have defined a null model where variations from such probability + P q are due to random fluctuations only; given n observations, such fluctuations follow a Binomial distribution + B P n ( , ) q , with mean + nP q and variance − + + nP P (1 ) q q . Then p-values have been calculated by using this null distribution for each combination of parameters. This null hypothesis accounts for the predictability of q(T a ) that is due to the autocorrelation of q(T a ) only; therefore P + significantly higher than the value expected under this hypothesis implies a forecasting power of 〈 ES〉 (T a ) that is not explained by the autocorrelation of q(T a ). From the table we can see that P + is significant in 12 out of 16 combinations of parameters for NYSE dataset, and in 13 out of 16 for LSE dataset. This means that correlation persistence is a valuable predictor for future average correlation, able to outperform forecasting method based on past average correlation trends. These results are robust against changes of f test , as long as the training set is large enough to allow an accurate calibration of the logistic regression. We have found this condition is satisfied for f test < 40%. In Supplementary Material, Fig. S3 reports the autocorrelation of q(T a ). We also investigated a null model that uses the weighted average version of q(T a ): results are very similar and reported in Supplementary Material (Tables S9 and 10).
It must be noted that P + does not give any information on the method ability to distinguish between true and false positives. To investigate this aspect we need TPR and FPR. A traditional way of representing both measures from a binary classifier is the so-called "Receiver operating characteristic" (ROC) curve 40 . In a ROC plot, TPR is plotted against FPR as the discriminant threshold is varied. The discriminant threshold p max is the value of the probability in Eq. 1 over which we classify Y(T a ) = 1: the higher p max is, the less likely the method is to classify Y(T a ) = 1 (in the analysis on P + we chose p max = 0.5). Ideally, a perfect classifier would yield TPR = 1 for all p max > 0, whereas a random classifier is expected to lie on the line TPR = FPR. Therefore a ROC curve which lies above the line TPR = FPR indicates a classifier that is better than chance at distinguishing true from false positives 37 .
As one can see from Fig. 6, the ROC curve's position depends on the choice of parameters θ and L. In this respect our classifier performs better for low values of L and θ. This can be quantified by measuring the area under the ROC curve; such measure, often denoted by AUC 37 , is shown in Tables 7 and 8. For both datasets the optimal choice of parameters is θ = 500 and L = 10. In Supplementary Material, Tables S7 and 8 and Fig. S4, the ROC curve and AUC values are reported for the case when q(T a ) is used as predictor, showing that q(T a ) underperforms 〈 ES〉 (T a ) in terms of ROC analysis as well.
We also tested the predictive power of metacorrelations z(T a , T b ) (see Supplementary Material). By comparing with the results for ES(T a , T b ) we observed that 〈 z〉 (T a ) has almost always a slightly higher P + than 〈 ES〉 (T a ) in the NYSE dataset, whereas on average it has lower values than 〈 ES〉 (T a ) in the LSE dataset (with 9 out of 16 values of P + less than the corresponding 〈 ES〉 (T a ) probabilities). On the other hand, the ROC analysis shows that the predictor 〈 ES〉 (T a ) performs better than 〈 z〉 (T a ) in the NYSE dataset and worse in the LSE dataset. Results for forecasting with z(T a , T b ) are reported in Section S.1 of Supplementary Material (Tables S1 and S4 and Fig. S1). We therefore conclude that the advantage of network filtering in measuring the correlation structure persistence is clear only when it comes to the correlation analysis with q(T a ), whereas for the forecasting model it might be   convenient to use one measure or the other depending on whether one wants to maxmise the probability of forecasting (P + ) or minimise the impact of false positive (ROC analysis).
Temporal evolution of forecasting performance. In this section we look at how the forecasting performance changes at different time periods. In order to explore this aspect we have counted at each time window T a the number N + (T a ) of Y(T a ) predictions (out of the 16 predictions corresponding to as many combinations of θ and L) that have turned out to be correct; we have then calculated the fraction of successful predictions n + (T a ) as n + (T a ) = N + (T a )/16. In this way n + (T a ) is a proxy for the goodness of our method at each time window. Logistic regression parameters β 0 and β 1 have been calibrated by using the entire time period as training set, therefore this is an in-sample analysis.
In Fig. 7 we show the fraction of successful predictions for both NYSE and LSE datasets (upper graphs, blue circles). For comparison we also show the same measure obtained by using the most recent value of q(T a ) as predictor (bottom graphs); as in the previous section, it represents a null model that makes prediction by using only the past evolution of q(T a ). As we can see, both predictions based on 〈 ES〉 (T a ) and on past values of q(T a ) display performances changing in time. In particular n + (T a ) drops just ahead of the main financial crises (the market   Table 7. NYSE dataset: Area under the curve (AUC), measured from the ROC curve in Fig. 6. Values greater than 0.5 indicate that the classifier performs better than chance. ; this is probably due to the abrupt increase in volatility that occurred during these events and that the models took time to detect. After these drops though performances based on 〈 ES〉 (T a ) recover much more rapidly than those based on past value of q(T a ). For instance in the first months of 2007 our method shows quite high n + (T a ) (more than 60% of successful predictions), being able to predict the sharp increase in volatility to come in 2008 while predictions based on q(T a ) fail systematically until 2009. Overall, predictions based on correlation structure persistence appear to be more reliable (as shown by the average n + (T a ) over all time windows, the horizontal lines in the plot) and faster at detecting changes in market volatility. Similar performances to 〈 ES〉 (T a ) can be observed when n + (T a ) is calculated using 〈 z〉 (T a ) as measure of correlation structure persistence (see Supplementary Material, Fig. S2).

Discussion
In this paper we have proposed a new tool for forecasting market volatility based on correlation-based information filtering networks, metacorrelation and logistic regression, useful for risk and portfolio management. The advantage of our approach over traditional econometrics tools, such as multivariate GARCH and stochastic covariance models, is the "top-down" methodology that treats correlation matrices as the fundamental objects, allowing to deal with many assets simultaneously; in this way the curse of dimensionality, that prevents e.g. multivariate GARCH to deal with more than few assets, is overcome. We have proven the forecasting power of this tool by means of out-of-sample analyses on two different stock markets; the forecasting performance has been proven to be statistically significant against a null model, outperforming predictions based on past market correlation trends. Moreover we have measured the ROC curve and identified an optimal region of the parameters in terms of True Positive and False Positive trade-off. The temporal analysis indicates that our approach, based on correlation structure persitance, is able to adapt to abrupt changes in the market, such as financial crises, more rapidly than methods based on past volatility. This forecasting tool relies on an empirical fact that we have reported in this paper for the first time. Specifically, we have shown that there is a deep interplay between future changes in market volatility and the rate of change of the past correlation structure. The statistical significance of this relation has been assessed by means of a block-bootstrapping technique. An analysis based on metacorrelation has revealed that this interplay is better highlighted when filtering based on correlation filtering graphs (Planar Maximally Filtered Graphs) is used to estimate the correlation structure persistence. However, when it comes to forecasting performances, metacorrelation might be preferable to network filtering On the other hand, the use of planar graphs allows a better visualisation of the system, making possible a clearer interpretation of correlation structure changes. We must note that correlation filtering networks retain a much smaller amount of information than the whole correlation matrix and nonetheless reveal larger relations with future volatility changes and comparable forecasting performances. This could be crucial for a possible use of this tools in the context of big-data analytic where several thousands of indicators are simultaneously considered.
This finding sheds new light into the dynamic of correlation. Both metacorrelation and the topology of correlation filtering networks depend on the ranking of the N(N − 1)/2 pairs of cross-correlations; therefore a decrease in the correlation structure persistence points out a faster change of this ranking. Our result indicates that such increase is typically followed by a rise in the market volatility, whereas decreases are followed by drops. A possible interpretation of this is related to the dynamics of risk factors in the market. Indeed higher volatility in the market is associated to the emergence of a (possibly new) risk factor that makes the whole system unstable; such transition could be anticipated by a quicker change of the correlation ranking, triggered by the still emerging factor and revealed by the correlation structure persistence. Such persistence can therefore be a powerful tool for monitoring the emergence of new risks, valuable for a wide range of applications, from portfolio management to systemic risk regulation. Moreover this interpretation would open interesting connections with those approaches to systemic risk that make use of Principal Component Analysis, monitoring the emergence of new risk factors by means of spectral methods 23,24 . We plan to investigate all these aspects in a future work.

Methods
Correlation structure persistence with filtering networks 〈ES〉(T a ). We define the correlation structure persistence at time T a as: is an exponential smoothing factor, L is a parameter and ES(T a , T b ) is the fraction of edges in common between the two PMFGs G(T a ) and G(T b ), called "edge survival ratio" 15 . In formula, ES(T a ,T b ) reads: where N edges is the number of edges (links) in the two PMFGs (constant and equal to 3N − 6 for a PMFG 26 ), and E T a (E T b ) represents the edge-sets of PMFG at T a (T b ). The correlation structure persistence 〈 ES〉 (T a ) is therefore a weighted average of the similarity (as measured by the edge survival ratio) between G(T a ) and the first L previous PMFGs, with an exponential smoothing scheme that gives more weight to those PMFGs that are closer to T a . The parameter ω 0 in Eq. 2 can be calculated by imposing . Intuitively, 〈 ES〉 (T a ) measures how slowly the change of correlation structure is occurring in the near past of T a .

Correlation structure persistence with metacorrelation 〈z〉(T a ). Given two correlation matrices
{ρ ij (T a )} and {ρ ij (T b )} at two different time windows T a and T b , their metacorrelation z(T a ,T b ) is defined as follows: where 〈...〉 ij is the average over all couples of stocks i, j. Similarly to Eq. 2 we have then defined z(T a ) as the weighted average over L past time windows: Volatility ratio q(T a ). In order to quantify the agreement between the estimated and the realized risk we here make use of the volatility ratio, a measure which has been previously used 29,41 for this purpose and defined as follows: a a forward a where σ T ( ) a forward is the realized volatility of the average market return r M (t) computed on the time window T a forward ; σ(T a ) is the estimated volatility of r M (t) computed on time window T a , by using the same exponential smoothing scheme 25 described for the correlation {ρ ij (T a )}. Specifically, T a forward is the time window of length θ forward that follows immediately T a : if t θ is the last observation in T a , T a forward covers observations from t θ+1 to θ θ + + t 1 forward (Fig. 1). Therefore the ratio in Eq. 6 estimates the agreement between the market volatility estimated with observations in T a and the actual market volatility observed over an investment in the N assets over T a forward . If q(T a ) > 1, then the historical data gathered at T a has underestimated the (future) realized volatilty, whereas q(T a ) < 1 indicates overestimation. Let us stress that q(T a ) provides an information on the reliability of the covariance estimation too, given the relation between market return volatility and covariance 21 : a ij ij a 2 (observations for which the model incorrectly predicted Y(T a ) = 0) and |Q 4 | the number of False Positive (observations for which the model incorrectly predicted Y(T a ) = 1). We have then computed the following measures of quality of classification, that are the standard metrics for assessing the performances of a classification method 39 : • Probability of successful forecasting (P + ) 39 : represents the method probability of a correct prediction, expressed as fraction of observed 〈 ES〉 (T a ) values through which the method has successfully identified the correspondent value of Y(T a ). In classification problems, sometimes, the error rate I is used 37 , which is simply I = 1 − P + . P + is computed as follows: • True Positive Rate (TPR) 39 : it is the probability of predicting Y(T a ) = 1, conditional to the fact that the real Y(T a ) is indeed 1 (that is, to predict an increase in volatility when the volatility will indeed increase); it represents the method sensitivity to increase in volatility. It is also called "recall" 37 . In formula: • False Positive Rate (FPR) 39 : it is the probability of predicting Y(T a ) = 1, conditional to the fact that the real Y(T a ) is instead 0 (that is, to predict an increase in volatility when the volatility will actually decrease). It is also called "1-specificity" 37 . In formula: