IVP

Defined in fynance.algorithms.allocation

IVP(X, normalize=False, low_bound=0., up_bound=1.0)[source]

Get weights of the Inverse Variance Portfolio allocation.

Parameters:
Xarray_like

Each column is a price or return’s asset series.

normalizebool, optional

If True normalize the weights such that \(\sum_{i=1}^{N} w_i = 1\) and \(0 \leq w_i \leq 1\). Default is False.

low_bound, up_boundfloat, optional

Respectively minimum and maximum values of weights, such that low_bound \(\leq w_i \leq\) up_bound \(\forall i\). Default is 0 and 1.

Returns:
np.ndarray

Vector of weights computed by the IVP algorithm.

Notes

w are computed by the inverse of the asset’s variance [3] such that:

\[w_i = \frac{1}{\sigma_k^2} (\sum_{i} \frac{1}{\sigma_i^2})^{-1}\]

With \(\sigma_i^2\) is the variance of asset i.

References