Maximize expected return with constraints
3 ビュー (過去 30 日間)
古いコメントを表示
Hi guys, I need help for a really easy maximization.
Max E(r)=(mean vector)*(weight vector)'
I want to max the return by changing the weight vector (variable). The mean vector is constant.
The constraints are : (vector of 1's)*(weight vector)' = 1 %weights sum to 1
lb wi >= 0
ub wi =< 1
The solution should give me the Max E(r) and the corresponding (weight vector).
Thank you.
採用された回答
Torsten
2014 年 11 月 14 日
f=-[0.0055; 0.0063; 0.0080; 0.0060; 0.0037; 0.0035; -0.0028; 0.0071; 0.0055; 0.0028];
Aeq=[1 1 1 1 1 1 1 1 1 1];
beq=[1];
lb=zeros(10,1);
ub=ones(10,1);
x = linprog(f,[],[],Aeq,beq,lb,ub);
does not work ?
Best wishes
Torsten.
その他の回答 (4 件)
John D'Errico
2014 年 11 月 14 日
You want to maximize a linear objective function of the weights, subject to a linear equality constraint (that the weights sum to 1) as well as lower (0) and upper (1) bound constraints.
This is just a linear programming problem, and a basic, virtually trivial one at that.
help linprog
If you lack the optimization toolbox, then you will find something on the file exchange.
0 件のコメント
Torsten
2014 年 11 月 14 日
If the mean vector has the same entries at all positions, then the answer is correct ...
Best wishes
Torsten.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!