How to calculate minimum variance portfolio with constraints?

6 次查看(过去 30 天)
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 个评论
Sargondjani
Sargondjani 2023-2-7
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).

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Portfolio Optimization and Asset Allocation 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by