#### Previous topic

Portfolio allocation

#### Next topic

fynance.algorithms.allocation.HRP

# fynance.algorithms.allocation.ERC¶

fynance.algorithms.allocation.ERC(X, w0=None, up_bound=1.0, low_bound=0.0)

Get weights of Equal Risk Contribution portfolio allocation.

Parameters: X : array_like Each column is a series of price or return’s asset. w0 : array_like, optional Initial weights to maximize. up_bound, low_bound : float, optional Respectively maximum and minimum values of weights, such that low_bound $$\leq w_i \leq$$ up_bound $$\forall i$$. Default is 0 and 1. array_like Weights that minimize the Equal Risk Contribution portfolio.

Notes

Weights of Equal Risk Contribution, as described by S. Maillard, T. Roncalli and J. Teiletche [1], verify the following problem:

$\begin{split}w = \text{arg min } f(w) \\ u.c. \begin{cases}w'e = 1 \\ 0 \leq w_i \leq 1 \\ \end{cases}\end{split}$

With:

$f(w) = N \sum_{i=1}^{N}w_i^2 (\Omega w)_i^2 - \sum_{i,j=1}^{N} w_i w_j (\Omega w)_i (\Omega w)_j$

Where $$\Omega$$ is the variance-covariance matrix of X and $$N$$ the number of assets.

References