HCAA_Portfolio: Hierarchical Clustering-Based Asset Allocation

Description Usage Arguments Value References See Also Examples

View source: R/HCAA_Portfolio.R

Description

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).

Usage

1
HCAA_Portfolio(covar, linkage = "ward", graph = FALSE, clusters = NULL)

Arguments

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.

Value

portfolio weights.

References

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.

See Also

HRP_porfolio

Examples

1
2
covar <- cov(daily_returns)
HCAA_Portfolio(covar)

HierPorfolios documentation built on Nov. 8, 2021, 5:09 p.m.