cov_estim_afm | R Documentation |
Computes the Approximate Factor Model (AFM) estimator of the covariance matrix.
cov_estim_afm(data, factors = NULL, zeromean_log = FALSE, resid_est_func, ...)
data |
an nxp data matrix. |
factors |
a nxf matrix with factors. Default value is NULL and the factor is equal to the cross-sectional average of all the variables in the data. |
zeromean_log |
a logical, indicating whether the data matrix has zero means (TRUE) or not (FALSE). Default value is FALSE. |
resid_est_func |
a covariance estimation function, applied to the residuals covariance matrix. |
... |
further arguments to be parsed to resid_est_func |
The AFM covariance estimator is calculated with the following formula:
\hat{\Sigma} = B\hat{\Sigma}_F B' + \hat{\Sigma_u},
where \hat{\Sigma}_F
is the sample covariance matrix of the common factors and
\hat{\Sigma}_u
is the residuals covariance matrix, estimated with the user-sapplied estim_func.
a list with the following entries
a pxp estimated covariance matrix.
an estimation specific tuning parameter, depending on the estimation function type.
data(rets_m)
# using the Ledoit-Wolf nonlinear shrinkage estimator
sigma_afm <- cov_estim_afm(rets_m, resid_est_func = cov_estim_lwnl)[[1]]
# using the Ledoit-Wolf linear shrinkage estimator with shrinkage intensity 0.1
sigma_afm <- cov_estim_afm(rets_m, resid_est_func = cov_estim_lwone, shrink_int = 0.1)[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.