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 CenterFile 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!

Translated by