SERVING THE QUANTITATIVE FINANCE COMMUNITY

bskilton81
Topic Author
Posts: 159
Joined: December 16th, 2004, 8:30 pm

### Non-Pos Definite Covariance Matrix in Matlab

I am trying to optimize using a non-positive-definite covariance matrix. So I computed the eigenvalues and vectors in matlab using eigen(C). Then I removed the zero and negative eigenvalues and their corresponding vectors. Then recomputed Cadj (the adjusted C) using V*D*V' where V and D are the adjusted eigenvectors and eigenvalues respectively. I test positive definiteness using p from [R,p] = chol(Cadj), and it is still not positive definite. Am I doing something wrong?

janickg
Posts: 196
Joined: August 3rd, 2004, 1:13 pm

### Non-Pos Definite Covariance Matrix in Matlab

How did you remove those zero and negative eigen values? If you forcefully set them equal to zero your resultant recomposition later will still not be psd numerically. Try setting them to a small positive number, like 1e^-8

bskilton81
Topic Author
Posts: 159
Joined: December 16th, 2004, 8:30 pm

### Non-Pos Definite Covariance Matrix in Matlab

Thanks. That did it. Am I correct in assuming this would screw up the symmetry of the matrix, in which case I should just make C = (C + C')/2?
Last edited by bskilton81 on August 1st, 2006, 10:00 pm, edited 1 time in total.

player
Posts: 2290
Joined: August 5th, 2002, 10:00 am

### Non-Pos Definite Covariance Matrix in Matlab

Can someone clarity an issue for me. I have a matrix which i am trying to make into psd. All eigenvalues are >0 bar 2 which are negative but extremely close to zero. If I change this eigenvalues to something like 1^e-8 then do i just mutiply the matrix of the adjusted eigenvalues with the previous matrix of eigenvectors to get the new psd covaraince matrix?

janickg
Posts: 196
Joined: August 3rd, 2004, 1:13 pm

That is correct.