Estimates the mean and/or covariance matrix of a time series of assets by traditional and robust methods.
1 2 3 4 5 6 7  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)

x 
any rectangular time series object which can be converted by the
function 
method 
a character string, whicht determines how to compute the covariance
matix. If 
check 
a logical flag. Should the covariance matrix be tested to be
positive definite? By default 
force 
a logical flag. Should the covariance matrix be forced to be
positive definite? By default 
baggedR 
when 
sigmamu 
when 
object 
a list as returned by the function 
alpha 
when 
... 
optional arguments to be passed to the underlying estimators.
For details we refer to the manual pages of the functions

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
.
Juliane Schaefer and Korbinian Strimmer for R's corpcov
package,
Diethelm Wuertz for the Rmetrics port.
Breiman L. (1996); Bagging Predictors, Machine Learning 24, 123–140.
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 LargeScale 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.
1 2 3 4 5 6 7 8 9 10 11 12 13  ## 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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.