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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 21 20:59:26 CET 2012


Author: opentrades
Date: 2012-11-21 20:59:26 +0100 (Wed, 21 Nov 2012)
New Revision: 1259

Modified:
   pkg/quantstrat/R/rules.R
Log:
updated some comments for OHLC filling conditions



Modified: pkg/quantstrat/R/rules.R
===================================================================
--- pkg/quantstrat/R/rules.R	2012-11-21 02:52:24 UTC (rev 1258)
+++ pkg/quantstrat/R/rules.R	2012-11-21 19:59:26 UTC (rev 1259)
@@ -364,7 +364,7 @@
                             col<-first(colnames(mktdata)[has.Ask(mktdata,which=TRUE)])
                         } else if (isOHLCmktdata) {
                             col<-first(colnames(mktdata)[has.Hi(mktdata,which=TRUE)])
-                            relationship="gt" #look for places where Mkt Bid >= our Ask
+                            relationship="gt" #gt i.o. gte: we don't want unrealistic fills for OHLC
                         } else { #univariate or something built with fn_SpreadBuilder  
                             col<-first(colnames(mktdata)[grep(prefer, colnames(mktdata))])
                             # perhaps we need a has.Price check
@@ -376,7 +376,7 @@
                             col<-first(colnames(mktdata)[has.Bid(mktdata,which=TRUE)])
                         } else if (isOHLCmktdata) {
                             col<-first(colnames(mktdata)[has.Lo(mktdata,which=TRUE)])
-                            relationship="lt" #look for places where Mkt Ask <= our Bid
+                            relationship="lt" #lt i.o. lte: we don't want unrealistic fills for OHLC
                         } else {
                             col<-first(colnames(mktdata)[grep(prefer, colnames(mktdata))])
                         }    
@@ -418,7 +418,7 @@
                             col<-first(colnames(mktdata)[has.Ask(mktdata,which=TRUE)])
                         } else if (isOHLCmktdata) {
                             col<-first(colnames(mktdata)[has.Lo(mktdata,which=TRUE)])
-                            relationship="lt" #look for places where Mkt Ask <= our Bid
+                            relationship="lt" #lt i.o. lte: we don't want unrealistic fills for OHLC
                         } else {
                             col<-first(colnames(mktdata)[grep(prefer, colnames(mktdata))])
                         }    
@@ -430,7 +430,7 @@
                             col<-first(colnames(mktdata)[has.Bid(mktdata,which=TRUE)])
                         } else if (isOHLCmktdata) {
                             col<-first(colnames(mktdata)[has.Hi(mktdata,which=TRUE)])
-                            relationship="gt" #look for places where Mkt Bid >= our Ask
+                            relationship="gt" #gt i.o. gte: we don't want unrealistic fills for OHLC
                         } else {
                             col<-first(colnames(mktdata)[grep(prefer, colnames(mktdata))])
                         }    



More information about the Blotter-commits mailing list