i've following problem using the CAPM funcitons within the performanceanalytics package.
The code as follows:
LI <- apply(FP.CAR,1,mean, na.rm=TRUE))
LA <- window(datensatz_Markt.GGI.D, start=as.Date("2009-06-01"), end=as.Date("2009-11-01")))
#LI and LA are both simple zoo-objects with the content:
> LI
[,1]
2009-06-01 -0.031655213
2009-07-01 0.021612896
2009-08-01 -0.078864013
2009-09-01 0.012067940
2009-10-01 -0.028619972
2009-11-01 -0.006347962
> LA
[,1]
2009-06-01 0.076531901
2009-07-01 0.047163872
2009-08-01 0.041954638
2009-09-01 0.027973415
2009-10-01 0.046670947
2009-11-01 -0.007938671
by appling the functions for calculating the CAPM I get - at least for two out of four - an error or no result:
> CAPM.beta(LI,LA,0)
[1] NA
> CAPM.alpha(LI,LA,0)
Fehler in `[.data.frame`(merged, , 2) : undefined columns selected
> CAPM.CML(LI,LA,0)
[1] -0.02594791
> CAPM.RiskPremium(LI,0)
[,1]
Risk Premium (Rf=0%) -0.01863439
Have you any suggestions where might be the error?