Skip to content
All library documents

Why a Covariance Matrix Must Be Positive Semidefinite

Article Quant Q&A · Author: Lokesh Luha

Summary

The document explains why covariance matrices must be symmetric and positive semidefinite. It uses three assets with unit variances and pairwise covariances of minus one as an example: the matrix has a negative eigenvalue, so it cannot describe a valid joint distribution of asset returns. The implied pairwise relationships are also contradictory: if one asset is negatively related to each of the other two, those two cannot in turn be perfectly negatively related to each other.

A symmetric positive semidefinite matrix is the condition for a matrix to represent covariances, and such a matrix can be used in the portfolio variance calculation. The question also raises the alternative of calculating variance from an observed weighted portfolio return series, but the supplied answer does not compare that approach with the covariance method. It likewise offers no practical repair for an invalid estimated matrix or discussion of data and estimation error.

Key ideas

  • A covariance matrix must be symmetric and positive semidefinite.
  • A negative eigenvalue signals that a symmetric matrix cannot represent a valid covariance structure.
  • Pairwise covariance assumptions can conflict when considered jointly across several assets.
  • Portfolio variance can be computed from a valid covariance matrix and portfolio weights.

Tags

Full text
# VaR Calculation - Covariance matrix is not positive semidefinite


# VaR Calculation - Covariance matrix is not positive semidefinite












This is a basic question.

I have three assets, equally weighted, and all the mutual covariances are -1. Then, the covariance matrix looks like -

```
 1  -1  -1
-1   1  -1
-1  -1   1
```

Now, to calculate the VaR, I need to calculate the portfolio variance.

Am I correct in concluding that I can't calculate the portfolio variance because this matrix is not positive semidefinite? Here is some R code -

```
v = matrix(c(1, -1, -1, -1, 1, -1, -1, -1, 1), ncol=3)
eigen(v)
  > $eigenvalues
  > 2  2 -1

library(micEcon)
semidefiniteness(v)
  > FALSE
```

My next question is: Given ANY symmetric matrix by a user, how do I figure out if I can use it to calculate portfolio variance (or the covariance matrix)?

Additionally, given the three assets, I can use them to create a weighted time series for the portfolio and calculate the mean and variance of that, and use that to calculate the VaR. How is that different from calculating VaR using teh covariance method?

## Answer by RRG (score 6, accepted)

https://quant.stackexchange.com/a/8787

The given matrix can not represent a covariance matrix since it would imply that asset 1 is negatively correlated to asset 2 and asset 3. But asset 2 is negatively correlated to asset 3 which contradicts the first statement.

In general a covariance matrix has to be positive semi-definite and symmetric, and conversely every positive semi-definite symmetric matrix is a covariance matrix.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.