nonlin_shrinkLW {HDShOP} | R Documentation |
The nonlinear shrinkage estimator of the covariance matrix, that minimizes the minimum variance loss functions as defined in Eq (2.1) of Ledoit and Wolf (2020).
nonlin_shrinkLW(x)
x |
a p by n matrix or a data frame of asset returns. Rows represent different assets, columns – observations. |
an object of class matrix
Ledoit O, Wolf M (2020). “Analytical nonlinear shrinkage of large-dimensional covariance matrices.” Annals of Statistics, 48(5), 3043–3065.
n<-3e2
c<-0.7
p<-c*n
mu <- rep(0, p)
Sigma <- RandCovMtrx(p=p)
X <- t(MASS::mvrnorm(n=n, mu=mu, Sigma=Sigma))
Sigma_shr <- nonlin_shrinkLW(X)