fynance.algorithms.allocation.MVP_uc¶
-
fynance.algorithms.allocation.
MVP_uc
(X, w0=None, up_bound=1.0, low_bound=0.0)¶ Get weights of the Minimum Variance Portfolio under constraints.
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.
Returns: - array_like
Weights that minimize the variance of the portfolio.
Notes
Weights of Minimum Variance Portfolio verify the following problem:
\[\begin{split}w = \text{arg min } w' \Omega w \\ u.c. \begin{cases}w'e = 1 \\ 0 \leq w_i \leq 1 \\ \end{cases}\end{split}\]Where \(\Omega\) is the variance-covariance matrix of X and \(e\) a vector of ones.