estRMT: Denoising of Covariance matrix using Random Matrix Theory

Description Usage Arguments Details Author(s) Examples

Description

Denoising of Covariance matrix using Random Matrix Theory

Usage

1
2
estRMT(R, Q = NA, cutoff = c("max", "each"), eigenTreat = c("average",
  "delete"), numEig = 1, parallel = TRUE)

Arguments

R

xts or matrix of asset returns

Q

ratio of rows/size. Can be supplied externally or fit using data

cutoff

takes two values max/each. If cutoff is max, Q is fitted and cutoff for eigenvalues is calculated. If cutoff is each, Q is set to row/size. Individual cutoff for each eigenvalue is calculated and used for filteration.

eigenTreat

takes 2 values, average/delete. If average then the noisy eigenvalues are averged and each value is replaced by average. If delete then noisy eigenvalues are ignored and the diagonal entries of the correlation matrix are replaced with 1 to make the matrix psd.

numEig

number of eigenvalues that are known for variance calculation. Default is set to 1. If numEig = 0 then variance is assumed to be 1.

parallel

boolean to use all cores of a machine.

Details

This method takes in data as a matrix or an xts object. It then fits a marchenko pastur density to eigenvalues of the correlation matrix. All eigenvalues above the cutoff are retained and ones below the cutoff are replaced such that the trace of the correlation matrix is 1 or non-significant eigenvalues are deleted and diagonal of correlation matrix is changed to 1. Finally, correlation matrix is converted to covariance matrix.

Author(s)

Rohit Arora

Examples

1
2
3
4
5
## Not run: 
 data("largereturn")
 model <- estRMT(largesymdata, numEig = 0)

## End(Not run)

arorar/covmat documentation built on May 10, 2019, 1:48 p.m.