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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 19 00:39:54 CET 2012


Author: opentrades
Date: 2012-11-19 00:39:54 +0100 (Mon, 19 Nov 2012)
New Revision: 1252

Modified:
   pkg/quantstrat/R/paramsets.R
Log:
paramsets tradeStats now skips portfolios with NULL results



Modified: pkg/quantstrat/R/paramsets.R
===================================================================
--- pkg/quantstrat/R/paramsets.R	2012-11-13 21:35:40 UTC (rev 1251)
+++ pkg/quantstrat/R/paramsets.R	2012-11-18 23:39:54 UTC (rev 1252)
@@ -388,8 +388,9 @@
             updatePortf(result$portfolio.st, Dates=paste('::',as.Date(Sys.time()),sep=''))
 
             result$tradeStats <- tradeStats(result$portfolio.st)
+            if(!is.null(result$tradeStats))
+                results$tradeStats <- rbind(results$tradeStats, cbind(result$param.combo, result$tradeStats))
 
-            results$tradeStats <- rbind(results$tradeStats, cbind(result$param.combo, result$tradeStats))
             results[[result$portfolio.st]] <- result
         }
         return(results)



More information about the Blotter-commits mailing list