# Portfolio

ratprint:false;

N:11;

3 security data from Jan 2009 to Dec 2009 (FUjiFilmHD, SekisuiHouse, TakaraTomy) 

A : [ -2.16809,4.33229,1.92025,-1.41972,2.25834,-0.54912,
-0.38285,-4.31756,5.16493,-5.17639,1.88393];

B: [-1.834605691,3.842456708,-1.073919354,-1.51653805,
4.329958109,-1.115348598,-1.07580735,-0.212301178,
2.917975085,-4.713649371,0.867308815];

C: [1.666208179,-1.443487619,-4.362726332,14.84260738,
-3.896590989,7.730160053,-0.451499081,-11.31176269,
8.707456329,1.340470751,-5.805989057];

3 security model

ABC:makelist((A[i]*t1+B[i]*t2+C[i]*t3), i, 1, N );

rtnABC:sum(ABC[i], i, 1, N)/N;

varABC: sum((ABC[i]-rtnABC)^2, i, 1, N)/N;

riskABC: sqrt(varABC);

Lagrangean multiplier

Lagr:varABC+lambda*(1-t1-t2-t3);

val:float(solve([diff(Lagr,t1)=0,diff(Lagr,t2)=0,diff(Lagr,t3),t1+t2+t3=1],[t1,t2,t3,lambda]));

minp:float(ev([riskABC, rtnABC], val[1]));

Graphics of 3security model by parameters t and s

ABC2:makelist((A[i]*t+B[i]*s+C[i]*(1-t-s)), i, 1, N );

rtnABC2:sum(ABC2[i], i, 1, N)/N;

riskABC2:sqrt(sum((ABC2[i]-rtnABC2)^2, i, 1, N)/N);

plot3d( [riskABC2, rtnABC2, 0], [t, 0, 1],[s, 0, 1]);

Legal Notice: The copyright for this application is owned by the authors.
The authors are not responsible for any errors contained within and are not liable
for any damages resulting from the use of this material.
This application is intended for non-commercial, non-profit use only.
Contact the authors for permission if you wish to use this application in for-profit activities.
Contact address: Prof. Yukari Shirota, Faculty of Economics, Gakushuin University, 1-5-1 Mejiro,
Toshima-ku, Tokyo, 171-8588 JAPAN,  yukari.shirota@ipsj.or.jp