[问答]matlab portopt函数[推广有奖] cov = [0.2 0.05 -0.01 0.03;0.05 0.3 0.015 0.01;-0.01 0.015 0.1 0.02;0.03 0.01 0.02 0.1]; >> [std corr] = cov2corr(cov) std = 0.4472 0.5477 0.3162 0.3162 corr = 1.0000 0.2041 -0.0707 0.2121 0.2041 1.0000 0.0866 0.0577 -0.0707 0.0866 1.0000 0.2000 0.2121 0.0577 0.2000 1.0000 >> ExpReturn = [0.2 0.14 0.12 0.05]; >> portopt(ExpReturn,cov) >> hold on >> constr = [1 1 1 1 1;0 0 0 1 0.2;0 0 0 -1 0]; >> portopt(ExpReturn,cov,[],[],constr) Warning: No finite bound constraints for one or more assets. Must use slower QP algorithm. To use faster LCP algorithm, problem should have at least one finite bound constraint. > In portopt at 226 Error using portopt (line 256)No portfolios satisfy all input constraints for maximum-return portfolio. Possibly unbounded problem. 求赐教 为什么无法显示出来有效前沿
2024最新激活全家桶教程,稳定运行到2099年,请移步至置顶文章:https://sigusoft.com/99576.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。 文章由激活谷谷主-小谷整理,转载请注明出处:https://sigusoft.com/88598.html