September 2nd, 2010, 2:11 pm
Hi onlyaxel,If by negative semi-definite, you really mean negative semi-definite, there is nothing you can do. If however, you mean a matrix which is not postive semi-definite, then you are probably talking about a corrupted correlation matrix. This can happen sometimes, for example when you calculate the matrix from time series some of which may miss some time-points. For a corrupted correlation matrix there is a procedure to "fix" it, i.e. to find the "nearest" correlation matrix. The two properties of a correlation matrix are: - non-negative eigenvalues- 1 on the diagonalYou do the following two steps repeatedly: 1. remove non-negative eigenvalues -> diagonalize your matrix, and floor your eigenvalues at 0, and then change back to the original base2. replace whatever you find on the diagonal with 1 After each step you find a matrix that has only one of the two properties, but after enough iterations you will get one that has both of them within numerical accuracy. If your corrupted correlation matrix is small enough, this procedure converges fairly rapidly, maybe in a hudred steps or so. If the matrix is large, you need a faster algorithm. For such algorithm, consult work done by Highman (just google "nearest correlation matrix"). Best,V.