Python implementation of Ledoit-Wolf covariance shrinkage towards a constant correlation target (Ledoit & Wolf, JPM 2004).

Most LW shrinkage implementations (e.g. sklearn's LedoitWolf) target a scaled identity. This one implements the constant-correlation target from the original paper, which preserves pairwise correlation structure while regularizing variance. The rho-factor is the key differentiator. Useful when you care about the off-diagonal structure of your covariance estimate in high-dimensional, low-sample-count settings.

Features:

  • Shrinks sample covariance matrix towards constant correlation, not the more common constant variance target
  • Returns both the shrunk covariance matrix sigma and the shrinkage intensity scalar
  • Direct Matlab-to-Python translation of the authors' original covcor.m