 skafetaur
Topic Author
Posts: 8
Joined: June 11th, 2023, 3:31 pm

### Covariance Matrix Question

Apologies if this question doesn't belong here.

When performing mean-variance optimization on a portfolio of stocks, assuming the optimization and/or investment horizon is 30 days, should I compute the covariance matrix on rolling 30 day historical returns or on 30 day historical returns from non-overlapping periods? And what is the justification for whatever the answer is?

Using the former method (i.e. rolling), I'd have a lot more returns data points for the covariance matrix, whereas using the latter method (i.e. non-overlapping e.g. just month ends), I'd have far fewer data points for the covariance matrix.

Thanks immensely.

Kind Regards. Alan
Posts: 2888
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: Covariance Matrix Question

Probably rolling is ok, as the main issue with mean-variance optimization is the return estimates.

A more careful answer is that it depends on whether or not you want to actually test what you are doing.
Implicitly, you are forming an estimator for a future expected covariance $\hat{C}_{ij}$.

(*) $\hat{C}_{ij} = \beta \, C^H_{ij} + \epsilon$

where "H" denotes a historical value, $\epsilon$ is an error, and your hypothesis is that $\beta = 1$.
You can run regressions using (*) to both check your hypothesis and assign confidence intervals to your estimates.

But, both the regression R-squares and error estimates on $\beta$ will be distorted if you use rolling data periods, as the regression framework requires independent samples. In other words, many traditional stats in a regression results print-out, including your confidence intervals, will be untrustworthy. leptoq
Posts: 194
Joined: February 15th, 2018, 4:42 pm

### Re: Covariance Matrix Question

If you are using covariance matrix in mean-variance optimization and the number of stocks is larger than time window used to estimate cov matrix, your covariance matrix will have 0 eigenvalues and numerically optimization will become meaningless. In this case the industry practice is to use multi-factor risk models to approximate covariance matrix. katastrofa
Posts: 7317
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

### Re: Covariance Matrix Question

Thinking about it, and considering what Alan wrote above, I'd go for the rolling approach for short-term prediction horizon and with the non-overlapping one for a long term (30D+). It's a bias-variance tradeoff.