# Computing covariance matrix with historical data

I have been reading Active Portfolio Management by Grinold and Khan. In the chapter about risk, they mention,

"The third elementary model relies on historical variances and covariances. This procedure is neither robust nor reasonable. Historical models rely on data from T periods to estimate the $$NxN$$ covariance matrix. If T is less than or equal to N, we can find active positions that will appear riskless! So the historical approach requires $$T > N$$. For a monthly historical covariance matrix of S&P 500 stocks, this would require more than 40 years of data."

When forming mean-variance optimal portfolio, we would need to invert the covariance matrix hence, we require a full rank covariance matrix. In this case using historical returns is not robust.

However, if the main intention is to compute an estimate of the variance of the portfolio $$w'\Sigma w$$ where $$w$$ is the weight or holdings of stock, in such a use case, we can estimate $$\Sigma$$ with $$T right? As we are not inverting the covariance matrix, the concern of not full rank is less of an issue, right?

Any help is very much appreciated!

I don’t see how just calculation of Portfolio variance would need an invertible var-covar matrix, I mean you don’t even have to use the matrix notation to calculate it. It may be so that lower time frames would output unstable values of the individual variances and pairwise correlations.

However there are certain methods to achieve a stable covariance matrix in such cases like shrinkage estimation. You’d always be better off using such methods, the above paragraph just comments on the theoretical possibility of such a matrix.

• I don't see how you can estimate $\Sigma$ with $T < N$. Can you explain that ? You have an $N$ by $N$ matrix, $\Sigma$, and $T$ periods of data so it's not possible as far as I can tell. – mark leeds May 7 '20 at 12:34
• I think it's more difficult than that because if they say $T < N$ means that positions will appear riskless, they mean that your covariance matrix is going to have elements that are zero. So, although I'm not clear on why, I'd be careful because those two guys know what they're talking about. It may have something to do with the estimation of the covariance matrix being more complex than plugging in estimated correlations. ( maybe a risk model ? ). If you think you're way is okay, go for it. Or maybe look closer at the book to see what they mean by that statement. – mark leeds May 7 '20 at 20:09
• It may have something to do with independence. If stock X has T observations of returns, you probably don't want to use the same T observations for estimation of the correlations of X with the other N-1 stocks. If you do that, you'll probably end up with a matrix that's not positive definite because the resulting estimates won't be independent because of $T$ < $N$. I'm no whiz at covariance matrix estimation but it probably has something do with the rank of the resulting estimated matrix not being N. – mark leeds May 7 '20 at 20:19
• In the Wikipedia article for shrinkage estimation it says “ If the sample size n is small and the number of considered variables p is large, the above empirical estimators of covariance and correlation are very unstable”. As I said it will be unstable, but OP was asking if it was “theoretically” possible or not, it is. But It’s always better to use certain techniques in case of low observations, I’ll add that to answer to be safe for future readers. – Dhruv Mahajan May 7 '20 at 23:01
• I do not believe it has something to do with independence, I think the main concern would be 1) Usage, non invertible covariance matrixes would be unsuitable for use in many methods from Linear regression to Portfolio optimisation. 2) The Eigenvalues would be spread out and the consistency might become a problems – Dhruv Mahajan May 7 '20 at 23:41