Learn R Programming

HDShOP (version 0.1.5)

nonlin_shrinkLW: nonlinear shrinkage estimator of the covariance matrix of Ledoit and Wolf (2020)

Description

The nonlinear shrinkage estimator of the covariance matrix, that minimizes the minimum variance loss functions as defined in Eq (2.1) of LW2020;textualHDShOP.

Usage

nonlin_shrinkLW(x)

Value

an object of class matrix

Arguments

x

a p by n matrix or a data frame of asset returns. Rows represent different assets, columns -- observations.

References

Examples

Run this code
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)

Run the code above in your browser using DataLab