Many thanks. One more question, in terms of assetcovar, is order matters? I got a 6*6 mean-covariance matrix, but don't really know how to put into the assetcovar.
Max Sharpe ratio errors
9 次查看(过去 30 天)
显示 更早的评论
p = Portfolio('AssetMean',[0.3, 0.1, 0.5], 'AssetCovar',... [0.01, -0.010, 0.004; -0.010, 0.040, -0.002; 0.004, -0.002, 0.023] );
p = setDefaultConstraints(p);
plotFrontier(p, 20);
weights = estimateMaxSharpeRatio(p);
[risk, ret] = estimatePortMoments(p, weights);
hold on
plot(risk,ret,'*r');
The expression to the left of the equals sign is not a valid target for an assignment. This is the output.
Many thanks
另请参阅
类别
在 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!