HRP(X, method='single', metric='euclidean', low_bound=0.0, up_bound=1.0)¶
Get weights of the Hierarchical Risk Parity allocation.
- X : array_like
Each column is a price or return’s asset series. Some errors will happen if one or more series are constant.
- method, metric: str
Parameters for linkage algorithm, default
- low_bound, up_bound : float
Respectively minimum and maximum value of weights, such that low_bound \(\leq w_i \leq\) up_bound \(\forall i\). Default is 0 and 1.
Vecotr of weights computed by HRP algorithm.
Hierarchical Risk Parity algorithm is developed by Marco Lopez de Prado . First step is clustering and second step is allocating weights.