[Blotter-commits] r843 - in pkg/quantstrat: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 10 22:19:48 CET 2011


Author: gsee
Date: 2011-11-10 22:19:48 +0100 (Thu, 10 Nov 2011)
New Revision: 843

Modified:
   pkg/quantstrat/R/traderules.R
   pkg/quantstrat/man/ruleSignal.Rd
Log:
typo in docs: maker --> active

Modified: pkg/quantstrat/R/traderules.R
===================================================================
--- pkg/quantstrat/R/traderules.R	2011-11-07 16:16:54 UTC (rev 842)
+++ pkg/quantstrat/R/traderules.R	2011-11-10 21:19:48 UTC (rev 843)
@@ -3,7 +3,7 @@
 #' 
 #' \code{pricemethod} may be one of 
 #'      \describe{ 
-#'          \item{'market', 'opside', or 'maker'}{ will use the 'ask' price if you're buying and 
+#'          \item{'market', 'opside', or 'active'}{ will use the 'ask' price if you're buying and 
 #'            the 'bid' price if you're selling, crossing the market at the time of 
 #'            order entry to attempt to set an aggressive price to get the trade. }
 #' 		   \item{'passive', 'work' or 'join'}{ which will join the 'bid' price if you are buying
@@ -42,7 +42,7 @@
 #' @param sethold boolean, puts entry Rule processing on hold, default FALSE
 #' @seealso \code{\link{osNoOp}} , \code{\link{add.rule}}
 #' @export
-ruleSignal <- function(data=mktdata, timestamp, sigcol, sigval, orderqty=0, ordertype, orderside=NULL, threshold=NULL, tmult=FALSE, replace=TRUE, delay=0.0001, osFUN='osNoOp', pricemethod=c('market','opside','maker'), portfolio, symbol, ..., ruletype, TxnFees=0, prefer=NULL, sethold=FALSE)
+ruleSignal <- function(data=mktdata, timestamp, sigcol, sigval, orderqty=0, ordertype, orderside=NULL, threshold=NULL, tmult=FALSE, replace=TRUE, delay=0.0001, osFUN='osNoOp', pricemethod=c('market','opside','active'), portfolio, symbol, ..., ruletype, TxnFees=0, prefer=NULL, sethold=FALSE)
 {
     if(!is.function(osFUN)) osFUN<-match.fun(osFUN)
     #print(paste(symbol,timestamp, sigval))
@@ -118,7 +118,7 @@
 				}
         )
         if(inherits(orderprice,'try-error')) orderprice<-NULL
-        if(length(orderprice>1) & !pricemethod=='maker') orderprice<-last(orderprice[timestamp])
+        if(length(orderprice>1) && !pricemethod=='maker') orderprice<-last(orderprice[timestamp])
         if(!is.null(orderprice) && !is.null(ncol(orderprice))) orderprice <- orderprice[,1]
 
         if(is.null(orderside) & !isTRUE(orderqty == 0)){

Modified: pkg/quantstrat/man/ruleSignal.Rd
===================================================================
--- pkg/quantstrat/man/ruleSignal.Rd	2011-11-07 16:16:54 UTC (rev 842)
+++ pkg/quantstrat/man/ruleSignal.Rd	2011-11-10 21:19:48 UTC (rev 843)
@@ -5,9 +5,9 @@
   ruleSignal(data = mktdata, timestamp, sigcol, sigval,
   orderqty = 0, ordertype, orderside = NULL, threshold =
   NULL, tmult = FALSE, replace = TRUE, delay = 1e-04, osFUN
-  = "osNoOp", pricemethod = c("market", "opside", "maker"),
-  portfolio, symbol, ..., ruletype, TxnFees = 0, prefer =
-  NULL, sethold = FALSE)
+  = "osNoOp", pricemethod = c("market", "opside",
+  "active"), portfolio, symbol, ..., ruletype, TxnFees = 0,
+  prefer = NULL, sethold = FALSE)
 }
 \arguments{
   \item{data}{an xts object containing market data.
@@ -75,19 +75,19 @@
 }
 \description{
   \code{pricemethod} may be one of \describe{
-  \item{'market', 'opside', or 'maker'}{ will use the 'ask'
-  price if you're buying and the 'bid' price if you're
-  selling, crossing the market at the time of order entry
-  to attempt to set an aggressive price to get the trade. }
-  \item{'passive', 'work' or 'join'}{ which will join the
-  'bid' price if you are buying or join the 'ask' price if
-  you are selling, passively working to make liquidity at
-  the prevailing market price without crossing the market
-  at time of order entry} \item{'maker'}{will create a pair
-  of orders for both bid and offer, modeling market making
-  activities by having orders on both sides. This will then
-  create an Order.Set, and use the \code{threshold} to set
-  the prices for these orders.} }
+  \item{'market', 'opside', or 'active'}{ will use the
+  'ask' price if you're buying and the 'bid' price if
+  you're selling, crossing the market at the time of order
+  entry to attempt to set an aggressive price to get the
+  trade. } \item{'passive', 'work' or 'join'}{ which will
+  join the 'bid' price if you are buying or join the 'ask'
+  price if you are selling, passively working to make
+  liquidity at the prevailing market price without crossing
+  the market at time of order entry} \item{'maker'}{will
+  create a pair of orders for both bid and offer, modeling
+  market making activities by having orders on both sides.
+  This will then create an Order.Set, and use the
+  \code{threshold} to set the prices for these orders.} }
 }
 \details{
   If \code{threshold} is not numeric or \code{NULL} it



More information about the Blotter-commits mailing list