[Uwgarp-commits] r82 - pkg/GARPFRM/demo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 11 05:49:50 CET 2014


Author: tfillebeen
Date: 2014-02-11 05:49:49 +0100 (Tue, 11 Feb 2014)
New Revision: 82

Modified:
   pkg/GARPFRM/demo/demo_CAPM.R
Log:
demo CAPM w/ crsp data

Modified: pkg/GARPFRM/demo/demo_CAPM.R
===================================================================
--- pkg/GARPFRM/demo/demo_CAPM.R	2014-02-09 00:43:33 UTC (rev 81)
+++ pkg/GARPFRM/demo/demo_CAPM.R	2014-02-11 04:49:49 UTC (rev 82)
@@ -1,10 +1,11 @@
 library(PerformanceAnalytics)
-data(managers)
+data(crsp.short)
+R <- largecap.ts[, 1:4]
 
 # Univariate CAPM
 # Run CAPM regression
 # Fiting CAPM
-object = CAPM(managers[,3], managers[,8])
+object = CAPM(R[,3], R[,4])
 
 # Retrieve alpha
 getAlphas(object)
@@ -26,7 +27,7 @@
 # Multiple Linear Model CAPM
 # Run CAPM regression
 # Fiting CAPM
-object = CAPM(managers[,3:7], managers[,8])
+object = CAPM(R[,1:3], R[,4])
 
 # Plot security market line
 chartSML(object)



More information about the Uwgarp-commits mailing list