AlejandroSantorum / scikit-rmt

Random Matrix Theory library - RMT analysis and simulation in Python
BSD 3-Clause "New" or "Revised" License
37 stars 7 forks source link

linear_shrinkage_estimator #3

Closed mpatsoskon closed 2 years ago

mpatsoskon commented 2 years ago

I would like to mention that in def linear_shrinkage_estimator, you don't apply the paper of Ledoit, O. and Wolf, M. "A well-conditioned estimator for large-dimensional covariance matrices". Journal of Multivariate Analysis. 88 (2004): 365-411 But, you apply the paper of Ledoit, O. and Wolf, M. "Honey, I Shrunk the Sample Covariance Matrix". The Journal of Portfolio Management 30.4 (2004): 110-119.

AlejandroSantorum commented 2 years ago

Dear Konstantinos,

Thank you for your comment. I have check the provided information and in Prof. Wolf's webpage there are available the mentioned articles along the code to replicate them. The function cov1Para in file cov1Para.py replicates the code for "A well-conditioned estimator for large-dimensional covariance matrices". Journal of Multivariate Analysis. 88 (2004): 365-411, as mentioned in the root page of the referenced repository.

You can check that linear_shrinkage_estimator implements the same function as cov1Para since (scikit-rmt implementation)

# compute shrinkage constant
kappa= phi/gamma
shrinkage=max(0, min(1, kappa/n_size))

is the same as

# diagonal part of the parameter that we call rho 
rho_diag=0;

# off-diagonal part of the parameter that we call rho 
rho_off=0;

# compute shrinkage intensity
rhohat=rho_diag+rho_off
kappahat=(pihat-rhohat)/gammahat
shrinkage=max(0,min(1,kappahat/n))

If I am wrong, please let me know. Thank you for your message