HCAA_Portfolio {HierPortfolios} | R Documentation |
Performs the Hierarchical Clustering-Based Asset Allocation strategy proposed by Raffinot (2017). Several linkage methods for the hierarchical clustering can be used, by default the "ward" linkage is used. The numbers of clusters is selected using the Gap index of Tibshirani et al. (2001).
HCAA_Portfolio(covar, linkage = "ward", graph = FALSE, clusters = NULL)
covar |
Covariance matrix of returns. The covariance matrix will be transformed into correlation matrix and then into a distance matrix. |
linkage |
Linkage method used in the hierarchical clustering. Allowed options are "single", "complete", "average" or "ward". Default option is "ward". |
graph |
To plot de dendrogram set this value to TRUE. By default this value is equal to FALSE. |
clusters |
Numbers of clusters. If NULL (default), the gap index is applied. |
portfolio weights.
Carlos Trucios
Raffinot, Thomas. "Hierarchical clustering-based asset allocation." The Journal of Portfolio Management 44.2 (2017): 89-99.
Tibshirani, Robert, Guenther Walther, and Trevor Hastie. "Estimating the number of clusters in a data set via the gap statistic." Journal of the Royal Statistical Society: Series B (Statistical Methodology) 63.2 (2001): 411-423.
HRP_Portfolio
, HERC_Portfolio
and DHRP_Portfolio
covar <- cov(daily_returns)
HCAA_Portfolio(covar)