MVP_uc¶
Defined in fynance.algorithms.allocation
- MVP_uc(X, w0=None, up_bound=1., low_bound=0.)[source]
Get weights of the Minimum Variance Portfolio under constraints.
Numerical (SLSQP) Markowitz allocation that minimizes portfolio variance subject to box constraints on each weight, in addition to the sum-to-one constraint. Use this variant whenever short selling must be excluded or per-asset caps need to be enforced; use
MVPfor the unconstrained closed-form solution.- Parameters:
- Xarray_like
Each column is a series of price or return’s asset.
- w0array_like, optional
Initial weights to maximize.
- up_bound, low_boundfloat, 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.