Efficient frontier in Matlab

7 ビュー (過去 30 日間)
Philippe
Philippe 2014 年 10 月 5 日
編集済み: per isakson 2014 年 10 月 5 日
I'm trying to define the efficient frontier and the efficient portfolio using these lines of code:
%Variance,Covariance matrix and expected return matrix are defined bellow.
%The investment universe contains 4 assets
for r = 0.01:0.002:0.2;
P = [0.0845 0.0466 0.0711 0.0834
0.0466 0.1190 0.0530 0.1140
0.0711 0.0530 0.1410 0.0930
0.0834 0.1140 0.0930 0.1723];
PI = inv(P);
R = [ 0.0725 0.1005 0.1240 0.1425];
RT = R';
UN = ones(4,1);
UNT = UN';
A = R*PI*UN;
B = R*PI*RT;
C = UNT*PI*UN;
L = (C*r-A)/(B*C-A^2);
%Lamda
U = (B-A*r)/(B*C-A^2);
%Mu
X = [PI*((L*RT)+(U*UN))]
%X is giving the asset allocation for each iteration
VarOptimum = L*r + U
end
Now how do I find the mimumum variance asset allocation and how do I "draw" the efficient frontier graph.
Thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangePortfolio Optimization and Asset Allocation についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by