Stockportfolio
Stockportfolio
Stockportfolio
c("C", "KEY", "WFC", "JPM", "SO", "DUK", "D", "HE", "EIX", "LUV", "AMGN",
"GILD", "CELG", "BIIB", "CAT", "DE", "IMO", "MRO", "HES", "YPF", "^GSPC")
0.02
0.00
0.01
Return
0.03
0.04
0.00
0.05
0.10
0.15
0.20
0.25
Risk
0.02
0.00
0.01
Return
0.03
0.04
0.00
0.05
0.10
0.15
0.20
0.25
Risk
0.02
0.00
0.01
Return
0.03
0.04
0.05
0.10
0.15
0.20
0.25
Risk
Adjusting the betas using Blumes and Vasiceks techniques in single index model
#Need another historical period:
gr2 <- getReturns(ticker, start='2004-12-31', end='2009-12-31')
#Single index model for period 2004-2009:
sm3SIM <- stockModel(gr2, model='SIM', index=21)
#Update the model using Blume's technique:
simBlu <- adjustBeta(sm1SIM, sm3SIM) # default method is "Blume"
#Update the model using Vasicek's technique:
simVas <- adjustBeta(sm3SIM, method="V")
#Optimize:
op3SIM <- optimalPort(sm3SIM)
opBlu <- optimalPort(simBlu)
opVas <- optimalPort(simVas)
plot(op3SIM, xlim=c(0, 0.25), ylim=c(-0.03, 0.12), main="Betas unadjusted")
portPossCurve(sm3SIM, add=TRUE, riskRange=10)
4
0.05
0.00
Return
0.10
Betas unadjusted
0.00
0.05
0.10
0.15
0.20
Risk
0.25
0.05
0.00
Return
0.10
Betas Blume
0.00
0.05
0.10
0.15
0.20
Risk
0.25
0.00
Return
0.05
0.10
Betas Vasicek
0.00
0.05
0.10
0.15
0.20
Risk
op1
##
##
##
##
##
##
##
##
##
##
##
WFC
JPM
SO
DUK
0.23388976 0.10071405 0.30307486 -0.24457688
EIX
LUV
AMGN
GILD
0.04989857 -0.03429291 -0.08000181 0.06403138
CAT
DE
IMO
MRO
0.01360471 0.11595350 0.31766423 -0.11059292
7
0.25
##
HES
## -0.04398222
YPF
0.05390659
op1CCM
##
##
##
##
##
##
##
##
##
##
##
##
##
WFC
JPM
SO
0.051725845 -0.065997705 0.208502051
HE
EIX
LUV
0.323580180 -0.019731709 -0.012615475
CELG
BIIB
CAT
0.004786165 0.005214365 0.056663054
MRO
HES
YPF
0.026561873 -0.006198388 0.014754625
op1SIM
##
##
##
##
##
##
##
##
##
##
##
##
##
WFC
JPM
0.069728577 -0.073997090
HE
EIX
0.209283933 0.028118640
CELG
BIIB
0.017485828 0.021933434
MRO
HES
0.043138688 0.024329979
SO
0.177268392
LUV
0.014045862
CAT
0.047382433
YPF
0.025554392
op2CCM
##
##
##
##
##
##
##
##
##
##
##
##
##
op2SIM
##
##
##
##
##
##
##
##
##
##
##
##
##
op3SIM
##
##
##
##
##
##
##
##
##
##
##
##
##
opBlu
##
##
##
##
##
##
##
##
##
##
##
##
##