[Blotter-commits] r1698 - pkg/quantstrat/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 24 01:00:34 CEST 2015


Author: michaelguan326
Date: 2015-08-24 01:00:31 +0200 (Mon, 24 Aug 2015)
New Revision: 1698

Modified:
   pkg/quantstrat/R/signals.R
Log:
Use GetPrice

Modified: pkg/quantstrat/R/signals.R
===================================================================
--- pkg/quantstrat/R/signals.R	2015-08-09 22:15:56 UTC (rev 1697)
+++ pkg/quantstrat/R/signals.R	2015-08-23 23:00:31 UTC (rev 1698)
@@ -658,7 +658,7 @@
   for(j in 1:length(idx)){
     
     signal.ret[j,] = tryCatch({
-      na.omit(diff(mktdata[idx[j] + (days.increment * days.in.period)  ,4]))
+      na.omit(diff( getPrice(mktdata[idx[j] + (days.increment * days.in.period)  ,]) ))
     }, error = function(e){
       cat('')
       stop('Not enough forward data to evaluate post signal returns.')



More information about the Blotter-commits mailing list