HRP: Design of hierarchical risk parity portfolios

Description Usage Arguments Details

View source: R/HRP.R

Description

This function designs a hierarchical risk parity portfolio based on Lopez de Prado's paper "Building Diversified Portfolios that Outperform Out-of-Sample" (2015).

Usage

1
2
3
4
5
6
7
8
9
HRP(
  asset_prices = NULL,
  asset_returns = NULL,
  Sigma = NULL,
  method = "single",
  w_min = NULL,
  w_max = NULL,
  lam = 1
)

Arguments

asset_prices

An XTS object of the asset prices.

asset_returns

An XTS object of the asset returns.

Sigma

Covariance matrix of returns. If none is provided, the covariance matrix will be computed from the returns.

method

String indicating the desired hierarchical clustering method. Must be one of c("single", "complete", "average" ,"ward.D", "ward.D2", "divisive"). If method="divisive", divisive clustering (or the DIANA algorithm)is used, otherwise agglomerative clustering is used with method referring to the desired linkage function.

w_min

Scalar or vector with values between 0,1 to control the minimum value of weights.

w_max

Scalar or vector with values between 0,1 to control the maximum value of weights.

lam

Non-negative tuning parameter to control the concentration into different clusters.

Details

This portfolio allocation method utilizes hierarchical clustering to seriate the correlation matrix of asset returns, then recursively allocates the portfolio weights via naive risk parity and "recursive bisection".


jackylauu/hierarchicalPortfolios documentation built on Dec. 20, 2021, 8:06 p.m.