필터 지우기
필터 지우기

How to calculate minimum variance portfolio with constraints?

조회 수: 6 (최근 30일)
gsourop
gsourop 2023년 2월 7일
댓글: Sargondjani 2023년 2월 7일
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