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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 19 11:48:41 CEST 2014


Author: bodanker
Date: 2014-05-19 11:48:41 +0200 (Mon, 19 May 2014)
New Revision: 1611

Modified:
   pkg/quantstrat/R/rules.R
Log:
- patch 'prefer' handling for univariate series. Thanks to Gaurav Singhal and
  Paul Seymour for the reports and reproducible examples.


Modified: pkg/quantstrat/R/rules.R
===================================================================
--- pkg/quantstrat/R/rules.R	2014-05-09 11:23:39 UTC (rev 1610)
+++ pkg/quantstrat/R/rules.R	2014-05-19 09:48:41 UTC (rev 1611)
@@ -516,6 +516,7 @@
               posQty = getPrice(mktdata, prefer='close')[,1],
               negQty = getPrice(mktdata, prefer='close')[,1]))
     } else { # univariate or something built with fn_SpreadBuilder
+        prefer <- if(hasArg("prefer")) match.call(expand.dots=TRUE)$prefer else NULL
         mktPrices <- list(
           stoplimit = list(
               price = getPrice(mktdata, prefer=prefer)[,1]),



More information about the Blotter-commits mailing list