sigma_estim_afm: Approximate Factor Model (AFM) Covariance Estimation

Description Usage Arguments Details Value Examples

View source: R/cov-estim-factor.R

Description

Computes the AFM estimator of the covariance matrix.

Usage

1
2
3
4
5
6
7
sigma_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{Σ} = B\hat{Σ}_F B' + \hat{Σ_u},

where \hat{Σ}_F is the sample covariance matrix of the common factors and \hat{Σ}_u is the residuals covariance matrix, estimated with the user-sapplied estim_func.

Value

a list with the following entries

Examples

1
2
3
4
5
6
data(sp200)
sp_rets <- sp200[,-1]
sigma_afm <- sigma_estim_afm(sp_rets, resid_est_func=sigma_estim_lwnl)[[1]]
results_afm <- sigma_estim_afm(sp_rets, resid_est_func=sigma_estim_lwone, shrink_int=0.1)
sigma_afm <- results_afm[[1]]
param_afm <- results_afm[[2]]

antshi/CovEstim documentation built on Nov. 13, 2020, 2:25 p.m.