View source: R/Matrix_shrink.R
nonlin_shrinkLW | R Documentation |
The nonlinear shrinkage estimator of the covariance matrix, that minimizes the minimum variance loss functions as defined in Eq (2.1) of \insertCiteLW2020;textualHDShOP.
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.