[Blotter-commits] r1632 - in pkg/quantstrat: . demo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 16 16:00:04 CEST 2014


Author: braverock
Date: 2014-09-16 16:00:04 +0200 (Tue, 16 Sep 2014)
New Revision: 1632

Modified:
   pkg/quantstrat/DESCRIPTION
   pkg/quantstrat/demo/faber.R
   pkg/quantstrat/demo/faber_rebal.R
Log:
- update faber strategies to fix merge issue, thanks Josh


Modified: pkg/quantstrat/DESCRIPTION
===================================================================
--- pkg/quantstrat/DESCRIPTION	2014-09-13 23:30:14 UTC (rev 1631)
+++ pkg/quantstrat/DESCRIPTION	2014-09-16 14:00:04 UTC (rev 1632)
@@ -1,7 +1,7 @@
 Package: quantstrat
 Type: Package
 Title: Quantitative Strategy Model Framework
-Version: 0.8.2
+Version: 0.9.1632
 Date: $Date$
 Author: Peter Carl, Brian G. Peterson, Joshua Ulrich, Jan Humme
 Depends:

Modified: pkg/quantstrat/demo/faber.R
===================================================================
--- pkg/quantstrat/demo/faber.R	2014-09-13 23:30:14 UTC (rev 1631)
+++ pkg/quantstrat/demo/faber.R	2014-09-16 14:00:04 UTC (rev 1632)
@@ -146,14 +146,13 @@
 }
 
 ret1 <- PortfReturns('faber')
-ret1 <- to.monthly(ret1)
 ret1$total <- rowSums(ret1)
 
 View(ret1)
 
 if("package:PerformanceAnalytics" %in% search() || require("PerformanceAnalytics",quietly=TRUE)){
 	getSymbols("SPY", src='yahoo', index.class=c("POSIXt","POSIXct"), from='1999-01-01')
-	SPY<-to.monthly(SPY)
+	SPY<-to.monthly(SPY, indexAt='lastof')  
 	SPY.ret<-Return.calculate(SPY$SPY.Close)
 	dev.new()
 	charts.PerformanceSummary(cbind(ret1$total,SPY.ret), geometric=FALSE, wealth.index=TRUE)

Modified: pkg/quantstrat/demo/faber_rebal.R
===================================================================
--- pkg/quantstrat/demo/faber_rebal.R	2014-09-13 23:30:14 UTC (rev 1631)
+++ pkg/quantstrat/demo/faber_rebal.R	2014-09-16 14:00:04 UTC (rev 1632)
@@ -165,14 +165,13 @@
 }
 
 ret1 <- PortfReturns('faber')
-ret1 <- to.monthly(ret1)
 ret1$total <- rowSums(ret1)
 
 View(ret1)
 
 if("package:PerformanceAnalytics" %in% search() || require("PerformanceAnalytics",quietly=TRUE)){
   getSymbols("SPY", src='yahoo', index.class=c("POSIXt","POSIXct"), from='1999-01-01')
-  SPY <- to.monthly(SPY)
+  SPY<-to.monthly(SPY, indexAt='lastof')
   SPY.ret <- Return.calculate(SPY$SPY.Close)
   dev.new()
   charts.PerformanceSummary(cbind(ret1$total,SPY.ret), geometric=FALSE, wealth.index=TRUE)



More information about the Blotter-commits mailing list