| Title: | Filter Covariance and Correlation Matrices with Bootstrapped-Averaged Hierarchical Ansatz |
|---|---|
| Description: | A method to filter correlation and covariance matrices by averaging bootstrapped filtered hierarchical clustering and boosting. See Ch. Bongiorno and D. Challet, Covariance matrix filtering with bootstrapped hierarchies (2020) <arXiv:2003.05807> and Ch. Bongiorno and D. Challet, Reactive Global Minimum Variance Portfolios with k-BAHC covariance cleaning (2020) <arXiv:2005.08703>. |
| Authors: | Christian Bongiorno and Damien Challet |
| Maintainer: | Damien Challet <[email protected]> |
| License: | GPL |
| Version: | 0.3.0 |
| Built: | 2026-06-03 06:31:21 UTC |
| Source: | https://github.com/cran/bahc |
Compute the BAHC correlation matrix.
filterCorrelation(x, k = 1, Nboot = 100)filterCorrelation(x, k = 1, Nboot = 100)
x |
A matrix: |
k |
The order of filtering. |
Nboot |
The number of bootstrap copies |
The BAHC-filtered correlation matrix of x.
r=matrix(rnorm(1000),nrow=20) # 20 objects, 50 features each Cor_bahc=filterCorrelation(r)r=matrix(rnorm(1000),nrow=20) # 20 objects, 50 features each Cor_bahc=filterCorrelation(r)
Compute the BAHC covariance matrix.
filterCovariance(x, k = 1, Nboot = 100)filterCovariance(x, k = 1, Nboot = 100)
x |
A matrix: |
k |
The order of filtering. |
Nboot |
The number of bootstrap copies |
The BAHC-filtered correlation matrix of x.
r=matrix(rnorm(1000),nrow=20) # 20 objects, 50 features each sigma=exp(runif(20)) rs=t(sigma %*% r) %*% sigma Cov_bahc=filterCovariance(rs)r=matrix(rnorm(1000),nrow=20) # 20 objects, 50 features each sigma=exp(runif(20)) rs=t(sigma %*% r) %*% sigma Cov_bahc=filterCovariance(rs)