热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_52019483
赵六。。。
6 年前
trueweixin_52019483

有没有大佬帮忙看一下这个为什么运行不出来呀?
ExpReturn = [0.0408 0.0590 0.0014];

ExpCovariance = [0.0114 0.0054 0.0012
0.0054 0.0072 0.0004
0.0012 0.0004 0.0007]


NumPorts = 10;

Groups = [ 1 0 0; 0 1 1;];
GroupBounds = [ 0, 0,0;0.5,0.5,0.5];


LowerGroup = GroupBounds(:,1);
UpperGroup = GroupBounds(:,2);

p = Portfolio;
p = setAssetMoments(p, ExpReturn, ExpCovariance);
p = setDefaultConstraints(p);
p = setGroups(p, Groups, LowerGroup, UpperGroup);

PortWts = estimateFrontier(p, NumPorts);
[PortRisk, PortReturn] = estimatePortMoments(p, PortWts);

disp([PortRisk, PortReturn]);
disp(PortWts)

CSDN App 扫码分享
分享
评论
4
打赏
  • 复制链接
  • 举报
下一条:
被Python折磨的第五天
立即登录