How do I find the global minimum variance portfolio?
12 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
Just wondered how you find the GMV portfolio? I have used this code http://www.mathworks.com/matlabcentral/fileexchange/36159-global-minimum-variance-model-and-1-n-model-optimal-asset-allocation but I wondered if there was another way?
0 个评论
回答(1 个)
Alejandra Pena-Ordieres
2021-12-3
Hi Calum,
I understand that you want to find the minimum variance portfolio. You can do this in two ways.
1) The easiest way is to use the Portfolio object. Assume that you have the mean (mu) and covariance (Sigma) of the returns. Then, you can find the minimum variance portfolio like this:
% Define Portfolio object
p = Portfolio('AssetCovar',Sigma,'AssetMean',mu);
p = setDefaultConstraints(p); % Long-only fully-invested portfolio
% Find minimum variance portfolio
w = p.estimateFrontierLimits('min');
Here ( https://www.mathworks.com/help/finance/when-to-use-portfolio-over-problem-based-framework.html ) you can find a list of the portfolio optimization problems that can be solved using the Portfolio object.
2) The second way is to write an optimization problem and solve it:
% 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;
Hope this helps!
Alejandra
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Portfolio Optimization and Asset Allocation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!