1
我想通过最小化VaR来找到多资产组合中的最优权重。 这是给目标回报带来最小风险的代码。如何在Matlab中添加CVaR优化代码中的约束?
p = PortfolioCVaR('ProbabilityLevel', .99, 'AssetNames', names);
p = p.setScenarios(R); % R= asset returns
p = p.setDefaultConstraints();
wts = p.estimateFrontier(20);
portRisk = p.estimatePortRisk(wts);
portRet = p.estimatePortReturn(wts);
clf
visualizeFrontier(p, portRisk, portRet);
%% Compute portfolio with given level of return
tic;
wt = p.estimateFrontierByReturn(.05/100);
toc;
pRisk = p.estimatePortRisk(wt);
pRet = p.estimatePortReturn(wt);
权重的总和= 1 ..我的问题是如何添加一个约束,使没有资产的权重可以大于60%。 感谢您的帮助,您可以提供
谢谢..它工作:) –