[Blotter-commits] r1026 - in pkg/quantstrat: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 18 19:40:24 CEST 2012
Author: braverock
Date: 2012-05-18 19:40:23 +0200 (Fri, 18 May 2012)
New Revision: 1026
Modified:
pkg/quantstrat/DESCRIPTION
pkg/quantstrat/R/rules.R
pkg/quantstrat/man/add.indicator.Rd
pkg/quantstrat/man/add.init.Rd
pkg/quantstrat/man/add.rule.Rd
pkg/quantstrat/man/add.signal.Rd
pkg/quantstrat/man/addOrder.Rd
pkg/quantstrat/man/addPosLimit.Rd
pkg/quantstrat/man/applyIndicators.Rd
pkg/quantstrat/man/applyParameter.Rd
pkg/quantstrat/man/applyRules.Rd
pkg/quantstrat/man/applySignals.Rd
pkg/quantstrat/man/applyStrategy.Rd
pkg/quantstrat/man/getOrders.Rd
pkg/quantstrat/man/initOrders.Rd
pkg/quantstrat/man/initStrategy.Rd
pkg/quantstrat/man/osMaxPos.Rd
pkg/quantstrat/man/osNoOp.Rd
pkg/quantstrat/man/paramConstraint.Rd
pkg/quantstrat/man/ruleOrderProc.Rd
pkg/quantstrat/man/ruleSignal.Rd
pkg/quantstrat/man/setParameterConstraint.Rd
pkg/quantstrat/man/setParameterDistribution.Rd
pkg/quantstrat/man/sigComparison.Rd
pkg/quantstrat/man/sigCrossover.Rd
pkg/quantstrat/man/sigPeak.Rd
pkg/quantstrat/man/sigThreshold.Rd
pkg/quantstrat/man/strategy.Rd
pkg/quantstrat/man/updateOrders.Rd
pkg/quantstrat/man/updateStrategy.Rd
Log:
- add rule.order option to applyRules
- update roxygen docs
- bump version
Modified: pkg/quantstrat/DESCRIPTION
===================================================================
--- pkg/quantstrat/DESCRIPTION 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/DESCRIPTION 2012-05-18 17:40:23 UTC (rev 1026)
@@ -1,10 +1,10 @@
Package: quantstrat
Type: Package
Title: Quantitative Strategy Model Framework
-Version: 0.6.6
+Version: 0.6.7
Date: $Date$
Author: Peter Carl, Dirk Eddelbuettel, Brian G. Peterson,
- Jeffrey A. Ryan, Joshua Ulrich, Garrett See
+ Jeffrey A. Ryan, Joshua Ulrich, Garrett See
Depends:
xts(>= 0.8-2),TTR(>= 0.2),blotter(>= 0.7.2),
FinancialInstrument(>= 0.12.5)
Modified: pkg/quantstrat/R/rules.R
===================================================================
--- pkg/quantstrat/R/rules.R 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/R/rules.R 2012-05-18 17:40:23 UTC (rev 1026)
@@ -202,9 +202,20 @@
#' @param parameters named list of parameters to be applied during evaluation of the strategy,default NULL, only needed if you need special names to avoid argument collision
#' @param ... any other passthru parameters
#' @param path.dep TRUE/FALSE whether rule is path dependent, default TRUE, see Details
+#' @param rule.order default NULL, use at your own risk to adjust order of rule evaluation
#' @seealso \code{\link{add.rule}} \code{\link{applyStrategy}}
#' @export
-applyRules <- function(portfolio, symbol, strategy, mktdata, Dates=NULL, indicators=NULL, signals=NULL, parameters=NULL, ..., path.dep=TRUE) {
+applyRules <- function(portfolio,
+ symbol,
+ strategy,
+ mktdata,
+ Dates=NULL,
+ indicators=NULL,
+ signals=NULL,
+ parameters=NULL,
+ ...,
+ path.dep=TRUE,
+ rule.order=NULL) {
# TODO check for symbol name in mktdata using Josh's code:
# symbol <- strsplit(colnames(mktdata)[1],"\\.")[[1]][1]
@@ -613,7 +624,12 @@
}
# evaluate the rule types in the order listed in the documentation
# thanks to Aleksandr Rudnev for tracking this down (R-SIG-Finance, 2011-01-25)
- types <- sort(factor(names(strategy$rules), levels=c("pre","risk","order","rebalance","exit","enter","entry","post")))
+ if(is.null(rule.order)){
+ types <- sort(factor(names(strategy$rules), levels=c("pre","risk","order","rebalance","exit","enter","entry","post")))
+ } else {
+ print("Be aware that order of operations matters, and poor choises in rule order can create unintended consequences.")
+ types <- rule.order
+ }
for ( type in types ) {
switch( type ,
pre = {
Modified: pkg/quantstrat/man/add.indicator.Rd
===================================================================
--- pkg/quantstrat/man/add.indicator.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/add.indicator.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,9 +2,9 @@
\alias{add.indicator}
\title{add an indicator to a strategy}
\usage{
- add.indicator(strategy, name, arguments, parameters =
- NULL, label = NULL, ..., enabled = TRUE, indexnum = NULL,
- store = FALSE)
+ add.indicator(strategy, name, arguments,
+ parameters = NULL, label = NULL, ..., enabled = TRUE,
+ indexnum = NULL, store = FALSE)
}
\arguments{
\item{strategy}{an object (or the name of an object) type
Modified: pkg/quantstrat/man/add.init.Rd
===================================================================
--- pkg/quantstrat/man/add.init.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/add.init.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,8 +3,8 @@
\title{add arbitrary initialization functions to a strategy}
\usage{
add.init(strategy, name, arguments, parameters = NULL,
- label = NULL, ..., enabled = TRUE, indexnum = NULL, store
- = FALSE)
+ label = NULL, ..., enabled = TRUE, indexnum = NULL,
+ store = FALSE)
}
\arguments{
\item{strategy}{an object (or the name of an object) of
Modified: pkg/quantstrat/man/add.rule.Rd
===================================================================
--- pkg/quantstrat/man/add.rule.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/add.rule.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,10 +3,10 @@
\title{add a rule to a strategy}
\usage{
add.rule(strategy, name, arguments, parameters = NULL,
- label = NULL, type = c(NULL, "risk", "order",
- "rebalance", "exit", "enter"), ..., enabled = TRUE,
- indexnum = NULL, path.dep = TRUE, timespan = NULL, store
- = FALSE, storefun = TRUE)
+ label = NULL,
+ type = c(NULL, "risk", "order", "rebalance", "exit", "enter"),
+ ..., enabled = TRUE, indexnum = NULL, path.dep = TRUE,
+ timespan = NULL, store = FALSE, storefun = TRUE)
}
\arguments{
\item{strategy}{an object of type 'strategy' to add the
Modified: pkg/quantstrat/man/add.signal.Rd
===================================================================
--- pkg/quantstrat/man/add.signal.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/add.signal.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,8 +3,8 @@
\title{add a signal to a strategy}
\usage{
add.signal(strategy, name, arguments, parameters = NULL,
- label = NULL, ..., enabled = TRUE, indexnum = NULL, store
- = FALSE)
+ label = NULL, ..., enabled = TRUE, indexnum = NULL,
+ store = FALSE)
}
\arguments{
\item{strategy}{an object (or the name of an object) of
Modified: pkg/quantstrat/man/addOrder.Rd
===================================================================
--- pkg/quantstrat/man/addOrder.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/addOrder.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,10 +3,10 @@
\title{add an order to the order book}
\usage{
addOrder(portfolio, symbol, timestamp, qty, price,
- ordertype, side, threshold = NULL, status = "open",
- statustimestamp = "", delay = 1e-05, tmult = FALSE,
- replace = TRUE, return = FALSE, ..., TxnFees = 0, label =
- "")
+ ordertype, side, orderset = "", threshold = NULL,
+ status = "open", statustimestamp = "", delay = 1e-05,
+ tmult = FALSE, replace = TRUE, return = FALSE, ...,
+ TxnFees = 0, label = "")
}
\arguments{
\item{portfolio}{text name of the portfolio to associate
Modified: pkg/quantstrat/man/addPosLimit.Rd
===================================================================
--- pkg/quantstrat/man/addPosLimit.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/addPosLimit.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,8 +3,8 @@
\title{add position and level limits at timestamp}
\usage{
addPosLimit(portfolio, symbol, timestamp, maxpos,
- longlevels = 1, minpos = -maxpos, shortlevels =
- longlevels)
+ longlevels = 1, minpos = -maxpos,
+ shortlevels = longlevels)
}
\arguments{
\item{portfolio}{text name of the portfolio to place
Modified: pkg/quantstrat/man/applyIndicators.Rd
===================================================================
--- pkg/quantstrat/man/applyIndicators.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/applyIndicators.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{apply the indicators in the strategy to arbitrary market data}
\usage{
applyIndicators(strategy, mktdata, parameters = NULL,
- ...)
+ ...)
}
\arguments{
\item{strategy}{an object of type 'strategy' to add the
Modified: pkg/quantstrat/man/applyParameter.Rd
===================================================================
--- pkg/quantstrat/man/applyParameter.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/applyParameter.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{Generate parameter sets for a specific strategy, test the strategy on each set of parameters, output result package.}
\usage{
applyParameter(strategy, portfolios, parameterPool,
- parameterConstraints, method, sampleSize)
+ parameterConstraints, method, sampleSize)
}
\arguments{
\item{strategy}{The strategy to test paramters to.}
@@ -82,12 +82,12 @@
registerDoSMP(workers)
#PUT ALL CODE RELATED TO QUANTSTRAT HERE
-#Example to call the function: (For complete demo see parameterTestMACD.R)
-x<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,
-method='random',sampleSize=20,parameterConstraints=pConstraint2)
-#or
-x<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,
-method='expand',parameterConstraints=pConstraint2)
+ #Example to call the function: (For complete demo see parameterTestMACD.R)
+ x<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,
+ method='random',sampleSize=20,parameterConstraints=pConstraint2)
+ #or
+ x<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,
+ method='expand',parameterConstraints=pConstraint2)
stopWorkers(workers)
rmSessions(all=TRUE)
Modified: pkg/quantstrat/man/applyRules.Rd
===================================================================
--- pkg/quantstrat/man/applyRules.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/applyRules.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,9 +2,10 @@
\alias{applyRules}
\title{apply the rules in the strategy to arbitrary market data}
\usage{
- applyRules(portfolio, symbol, strategy, mktdata, Dates =
- NULL, indicators = NULL, signals = NULL, parameters =
- NULL, ..., path.dep = TRUE)
+ applyRules(portfolio, symbol, strategy, mktdata,
+ Dates = NULL, indicators = NULL, signals = NULL,
+ parameters = NULL, ..., path.dep = TRUE,
+ rule.order = NULL)
}
\arguments{
\item{portfolio}{text name of the portfolio to associate
@@ -42,6 +43,9 @@
\item{path.dep}{TRUE/FALSE whether rule is path
dependent, default TRUE, see Details}
+
+ \item{rule.order}{default NULL, use at your own risk to
+ adjust order of rule evaluation}
}
\description{
In typical usage, this function will be called via
Modified: pkg/quantstrat/man/applySignals.Rd
===================================================================
--- pkg/quantstrat/man/applySignals.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/applySignals.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{apply the signals in the strategy to arbitrary market data}
\usage{
applySignals(strategy, mktdata, indicators = NULL,
- parameters = NULL, ...)
+ parameters = NULL, ...)
}
\arguments{
\item{strategy}{an object of type 'strategy' to add the
Modified: pkg/quantstrat/man/applyStrategy.Rd
===================================================================
--- pkg/quantstrat/man/applyStrategy.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/applyStrategy.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,8 +3,8 @@
\title{apply the strategy to arbitrary market data}
\usage{
applyStrategy(strategy, portfolios, mktdata = NULL,
- parameters = NULL, ..., verbose = TRUE, symbols = NULL,
- initStrat = FALSE, updateStrat = FALSE)
+ parameters = NULL, ..., verbose = TRUE, symbols = NULL,
+ initStrat = FALSE, updateStrat = FALSE)
}
\arguments{
\item{strategy}{an object of type 'strategy' to add the
Modified: pkg/quantstrat/man/getOrders.Rd
===================================================================
--- pkg/quantstrat/man/getOrders.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/getOrders.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,9 +2,9 @@
\alias{getOrders}
\title{get orders by time span, status, type, and side}
\usage{
- getOrders(portfolio, symbol, status = "open", timespan =
- NULL, ordertype = NULL, side = NULL, qtysign = NULL,
- which.i = FALSE)
+ getOrders(portfolio, symbol, status = "open",
+ timespan = NULL, ordertype = NULL, side = NULL,
+ qtysign = NULL, orderset = NULL, which.i = FALSE)
}
\arguments{
\item{portfolio}{text name of the portfolio to associate
Modified: pkg/quantstrat/man/initOrders.Rd
===================================================================
--- pkg/quantstrat/man/initOrders.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/initOrders.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,8 +2,8 @@
\alias{initOrders}
\title{initialize order container}
\usage{
- initOrders(portfolio = NULL, symbols = NULL, initDate =
- "1999-12-31", ...)
+ initOrders(portfolio = NULL, symbols = NULL,
+ initDate = "1999-12-31", ...)
}
\arguments{
\item{portfolio}{text name of the portfolio to associate
Modified: pkg/quantstrat/man/initStrategy.Rd
===================================================================
--- pkg/quantstrat/man/initStrategy.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/initStrategy.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,9 +2,10 @@
\alias{initStrategy}
\title{run standard and custom strategy initialization functions}
\usage{
- initStrategy(strategy, portfolio, symbols, parameters =
- NULL, get.Symbols = TRUE, init.Portf = TRUE, init.Acct =
- TRUE, init.Orders = TRUE, unique = TRUE, ...)
+ initStrategy(strategy, portfolio, symbols,
+ parameters = NULL, get.Symbols = TRUE,
+ init.Portf = TRUE, init.Acct = TRUE,
+ init.Orders = TRUE, unique = TRUE, ...)
}
\arguments{
\item{strategy}{object of type \code{strategy} to
Modified: pkg/quantstrat/man/osMaxPos.Rd
===================================================================
--- pkg/quantstrat/man/osMaxPos.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/osMaxPos.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{order sizing function for position limits and level sizing}
\usage{
osMaxPos(data, timestamp, orderqty, ordertype, orderside,
- portfolio, symbol, ruletype, ...)
+ portfolio, symbol, ruletype, ...)
}
\arguments{
\item{data}{an xts object containing market data.
Modified: pkg/quantstrat/man/osNoOp.Rd
===================================================================
--- pkg/quantstrat/man/osNoOp.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/osNoOp.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{default order sizing function}
\usage{
osNoOp(timestamp, orderqty, portfolio, symbol, ruletype,
- ...)
+ ...)
}
\arguments{
\item{timestamp}{timestamp coercible to POSIXct that will
Modified: pkg/quantstrat/man/paramConstraint.Rd
===================================================================
--- pkg/quantstrat/man/paramConstraint.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/paramConstraint.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{Internal function used in applyParameter function for process constraints on relationship between two parameter values. Basicly is the same as sigComparison function in signal.R written by Brian, with miner change.}
\usage{
paramConstraint(label, data = mktdata, columns,
- relationship = c("gt", "lt", "eq", "gte", "lte"))
+ relationship = c("gt", "lt", "eq", "gte", "lte"))
}
\arguments{
\item{label}{text label to apply to the constraint}
Modified: pkg/quantstrat/man/ruleOrderProc.Rd
===================================================================
--- pkg/quantstrat/man/ruleOrderProc.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/ruleOrderProc.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,8 +2,9 @@
\alias{ruleOrderProc}
\title{process open orders at time \emph{t}, generating transactions or new orders}
\usage{
- ruleOrderProc(portfolio, symbol, mktdata, timespan =
- NULL, ordertype = NULL, ..., slippageFUN = NULL)
+ ruleOrderProc(portfolio, symbol, mktdata,
+ timespan = NULL, ordertype = NULL, ...,
+ slippageFUN = NULL)
}
\arguments{
\item{portfolio}{text name of the portfolio to associate
Modified: pkg/quantstrat/man/ruleSignal.Rd
===================================================================
--- pkg/quantstrat/man/ruleSignal.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/ruleSignal.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,11 +3,12 @@
\title{default rule to generate a trade order on a signal}
\usage{
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",
- "active"), portfolio, symbol, ..., ruletype, TxnFees = 0,
- prefer = NULL, sethold = FALSE, label = "")
+ orderqty = 0, ordertype, orderside = NULL,
+ orderset = NULL, threshold = NULL, tmult = FALSE,
+ replace = TRUE, delay = 1e-04, osFUN = "osNoOp",
+ pricemethod = c("market", "opside", "active"),
+ portfolio, symbol, ..., ruletype, TxnFees = 0,
+ prefer = NULL, sethold = FALSE, label = "")
}
\arguments{
\item{data}{an xts object containing market data.
@@ -31,6 +32,9 @@
\item{orderside}{one of either "long" or "short", default
NULL, see details}
+ \item{orderset}{tag to identify an orderset; if one order
+ of the set is filled, all others are canceled}
+
\item{threshold}{numeric or function threshold to apply
to trailing stop orders, default NULL, see Details}
Modified: pkg/quantstrat/man/setParameterConstraint.Rd
===================================================================
--- pkg/quantstrat/man/setParameterConstraint.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/setParameterConstraint.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{Function to construct parameter constraint object.}
\usage{
setParameterConstraint(paramConstraintObj = list(),
- constraintLabel, paramList, relationship)
+ constraintLabel, paramList, relationship)
}
\arguments{
\item{paramConstraintObj}{the ParameterConstraint object
@@ -41,7 +41,7 @@
#than slow macd signal:
\dontrun{
x<-setParameterConstraint(constraintLabel='macdPC',
-paramList=c('nFast','nSlow'),relationship='lt')
+ paramList=c('nFast','nSlow'),relationship='lt')
}
#The object x then can be used as one of the inputs to applyParameter function to specify the
#constraints between parameters.
Modified: pkg/quantstrat/man/setParameterDistribution.Rd
===================================================================
--- pkg/quantstrat/man/setParameterDistribution.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/setParameterDistribution.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,8 +3,8 @@
\title{Function used to create an object that contains the distribution of parameters to be generated from, before testing parameters of a strategy.}
\usage{
setParameterDistribution(paramDist = NULL, type = NULL,
- indexnum = 0, distribution = NULL, weight, label, psindex
- = NULL)
+ indexnum = 0, distribution = NULL, weight, label,
+ psindex = NULL)
}
\arguments{
\item{paramDist}{The object that store the parameter
@@ -70,11 +70,11 @@
\dontrun{
#(For complete demo see parameterTestMACD.R)
tPD2<-setParameterDistribution(tPD2,'indicator',indexnum=1,
-distribution=list(nFast=(10:30)),label='nFast')
+ distribution=list(nFast=(10:30)),label='nFast')
tPD2<-setParameterDistribution(tPD2,'indicator',indexnum=1,
-distribution=list(nSlow=(20:40)),label='nSlow')
+ distribution=list(nSlow=(20:40)),label='nSlow')
tPD2<-setParameterDistribution(tPD2,'signal',indexnum=1,
-distribution=list(relationship=c('gt','gte')),label='sig1.gtgte')
+ distribution=list(relationship=c('gt','gte')),label='sig1.gtgte')
}
}
\author{
Modified: pkg/quantstrat/man/sigComparison.Rd
===================================================================
--- pkg/quantstrat/man/sigComparison.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/sigComparison.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{generate comparison signal}
\usage{
sigComparison(label, data = mktdata, columns,
- relationship = c("gt", "lt", "eq", "gte", "lte"))
+ relationship = c("gt", "lt", "eq", "gte", "lte"))
}
\arguments{
\item{label}{text label to apply to the output}
Modified: pkg/quantstrat/man/sigCrossover.Rd
===================================================================
--- pkg/quantstrat/man/sigCrossover.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/sigCrossover.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,8 +2,8 @@
\alias{sigCrossover}
\title{generate a crossover signal}
\usage{
- sigCrossover(label, data = mktdata, columns, relationship
- = c("gt", "lt", "eq", "gte", "lte"))
+ sigCrossover(label, data = mktdata, columns,
+ relationship = c("gt", "lt", "eq", "gte", "lte"))
}
\arguments{
\item{label}{text label to apply to the output}
Modified: pkg/quantstrat/man/sigPeak.Rd
===================================================================
--- pkg/quantstrat/man/sigPeak.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/sigPeak.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,8 +2,8 @@
\alias{sigPeak}
\title{signal function for peak/valley signals}
\usage{
- sigPeak(label, data, column, direction = c("peak",
- "bottom"))
+ sigPeak(label, data, column,
+ direction = c("peak", "bottom"))
}
\arguments{
\item{label}{text label to apply to the output}
Modified: pkg/quantstrat/man/sigThreshold.Rd
===================================================================
--- pkg/quantstrat/man/sigThreshold.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/sigThreshold.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,9 +2,10 @@
\alias{sigThreshold}
\title{generate a threshold signal}
\usage{
- sigThreshold(label, data = mktdata, column, threshold =
- 0, relationship = c("gt", "lt", "eq", "gte", "lte"),
- cross = FALSE)
+ sigThreshold(label, data = mktdata, column,
+ threshold = 0,
+ relationship = c("gt", "lt", "eq", "gte", "lte"),
+ cross = FALSE)
}
\arguments{
\item{label}{text label to apply to the output}
Modified: pkg/quantstrat/man/strategy.Rd
===================================================================
--- pkg/quantstrat/man/strategy.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/strategy.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -3,7 +3,7 @@
\title{constructor for objects of type 'strategy'}
\usage{
strategy(name, ..., assets = NULL, constraints = NULL,
- store = FALSE)
+ store = FALSE)
}
\arguments{
\item{name}{character string naming the strategy}
Modified: pkg/quantstrat/man/updateOrders.Rd
===================================================================
--- pkg/quantstrat/man/updateOrders.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/updateOrders.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,9 +2,9 @@
\alias{updateOrders}
\title{update an order or orders}
\usage{
- updateOrders(portfolio, symbol, timespan, ordertype =
- NULL, side = NULL, qtysign = NULL, oldstatus = "open",
- newstatus, statustimestamp)
+ updateOrders(portfolio, symbol, timespan,
+ ordertype = NULL, side = NULL, qtysign = NULL,
+ oldstatus = "open", newstatus, statustimestamp)
}
\arguments{
\item{portfolio}{text name of the portfolio to associate
@@ -27,6 +27,8 @@
all qty's are reported as positive numbers and need to be
identified other ways, default NULL}
+ \item{set}{a tag identifying the orderset}
+
\item{oldstatus}{one of NULL, "open", "closed",
"canceled", or "replaced", default "open"}
Modified: pkg/quantstrat/man/updateStrategy.Rd
===================================================================
--- pkg/quantstrat/man/updateStrategy.Rd 2012-05-16 19:06:09 UTC (rev 1025)
+++ pkg/quantstrat/man/updateStrategy.Rd 2012-05-18 17:40:23 UTC (rev 1026)
@@ -2,11 +2,11 @@
\alias{updateStrategy}
\title{run standard and custom strategy wrapup functions such as updating portfolio, account, and ending equity}
\usage{
- updateStrategy(strategy, portfolio = "default", account =
- portfolio, Symbols = NULL, parameters = NULL, Dates =
- NULL, Prices = NULL, update.Portf = TRUE, update.Acct =
- TRUE, update.EndEq = TRUE, showEq = TRUE, chart = TRUE,
- ...)
+ updateStrategy(strategy, portfolio = "default",
+ account = portfolio, Symbols = NULL, parameters = NULL,
+ Dates = NULL, Prices = NULL, update.Portf = TRUE,
+ update.Acct = TRUE, update.EndEq = TRUE, showEq = TRUE,
+ chart = TRUE, ...)
}
\arguments{
\item{strategy}{object of type \code{strategy} to
@@ -71,12 +71,12 @@
The 'standard wrapup functions included are: \describe{
\item{update.Portf}{ if TRUE, will call
\code{\link[blotter]{updatePortf}} to mark the book in
- the portfolio. } \item{update.Acct}{ if TRUE, will call
+ the portfolio. } \item{update.Acct}{ if TRUE, will call
\code{\link[blotter]{updateAcct}} to mark the blotter
- account for this test. } \item{update.EndEq}{ if TRUE,
+ account for this test. } \item{update.EndEq}{ if TRUE,
will call \code{\link[blotter]{updateEndEq}} to update
the account equity after all other accounting has been
- completed. } }
+ completed. } }
}
\author{
Garrett See, Brian Peterson
More information about the Blotter-commits
mailing list