cov_estim_afm: Approximate Factor Model Covariance Estimation

View source: R/cov_estim_fm.R

cov_estim_afmR Documentation

Approximate Factor Model Covariance Estimation

Description

Computes the Approximate Factor Model (AFM) estimator of the covariance matrix.

Usage

cov_estim_afm(data, factors = NULL, zeromean_log = FALSE, resid_est_func, ...)

Arguments

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

Details

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.

Value

a list with the following entries

  • a pxp estimated covariance matrix.

  • an estimation specific tuning parameter, depending on the estimation function type.

Examples

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]]


antshi/CovEstim documentation built on June 10, 2025, 3:11 a.m.