# how to deal with bad-scaled covariance matrix?

Hi,

When Aetkin linear model is used, problem holder has to provide weight matrix which is defined as $\Sigma^{-1/2}$. As far as the covariance matrix is always positive-defined the raising to the power $1/2$ is just decomposition like $L^T L$ which is performed by Cholesky technique. In my case the covariance matrix is not known in advance, but there are data to provide an estimator of covariance matrix. One can use the estimator instead of the matrix.

I am trying to implement this in a straightforward manner. I get the estimator of covariance matrix, then I convert it to correlation matrix. A dimension of my problem is close to 100 and input data are quite correlated. This leads to that ratio of maximum eigenvalue to minimal one is quite large. Furthermore, some of eigenvalues are negative due to rounding errors which means absence of positive-definiteness. The Cholesky method can't deal with such bad matrix.

Obviously, Kahan summation may increase accuracy by means of rounding error impact but only a little. As far as I know Page method is not exposed to the such issue because it doesn't require inverting of covariance matrix. If there is a way to deal with correlated input data in painless manner?

upd: I found paper[1] which describes several solutions to my problem. But all of them are ad-hoc in my opinion. There are three naive ways discussed: put off-diagonal elements to zero, rotate the source problem to eigen-coordinates and then crop equations which regard to small eigen-values, put small eigen-values to some value by hands.

-
I would suggest finding a way to recast your problem so that you're using the singular value decomposition instead of Cholesky... –  J. M. May 8 '11 at 10:29
add comment

## 1 Answer

If I understand your question properly, you should find a correlation matrix which is close, in some sense, to a given matrix which may have negative eigenvalues. This problem arises often on practice, and there are quite a few papers devoted to it. For example:

N.J. Higham, Computing the nearest correlation matrix - a problem from finance, IMA J. Numer. Anal. 22 (2002), 329-343

S. Boyd and L. Xiao, Least-squares covariance matrix adjustment, SIAM J. Matrix Anal. Appl. 27 (2005), N2, 532-546 http://www.stanford.edu/~boyd/papers/psd_cone_proj.html

as well as some other papers of Higham at http://www.maths.manchester.ac.uk/~higham/papers/ .

I should admit that I worked in a bank some years ago, and encountered this problem on "practice", while computing correlations between various so-called "financial instruments". In all situations I encountered, it was enough to use what is called the cutoff method in the arXiv paper you cite - i.e. zero out the (small) negative eigenvalues. The financial analysts around me considered this as a heavy-duty wizardy and were very pleased.

-
add comment