To estimate the covariance matrix, Ledoit and Wolf (2004) suggests using the
matrix obtained from the sample covariance matrix through a transformation
called shrinkage. This tends to pull the most extreme coefficients
towards more central values, thereby systematically reducing estimation error
where it matters most. Statistically, the challenge is to know the optimal
shrinkage intensity, and they also give the formula for that.
Note: The input matrix here is T-by-N, while the description in the
referenced paper assumes the matrix of stock returns is N-by-T.
"Olivier Ledoit and Michael Wolf, "Honey, I Shrunk the Sample Covariance
Matrix," in Journal of Portfolio Management, Volume 31, Number 1, 2004."
"Olivier Ledoit and Michael Wolf, "Improved Estimation of the Covariance
Matrix of Stock Returns With an Application to Portfolio Selection," in
Journal of Empirical Finance, Volume 10, Issue 5, December 2003, pages