Professional Documents
Culture Documents
[,1]
R1 0.004386283
R2 -0.178794182
R3 0.350696322
R4 0.366530195
R5 0.457181382
#Plot the all the portfolios, draw the tangent, place the 5 stocks:
plot(sigma_p, R_p,xlab="Risk (standard deviation)", ylab="Expected return",xlim=c(0.0,.12), ylim=c(0.0,.
axis(1, at=c(0, 0.02, 0.04, 0.06, 0.08, 0.10, 0.12))
axis(2,at=c(0,0.002, 0.004, 0.006, 0.008, 0.010, 0.012, 0.014, 0.016))
lines(c(0,sd_G, 1.5*sd_G),c(.002,R_Gbar,0.002+slope*(1.5*sd_G)))
#Identify portfolio G:
points(sd_G, R_Gbar, cex=2, col="blue", pch=19)
text(sd_G, R_Gbar+.001, "G")
#Plot the 5 stocks:
points(apply(data,2,sd), colMeans(data), pch=19, cex=1.3, col="green")
0.016
0.012
0.008
0.004
0.000
Expected return
0.00
0.02
0.04
0.06
0.08
0.10
0.12
#Plot the all the portfolios, draw the tangent, place the 5 stocks:
plot(sigma_p, R_p,xlab="Risk (standard deviation)", ylab="Expected return",xlim=c(0.0,.12), ylim=c(0.0,.
axis(1, at=c(0, 0.02, 0.04, 0.06, 0.08, 0.10, 0.12))
axis(2,at=c(0,0.002, 0.004, 0.006, 0.008, 0.010, 0.012, 0.014, 0.016))
lines(c(0,sd_G, 1.3*sd_G),c(-1000,R_Gbar,-1000+slope*(1.3*sd_G)))
#Identify portfolio G:
points(sd_G, R_Gbar, cex=2, col="blue", pch=19)
text(sd_G, R_Gbar+.0005, "G")
0.000
0.004
0.008
Expected return
0.012
0.016
0.00
0.02
0.04
0.06
0.08
x
##
##
##
##
##
##
R1
R2
R3
R4
R5
[,1]
0.1919855
0.2193339
0.1636751
0.2707601
0.1542454
4
0.10
0.12