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%。 感謝您的幫助,您可以提供
謝謝..它工作:) –