assetsMeanCov(x,
method = c("cov", "mve", "mcd", "MCD", "OGK", "nnve", "shrink", "bagged"),
check = TRUE, force = TRUE, baggedR = 100, sigmamu = scaleTau2,
alpha = 1/2, ...)
getCenterRob(object)
getCovRob(object)
as.matrix()
into a matrix object, e.g. like an
object of class timeSeries
, data.frame
, or mts
.method="cov"
is selected then the standard
covariance will be computed by R's base function cov
, if
method="shrink"
TRUE
.TRUE
.methode="bagged"
, an integer value, the number of
bootstrap replicates, by default 100.methode="OGK"
, a function that computes univariate robust
location and scale estimates. By default it should return a single
numeric value containing the robust scale (standard deviation)
estimate. When m
assetsMeanCov
.methode="MCD"
, a numeric parameter controlling the size
of the subsets over which the determinant is minimized, i.e.,
alpha*n
observations are used for computing the determinant.
Allowed values arecov.rob
for arguments "mve"
and "mcd"
in
the R package MASS
assetsMeanCov
returns a list with for entries named center
cov
,
mu
and Sigma
. The list may have a character vector
attributed with additional control parameters.
getCenterRob
extracts the center from an object as returned by the function
assetsMeanCov
.
getCovRob
extracts the covariance from an object as returned by the function
assetsMeanCov
.Ledoit O., Wolf. M. (2003); ImprovedEestimation of the Covariance Matrix of Stock Returns with an Application to Portfolio Selection, Journal of Empirical Finance 10, 503--621.
Schaefer J., Strimmer K. (2005); A Shrinkage Approach to Large-Scale Covariance Estimation and Implications for Functional Genomics, Statist. Appl. Genet. Mol. Biol. 4, 32.
Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.
## LPP -
LPP <- as.timeSeries(data(LPP2005REC))[, 1:6]
colnames(LPP)
## Sample Covariance Estimation:
assetsMeanCov(LPP)
## Shrinked Estimation:
shrink <- assetsMeanCov(LPP, "shrink")
shrink
## Extract Covariance Matrix:
getCovRob(shrink)
Run the code above in your browser using DataLab