Effacer les filtres
Effacer les filtres

How to calculate minimum variance portfolio with constraints?

6 vues (au cours des 30 derniers jours)
gsourop
gsourop le 7 Fév 2023
Commenté : Sargondjani le 7 Fév 2023
Dear everyone,
I would like to calculate the weights of a minimum variance portfolio with leverage and short sale constraints. I have found the code below, which winsorizes the weights to 1, namely there the investor cannot leverage her wealth. However, I need to adjust it, so that the investor can leverage up to 2 times her portfolio and short sale up to 1 time her portfolio, in other word the weights (denoted as w) should follow the rule -1<=w<=2 .
% Portfolio problem
prob = optimproblem('ObjectiveSense','minimize');
% Variables
% Portfolio weights
x = optimvar('x',nAssets,1,'LowerBound',0); % x >= 0 (long-only portfolio)
% Objective
% min x'*Sigma*x (Variance)
prob.Objective = x'*Sigma*x;
% Constraints
% Sum of weights equal to 1 (fully-invested)
prob.Constraints.sumToTau = sum(x) == 1;
% Solve problem
sol = solve(prob);
w = sol.x;
  1 commentaire
Sargondjani
Sargondjani le 7 Fév 2023
I dont know how you modelled borrowing. Is it simply modelled as a risk free asset?
Anyway, you would have to set the lower bound for that specific asset to -2*Value of portfolio. Then you need to set the lower bound for the sum weights of all other asset to -1 (ie. you can short the risky portfolio once).

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Portfolio Optimization and Asset Allocation dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by