Serving the Quantitative Finance Community

 
User avatar
mywil05
Topic Author
Posts: 0
Joined: May 4th, 2005, 8:10 pm

Correlation question

May 6th, 2005, 3:40 am

Is it possible for a large number of random variables (say 500) to have negative correlation between each other? That is: COV(Xi, Xj) < 0 for any i != j, i, j = 1,2,...,500. If yes or no, how and why? Thanks.
 
User avatar
weare
Posts: 1
Joined: November 18th, 2002, 8:10 am

Correlation question

May 6th, 2005, 4:04 am

The variance-covariance matrix must have a PSD(Positive Semi Definite) property....but if all off-diagonal elements are negative, the matrix looses the PSD property...the property may be simply verified by calculating the determinant.For example, consider a group of random variables having identical correlation say, -20%,if the number of RVs is greater than or equal to 6, the determinant is negative...Jackel shows detail explanation and solutions about this problem...'Monte Carlo Method in Finance' ch.6 salvaging correlation matrix...weare
Last edited by weare on May 5th, 2005, 10:00 pm, edited 1 time in total.
 
User avatar
gjlipman
Posts: 5
Joined: May 20th, 2002, 9:13 pm

Correlation question

May 6th, 2005, 6:42 am

Linked to this mywil05's question:If I have x companies, and I have n returns for each company. I do a correlation matrix for these companies, and look at the determinant, will it always be positive? I appreciate that when you start modifying the correlation matrix, it won't always be positive, but if you don't modify it?If it isn't always positive, is there a number x or n below which it is always positive?
 
User avatar
weare
Posts: 1
Joined: November 18th, 2002, 8:10 am

Correlation question

May 6th, 2005, 8:08 am

The determinants of empirical (estimated) correlation matrix is always not less than zero.Negative determinants are cuased by (the computer or the software) round-off error.
Last edited by weare on May 5th, 2005, 10:00 pm, edited 1 time in total.
 
User avatar
lolillo
Posts: 1
Joined: May 29th, 2002, 8:32 am

Correlation question

May 6th, 2005, 9:16 am

I think that the determinant could be positive and the matrix non Positive Semi Definite.
 
User avatar
gjlipman
Posts: 5
Joined: May 20th, 2002, 9:13 pm

Correlation question

May 6th, 2005, 9:53 am

I'm pretty sure I remember learning that for a symmetric matrix, being pos semi-definate and having non-negative determinant are equivalent.
 
User avatar
JWD
Posts: 13
Joined: March 2nd, 2005, 12:51 pm
Contact:

Correlation question

May 6th, 2005, 11:09 am

There was some previous discussion of negative correlations in a thread on the Student forum called "correlation problem", Click Here . See also the thread "Correlations: Stressed matrices, PD approximations, the N-Sphere, SVD, Cholesky and all that", Click Here for more discussion. My book treats all these correlation issues in detail.Here are some remarks:1. If all off-diagonal elements of the correlation matrix are set equal to r, then the determinant is det = [1+(n-1)*r]* (1-r)^(n-1) . For the determinant to be positive, we need r > -1/(n-1). Thus, the correlation can be somewhat negative, but not too negative. For n = 6 we need r > -20% as weare correctly noted. For 500 variables, essentially the bound is zero, so no, you can’t have negative correlations between all pairs of stocks in the S&P.2. Lollilo is right. A positive definite correlation matrix must have its determinant and also all subdeterminants along the diagonal positive. I believe the statement goes the other way too.3. Unfortunately, real data can lead to non-positive definite matrices. This happens all the time for people who have to produce corporate-level VAR, for a variety of Murphy-law reasons. -------------
Last edited by JWD on May 8th, 2005, 10:00 pm, edited 1 time in total.
Jan Dash, PhD

Editor, World Scientific Encyclopedia of Climate Change:
https://www.worldscientific.com/page/en ... ate-change

Book:
http://www.worldscientific.com/doi/abs/ ... 71241_0053
 
User avatar
gjlipman
Posts: 5
Joined: May 20th, 2002, 9:13 pm

Correlation question

May 6th, 2005, 11:41 am

Reply to JanDash:"2. Lollilo is right. A positive definite correlation matrix must have its determinant and also all subdeterminants positive. I believe the statement goes the other way too. "But Lollilo said that that you could have neg definite correlation matrix and pos determinant - I'm confused."3. Unfortunately, real data can lead to non-positive definite matrices. "Am I right in saying that if your correlation matrix is adjusted in any way (ie not purely calculated from returns of x companies over the same time period), then yes, you may well get negative determinant (and it may be fairly bad). If your correlation matrix is not adjusted in any way, then any negative determinant will be due to computational rounding errors (and consequently should be pretty small).
 
User avatar
JWD
Posts: 13
Joined: March 2nd, 2005, 12:51 pm
Contact:

Correlation question

May 6th, 2005, 11:57 am

Hi gjlipman,1. You need all the subdeterminants along the diagonal to be positive in addition to the overall determinant. So logically I guess you could have the determinant positive but some subdeterminant negative, leading to a non positive-definite (NPD) matrix.2. Machine or rounding noise is not the main cause of the problem for NPD correlation matrices. Even if you do not stress the correlations, the data are not generally “mathematically pristine”, and so you can get a NPD correlation matrix straight from data. This actually happens often in practice, and corrective measures have to be applied, forming a bottleneck in producing the VAR. The severity of the problem is related to the ratio of the sum of the negative eigenvalues relative to the sum of all eigenvalues, and this is related to the quality of the data. You might be lucky and get a positive-definite result from your particular data, but …
Last edited by JWD on May 8th, 2005, 10:00 pm, edited 1 time in total.
Jan Dash, PhD

Editor, World Scientific Encyclopedia of Climate Change:
https://www.worldscientific.com/page/en ... ate-change

Book:
http://www.worldscientific.com/doi/abs/ ... 71241_0053
 
User avatar
gjlipman
Posts: 5
Joined: May 20th, 2002, 9:13 pm

Correlation question

May 6th, 2005, 12:02 pm

Ah, ok. Am happy with your first point.When you say "the data are not generally “mathematically pristine”", what do you mean by this? If I have x companies and n returns for each, and form my correlation matrix using excel's correl() function, won't it be mathematically pristine (excusing rounding errors)?
 
User avatar
lolillo
Posts: 1
Joined: May 29th, 2002, 8:32 am

Correlation question

May 6th, 2005, 2:00 pm

A symetric matrix has always real eigenvalues, but they could be either positive or negative.A matrix is positive semi definite if every eigenvalue is greater than or equal to zero.The determinant is the product of all of the eigenvalues.Imagine the case in which all eigenvalues but two were positive (the other two are negative).Then the determinant would be positive and the matrix would be non positive semidefinite.
 
User avatar
JWD
Posts: 13
Joined: March 2nd, 2005, 12:51 pm
Contact:

Correlation question

May 6th, 2005, 2:07 pm

Good - and any 2x2 subdeterminant along the diagonal containing one positive eigenvalue and one negative eigenvalue will be negative.
Jan Dash, PhD

Editor, World Scientific Encyclopedia of Climate Change:
https://www.worldscientific.com/page/en ... ate-change

Book:
http://www.worldscientific.com/doi/abs/ ... 71241_0053
 
User avatar
mywil05
Topic Author
Posts: 0
Joined: May 4th, 2005, 8:10 pm

Correlation question

May 6th, 2005, 3:22 pm

Jan, thanks for your detailed explanation, it is really helpful. I searched your book on amazon.com and it is a very interesting book. But I am a poor PhD student looking for a quant job, may not be able to buy it at this time In your guys' opinion, what's the best book for Linear Algebra? It seems my knowledge on it becomes rusty. I need a book not too theoretical and not too expensive, of course not too simple to be used in advanced problems like this. Is the book from Schaum's guide " Theory and Problems of Linear Algebra (Paperback, 2000) Author: Marc Lars Lipson, Seymour Lipschutz " good enough? Thanks a lot for your advice!
 
User avatar
Rez
Posts: 24
Joined: May 28th, 2003, 9:27 pm

Correlation question

May 9th, 2005, 1:34 am

Since we really work with covariance matrices (stats) or with Hessian matrices (optimization), we can focus on symmetric matrices. If you want to use determinants, you can check the (leading) principal minors. A symmetric (or Herimitian if complex) matrix will be:* Positive definite iff all leading principal minors are positive* Negative definite iff the leading principal minors alternate signs (+, -, +, ...)The k-th leading principal minor is the determinant of the (kxk) submatrix starting from the top left corner, e.g.pm1 = a11pm2 = det({a11,a12},{a21,a22}})pm3 = det({a11,a12,a13},{a21,a22,a23},{a31,a32,a33}})etc.Hope I got that correct Cheers
 
User avatar
JWD
Posts: 13
Joined: March 2nd, 2005, 12:51 pm
Contact:

Correlation question

May 9th, 2005, 2:56 am

Hi Rez,Yes, you are right. Thanks for the clarification. The principal minors positivity condition is sufficient for a positive definite matrix. However, it appears to me that since the ordering does not matter, the rows and columns can be relabled so that in fact any subdeterminant along the diagonal has to be positive. I have modified my previous posts to include the restriction "along the diagonal".------------
Last edited by JWD on May 8th, 2005, 10:00 pm, edited 1 time in total.
Jan Dash, PhD

Editor, World Scientific Encyclopedia of Climate Change:
https://www.worldscientific.com/page/en ... ate-change

Book:
http://www.worldscientific.com/doi/abs/ ... 71241_0053