Continuing this series on covariance matrix forecasting (c.f. here and there for the previous posts), I will now describe a relatively recent1 data-driven, model-free, way to [forecast] covariance [and correlation] matrices of time-varying systems2 rooted in random matrix theory. This method - introduced in Bongiorno et al.2 and called Average Oracle - consists in replacing the eigenvalues of a (noisy) estimate of a time-varying covariance matrix by time-independant eigenvalues that encode the average influence of the future on present eigenvalues2. In this blog post, I will describe that method and, as now usual in this series, I will illustrate its empirical performances in the context of monthly covariance matrix forecasting for a multi-asset class ETF portfolio. Mathematical preliminaries Some of these sub-sections contain reminders from a previous blog post. Dynamic covariance and correlation matrices Let be the number of assets in a universe of assets and be the vector of the (logarithmic) return process of these assets over a time period (a day, a week, a month..) over which their mean return vector is supposed to be null. Then: The asset covariance matrix over the time period is defined as . That matrix is called3 the population (or true) covariance matrix of the asset returns over the time period . The asset correlation matrix over the time period is defined as the correlation matrix associated to the covariance matrix , where is the diagonal matrix of the asset standard deviations. Let now be time periods . Then: The averaged4 covariance matrix over the time periods is defined as . In case the return process is time-invariant, the averaged covariance matrix is equal to the (constant) population covariance matrix . The averaged4 correlation matrix over the time periods is defined as . In case the return process is time-invariant, the averaged correlation matrix is equal to the (constant) correlation matrix . The pseudo-averaged5 correlation matrix over the time periods is defined as the correlation matrix associated to the averaged covariance matrix . In case the return process is time-invariant, the pseudo-averaged correlation matrix is equal to the averaged correlation matrix , but in general, due to time-varying asset standard deviations, the two correlation matrices are different. Dynamic covariance and correlation matrices sample estimators In practice, the asset return process is usually not known and the only available information is the vectors of realized asset returns for time periods. From each of these vectors: The classical way to estimate the covariances is to compute the empirical (or sample) covariance matrix thanks to Pearson estimator3 defined as over each time period . Here, the outer product of the realized asset returns over the time period is called a covariance estimate - or covariance proxy6 - for the (unobserved) asset returns covariance matrix over that time period. The empirical (or sample) correlation matrix over each time period is defined as the correlation matrix associated to the covariance matrix . The empirical averaged covariance matrix over the time periods is typically estimated from the realized asset returns thanks to the averaged Pearson estimator defined as . The empirical averaged correlation matrix over the time periods is defined as . The empirical pseudo-averaged correlation matrix over the time periods is defined as the correlation matrix associated to the empirical averaged covariance matrix . Covariance and correlation matrices rotationally invariant estimators Rotationally invariant estimators As already mentioned in a previous blog post on correlation matrices denoising, the estimation of empirical covariance and correlation matrices in finance is affected by noise, in the form of measurement error, due in part to the short length of the time series of asset returns typically used in their computation. Indeed: Constructing a well-diversified portfolio requires many assets7, that is, a big . In contrast, rapid shifts in financial market dependencies can only be captured by short calibration windows7 for estimating asset correlations, that is, a small . This situation leads to an aspect ratio of empirical matrices either close to 1 - or even worse, much greater than 1 -, which is catastrophic from an estimation perspective, c.f. the above blog post and references therein. Hopefully, numerous techniques have been developed to improve the estimation of noisy covariance [or correlation] matrices7. Several of these techniques, like the eigenvalue clipping method8, involve a specific class of matrix estimators - known as Rotationally Invariant Estimators (RIE) or Orthogonally Invariant Estimators (OIE) - that leaves the eigenvectors of the empirical matrices untouched while altering their eigenvalues. In other words, an RIE estimator of a true covariance or correlation matrix obtained from its empirical counterpart has the general form [\Xi \left( \tilde{\Sigma}_t \right) = \tilde{V}_t \Lambda_t \tilde{V}_t {}^t] , where: is a diagonal matrix of well-chosen2 eigenvalues. is the matrix of eigenvectors of , defined through the spectral decomposition with the diagonal matrix of eigenvalues of . Bun et al.3 explains the underlying rationale as follows: The true matrix [] is unknown and we do not have any particular insights on its components (the eigenvectors). Therefore we would like our estimator [] to be constructed in a rotationally invariant way from the noisy observation [] that we have. In simple terms, this means that there is no privileged direction in the -dimensional space that would allow one to bias the eigenvectors of the estimator [] in some special directions. More formally, the estimator construction must obey: for any rotation matrix . Any estimator satisfying [that equation] will be referred to as a Rotational Invariant Estimator (RIE). In this case, it turns out that the eigenvectors of the estimator [] have to be the same as those of the noisy matrix []. Rotationally invariant oracle estimator Bun et al.3 shows that the optimal RIE estimator of the unknown matrix in terms of Frobenius norm is the RIE estimator whose diagonal matrix of eigenvalues satisfy [\Lambda_O = \text{diag} \left( \tilde{V}_t {}^t \Sigma_t \tilde{V}_t \right)] That estimator is sometimes called the oracle estimator because it depends explicitly on the knowledge of the true signal []3 and so is not directly usable in practice. Remarkably, [though], asymptotically optimal RIEs that converge to the oracle estimator can be obtained without the knowledge of the true covariance; however, such estimators require that: i) the ground truth does not change, ii) the data matrix is very large, and iii) the data has at least finite fourth moments2. Those conditions, and especially the first one, are definitely not satisfied by asset returns, which leads to suboptimal estimators in practice… As a side note, and maybe contrary to intuition, the optimal eigenvalues are NOT equal to the eigenvalues of , because this would result in a spectrum that is too wide3. The Average Oracle covariance matrix forecasting method Forecasting formulas Let be: be the number of assets in a universe of assets , the outer products of the observed asset returns over each of past periods a chosen number of past periods a long calibration window, with chosen so that and Asset returns averaged covariance matrix The Average Oracle covariance matrix forecasting model estimates the asset returns averaged covariance matrix over the next periods as follows2: Choose a number of random time periods to generate. For do Select uniformly at random with replacement a time period Compute the “past” averaged asset returns covariance matrix on the train window , defined by and its associated correlation matrix whose spectral decomposition is given by . Compute the “future” averaged asset returns covariance matrix on the test window , defined by and its associated correlation matrix . Compute the diagonal matrix of oracle eigenvalues . Compute the diagonal matrix of Average Oracle eigenvalues . Compute the most recent “past” averaged asset returns covariance matrix on the window , defined by and its associated correlation matrix whose spectral decomposition is given by . Compute , where is the diagonal matrix of the standard deviations . For more visual clarity, Figure 1 illustrates that process. Figure 1. Illustration of the Average Oracle eigenvalues computation process, which uses different windows included in a long calibration window. Source: Adapted from Bongiorno et al. Asset returns averaged and pseudo-averaged correlation matrix The Average Oracle covariance matrix forecasting model does not easily9 allow to estimate the asset returns averaged correlation matrix , because it does not rely on the estimation of the individual covariance matrices , , . The asset returns pseudo-averaged correlation matrix over the next periods, though, corresponds to the correlation matrix associated to the averaged covariance matrix . Rationale The Average Oracle covariance matrix forecasting method captures the average transition from two consecutive time windows2 by averaging [oracle eigenvalues], rank-wise, over many randomly selected consecutive intervals taken from a long calibration window2. That covariance matrix forecasting method thus tackles the evolution of [asset returns] dependencies with a time-invariant eigenvalue cleaning scheme2. As noted in Bongiorno et al.2: This is a zeroth order approximation, as the fluctuations of the optimal eigenvalue matrix around sometimes most probably contain valuable additional information (as may do those of the eigenvectors). Nevertheless, this approximation is a powerful filtering tool and is easily computed from data without any modeling assumptions about the underlying system. Performances From a practical perspective, Bongiorno et al.2 and Bongiorno and Challet10 empirically demonstrate that the Average Oracle covariance matrix forecasting method is more performant than the current state-of-the-art (and complex) methods, Dynamic Conditional Covariance coupled to Non-Linear Shrinkage (DCC+NLS)10, both in terms of Frobenius distance - as highlighted in Figure 2 - and in terms of four key portfolio metrics: Sharpe ratio, turnover, gross leverage, and diversification10. Figure 2. Average Frobenius distance between the forecasted and the out-of-sample covariance matrices of n = 100 U.S. stocks as a function of the number of past periods . Source: Adapted from Bongiorno et al. These performances are commented as follows in Bongiorno et al.2: The fact that the Average Oracle is a better estimator for time-evolving covariance matrices most often implies that the most recent information contained in the sample eigenvalues is less relevant (and more noisy) than the AO ones that focus on the average transition. Thus, the advantage of the Average Oracle is precisely that it captures some part of the average dynamics that is discarded by the assumption of a constant true covariance matrix [made in the DCC+NLS method]. Implementation details How to choose the number of past periods ? Through extensive simulations, Bongiorno et al.2 concludes that the Average Oracle eigenvalues mainly depend on the number of assets and11 on the number of past periods over which to compute the averaged asset returns covariance matrix. A natural question - unfortunately neither answered in Bongiorno et al.2 nor in Bongiorno and Challet10 - is then how to choose the value of in order to obtain the best forecasting performances? One possible answer, that relies on the interpretation of the Average Oracle covariance matrix forecasting method as a covariance matrix cleaning scheme2, is to select so as to maximize the forecasting performances of a simple moving average covariance matrix forecasting model with a window size equal to for the considered value of . How to choose the number of random time periods ? The number of random time periods must be high enough to ensure that the Average Oracle eigenvalues are stable enough - in particular when is small - because by reducing [], the estimation becomes noisier and thus requires more train and test windows […] to yield average eigenvalues with the same level of precision2. Two examples12: Bongiorno et al.2 uses together with . Bongiorno and Challet10 uses together with and . To be noted, though, that depending on the length of the calibration window and/or on the number of assets , the time periods do not need to be generated at random - they can perfectly be generated deterministically so as to cover the whole calibration window. How to enforce a proper ordering of the Average Oracle eigenvalues? Bongiorno et al.2 stresses that the columns of the eigenvectors [ and ] must always follow the same the eigenvalue ordering convention2. Nevertheless, despite enforcing such a convention, the order of the resulting Average Oracle eigenvalues is not necessarily preserved due to the finite size of the sample13. This may be an unwanted feature within a rotational invariant assumption13, since there is no reason a priori to expect that it is optimal to modify the order of the eigenvalues, that is to say, the variance associated with the principal components13. Bun et al.13 proposes two solutions to this problem: Sort the resulting eigenvalues Perform an isotonic regression on the resulting eigenvalues In the context the cross-validated eigenvalues cleaning scheme described in Reigneron et al.14, the impact of using an isotonic regression is depicted in Figure 3. Figure 3. Raw, cross-validated and isotonic eigenvalues eigenvalues as a function of in-sample eigenvalues. Source: Reigneron et al. Implementation in Portfolio Optimizer Portfolio Optimizer implements the Average Oracle covariance and correlation matrix forecasting models through the endpoints /assets/covariance/matrix/forecast/average-oracle and /assets/correlation/matrix/forecast/average-oracle. These endpoints support the 2 covariance proxies below: Squared (close-to-close) returns Demeaned squared (close-to-close) returns These endpoints also: Implement an isotonic regression correction step for the Average Oracle eigenvalues. Allow to automatically determine the number of past periods , using a proprietary procedure. Allow to either generate a given number of time periods uniformly at random within the calibration window or use all the time periods available within that window. Example of usage - Covariance matrix forecasting at monthly level for a portfolio of various ETFs As an example of usage, I propose to evaluate the empirical performances of the Average Oracle covariance matrix forecating model within the framework of the previous blog bost, whose aim is to forecast monthly covariance and correlation matrices for a portfolio of 10 ETFs representative15 of misc. asset classes: U.S. stocks (SPY ETF) European stocks (EZU ETF) Japanese stocks (EWJ ETF) Emerging markets stocks (EEM ETF) U.S. REITs (VNQ ETF) International REITs (RWX ETF) U.S. 7-10 year Treasuries (IEF ETF) U.S. 20+ year Treasuries (TLT ETF) Commodities (DBC ETF) Gold (GLD ETF) Results - Covariance matrix forecasting Results over the period 31st January 2008 - 31st July 202316 for covariance matrices are the following17: Covariance matrix model Covariance matrix MSE SMA, window size of all the previous months (historical average model) 9.59 SMA,
Covariance Matrix Forecasting: Average Oracle Method
Roman R.

