Description Usage Arguments Details Author(s) Examples
Denoising and detoning of Covariance matrix using Random Matrix Theory
1 2 3 4 5 6 7 8 9 10 |
R |
xts or matrix of asset returns with columns as return series |
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 averaged 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. |
detone |
boolean to detoning the correlation matrix of the market component, where the market component is assumed to be the eigenvector with the highest eigenvalue |
market_component |
the index of the market component in the eigenvectors and eigenvalues. Defaults to 1 as eigen function automatically ranks in descending order. |
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.
Barry Quinn
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.