I am looking into a quite simple task: shrinking the sample covariance matrix of a minor sample of monthly returns data on 5 different assets.

I am using Python to process my data and have been using two different libraries (sklearn and PyPortfolioOpt - both using the Ledoit & Wolf method), which both yield the same problem: My diagonal values (variances) on my assets are way off from the sample variances.

According to the practical paper "An Introduction to Shrinkage Estimation of the Covariance Matrix: A Pedagogic Illustration" (Kwan, 2011), my variances are not supposed to change at all during shrinkage - only the covariances.

Can you guys confirm that only my covariances are supposed shrink and not my variances? If so, can any of you guys explain why I am getting skewed variances when using the Python libraries?

Thanks in advance!


Ledoit-Wolf published several papers on shrinkage, so "Ledoit Wolf" does not uniquely identify the method.

The PyPortfolio Opt documentation describes the available options as follows

Ledoit-Wolf shrinkage:

  • constant_variance shrinkage, i.e the target is the diagonal matrix with the mean of asset variances on the diagonals and zeroes elsewhere. This is the shrinkage offered by sklearn.LedoitWolf

  • single_factor shrinkage. Based on Sharpe’s single-index model which effectively uses a stock’s beta to the market as a risk model. See Ledoit and Wolf 2001 [4].

  • constant_correlation shrinkage, in which all pairwise correlations are set to the average correlation (sample variances are unchanged). See Ledoit and Wolf 2003 [3]

Only the third choice, constant correlation shrinkage from the original Ledoit Wolf 2003 paper leaves the variances alone and only alters the covariances. The first method will reduce large variances and increase small variances. I believe the second method (single factor shrinkage) will also (if I recall correctly).

The Kwan paper, on the other hand, takes the third approach, at least for the examples, and therefore does not change the variances.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.