[Blotter-commits] r1506 - pkg/quantstrat/demo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Sep 14 13:56:33 CEST 2013


Author: braverock
Date: 2013-09-14 13:56:33 +0200 (Sat, 14 Sep 2013)
New Revision: 1506

Modified:
   pkg/quantstrat/demo/faber.R
Log:
- fix return calc in demo

Modified: pkg/quantstrat/demo/faber.R
===================================================================
--- pkg/quantstrat/demo/faber.R	2013-09-14 11:15:23 UTC (rev 1505)
+++ pkg/quantstrat/demo/faber.R	2013-09-14 11:56:33 UTC (rev 1506)
@@ -153,6 +153,7 @@
 	getSymbols("SPY", src='yahoo', index.class=c("POSIXt","POSIXct"), from='1999-01-01')
 	SPY<-to.monthly(SPY)
 	SPY.ret<-Return.calculate(SPY$SPY.Close)
+  SPY.ret<-na.omit(SPY.ret)
 	index(SPY.ret)<-index(ret1)
 	dev.new()
 	charts.PerformanceSummary(cbind(ret1$total,SPY.ret), geometric=FALSE, wealth.index=TRUE)



More information about the Blotter-commits mailing list