CovarEstim {HDShOP} | R Documentation |
Covariance matrix estimator
Description
It is a function dispatcher for covariance matrix estimation. One can choose between traditional and shrinkage-based estimators.
Usage
CovarEstim(x, type = c("trad", "BGP14", "LW20"), ...)
Arguments
x |
a p by n matrix or a data frame of asset returns. Rows represent different assets, columns – observations. |
type |
a character. The estimation method to be used. |
... |
arguments to pass to estimators |
Details
The available estimation methods are:
Function | Paper | Type |
Sigma_sample_estimator | traditional | |
CovShrinkBGP14 | Bodnar et al 2014 | BGP14 |
nonlin_shrinkLW | Ledoit & Wolf 2020 | LW20 |
Value
an object of class matrix
Examples
n<-3e2 # number of realizations
p<-.5*n # number of assets
x <- matrix(data = rnorm(n*p), nrow = p, ncol = n)
Mtrx_trad <- CovarEstim(x, type="trad")
TM <- matrix(0, p, p)
diag(TM) <- 1
Mtrx_bgp <- CovarEstim(x, type="BGP14", TM=TM)
Mtrx_lw <- CovarEstim(x, type="LW20")
[Package HDShOP version 0.1.5 Index]