[Blotter-commits] r1709 - in pkg/quantstrat: . R demo man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 1 22:36:29 CET 2015


Author: bodanker
Date: 2015-11-01 22:36:29 +0100 (Sun, 01 Nov 2015)
New Revision: 1709

Added:
   pkg/quantstrat/man/signal.path.plot.Rd
   pkg/quantstrat/man/signal.plot.Rd
Removed:
   pkg/quantstrat/man/add.constraint.Rd
   pkg/quantstrat/man/applyStrategy.rebalancing.training.Rd
   pkg/quantstrat/man/plot.signal.path.Rd
   pkg/quantstrat/man/plot.signals.Rd
Modified:
   pkg/quantstrat/DESCRIPTION
   pkg/quantstrat/NAMESPACE
   pkg/quantstrat/R/initialize.R
   pkg/quantstrat/R/paramsets.R
   pkg/quantstrat/R/signals.R
   pkg/quantstrat/R/tradeOrderStats.R
   pkg/quantstrat/R/walk.forward.R
   pkg/quantstrat/demo/signal.SMA.R
   pkg/quantstrat/man/add.distribution.Rd
   pkg/quantstrat/man/add.distribution.constraint.Rd
   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/apply.paramset.Rd
   pkg/quantstrat/man/apply.paramset.signal.analysis.Rd
   pkg/quantstrat/man/applyIndicatorSignals.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/applyStrategy.rebalancing.Rd
   pkg/quantstrat/man/beanplot.signals.Rd
   pkg/quantstrat/man/chart.forward.Rd
   pkg/quantstrat/man/chart.forward.training.Rd
   pkg/quantstrat/man/delete.paramset.Rd
   pkg/quantstrat/man/distributional.boxplot.Rd
   pkg/quantstrat/man/enable.rule.Rd
   pkg/quantstrat/man/get.strategy.Rd
   pkg/quantstrat/man/getOrderBook.Rd
   pkg/quantstrat/man/getOrders.Rd
   pkg/quantstrat/man/getParameterTable.Rd
   pkg/quantstrat/man/getPosLimit.Rd
   pkg/quantstrat/man/initOrders.Rd
   pkg/quantstrat/man/initStrategy.Rd
   pkg/quantstrat/man/initSymbol.Rd
   pkg/quantstrat/man/is.strategy.Rd
   pkg/quantstrat/man/load.strategy.Rd
   pkg/quantstrat/man/match.names.Rd
   pkg/quantstrat/man/osMaxPos.Rd
   pkg/quantstrat/man/osNoOp.Rd
   pkg/quantstrat/man/paramConstraint.Rd
   pkg/quantstrat/man/post.signal.returns.Rd
   pkg/quantstrat/man/put.orderbook.Rd
   pkg/quantstrat/man/put.strategy.Rd
   pkg/quantstrat/man/quantstrat-package.Rd
   pkg/quantstrat/man/rm.strat.Rd
   pkg/quantstrat/man/ruleOrderProc.Rd
   pkg/quantstrat/man/rulePctEquity.Rd
   pkg/quantstrat/man/ruleRevoke.Rd
   pkg/quantstrat/man/ruleSignal.Rd
   pkg/quantstrat/man/save.strategy.Rd
   pkg/quantstrat/man/setParameterConstraint.Rd
   pkg/quantstrat/man/setParameterDistribution.Rd
   pkg/quantstrat/man/sigComparison.Rd
   pkg/quantstrat/man/sigCrossover.Rd
   pkg/quantstrat/man/sigFormula.Rd
   pkg/quantstrat/man/sigPeak.Rd
   pkg/quantstrat/man/sigThreshold.Rd
   pkg/quantstrat/man/sigTimestamp.Rd
   pkg/quantstrat/man/signal.generate.statistics.Rd
   pkg/quantstrat/man/signal.obj.slope.Rd
   pkg/quantstrat/man/strategy.Rd
   pkg/quantstrat/man/tradeGraphs.Rd
   pkg/quantstrat/man/tradeOrderStats.Rd
   pkg/quantstrat/man/updateOrders.Rd
   pkg/quantstrat/man/updateStrategy.Rd
   pkg/quantstrat/man/walk.forward.Rd
Log:
Fix docs/missed-renaming issues, roxygenize

Document '...' usage in several functions. Add description to
tradeOrderStats. Remove unicode characters from signal plotting docs.
Remove inadvertently committed applyStrategy.rebalancing.training.Rd.

Remove unnecessary quantstrat::: when calling install.param.combo. Fix
typos in signal plotting code and delete.paramset docs.

Apply the following renamings that were missed:
r1499: s/add.constraint/add.distribution.constraint/ (rm .Rd file)
r1673: s/plot.signals/signal.plot/
r1673: s/plot.signal.path/signal.path.plot/

Bump version.


Modified: pkg/quantstrat/DESCRIPTION
===================================================================
--- pkg/quantstrat/DESCRIPTION	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/DESCRIPTION	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,7 +1,7 @@
 Package: quantstrat
 Type: Package
 Title: Quantitative Strategy Model Framework
-Version: 0.9.1702
+Version: 0.9.1709
 Date: $Date$
 Author: Peter Carl, Brian G. Peterson, Joshua Ulrich, Jan Humme
 Depends:
@@ -30,3 +30,4 @@
 License: GPL-3
 Copyright: (c) 2009-2015
 ByteCompile: TRUE
+RoxygenNote: 5.0.0

Modified: pkg/quantstrat/NAMESPACE
===================================================================
--- pkg/quantstrat/NAMESPACE	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/NAMESPACE	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,4 @@
-# Generated by roxygen2 (4.0.2): do not edit by hand
+# Generated by roxygen2: do not edit by hand
 
 export(add.distribution)
 export(add.distribution.constraint)

Modified: pkg/quantstrat/R/initialize.R
===================================================================
--- pkg/quantstrat/R/initialize.R	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/R/initialize.R	2015-11-01 21:36:29 UTC (rev 1709)
@@ -185,7 +185,7 @@
 #' 
 #' @param strategy an object (or the name of an object) of type 'strategy' to add the init function definition to
 #' @param symbol   symbol
-#' @param ...      
+#' @param \dots any other passthrough parameters
 
 #' @export
 initSymbol <- function(strategy, symbol, ...){

Modified: pkg/quantstrat/R/paramsets.R
===================================================================
--- pkg/quantstrat/R/paramsets.R	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/R/paramsets.R	2015-11-01 21:36:29 UTC (rev 1709)
@@ -225,7 +225,7 @@
 #'
 #' @author Jan Humme
 #' @export
-#' @seealso \code{\link{add.distibution}}, \code{\link{add.distribution.constraint}}, \code{\link{apply.paramset}}
+#' @seealso \code{\link{add.distribution}}, \code{\link{add.distribution.constraint}}, \code{\link{apply.paramset}}
 
 delete.paramset <- function(strategy, paramset.label, store=TRUE)
 {

Modified: pkg/quantstrat/R/signals.R
===================================================================
--- pkg/quantstrat/R/signals.R	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/R/signals.R	2015-11-01 21:36:29 UTC (rev 1709)
@@ -477,7 +477,7 @@
     if(verbose)cat("Applying Parameter Set: ",toString(param.combo),'\n')  
     
     # Attached Paramset to Strategy Object
-    strategy <- quantstrat:::install.param.combo(strategy, param.combo, paramset.label) 
+    strategy <- install.param.combo(strategy, param.combo, paramset.label) 
     
     # Generate Indicators and Signals for Given Paramset
     name.ref = paste('paramset.',gsub(", ",".",toString(param.combo)),sep='')
@@ -522,6 +522,7 @@
 #' @param portfolio text name of the portfolio to associate the order book with
 #' @param mktdata market data
 #' @param sigcol String name of signal to use for analysis 
+#' @param ... any other passthru parameters
 #' @author Michael Guan
 #' @return \code{xts} object with columns representing signals for each symbol
 #' @seealso 
@@ -595,7 +596,7 @@
 #' This function collects and aggregates post signal price changes for N days forward.
 #' 
 #' @param signals xts object with signals, one column
-#' @param sigvals signal value to match against
+#' @param sigval signal value to match against
 #' @param on the periods endpoints to find as a character string
 #' @param forward.days number of days to look forward after signal (days to exit post signal)
 #' @param cum.sum \code{TRUE},\code{FALSE}; cumulative sum of price changes
@@ -776,7 +777,7 @@
 #' there are lots paramsets, it is best to plot a smaller portion so the 
 #' information can be displayed clearly.
 #'                          
-#' @param signal list of paramset forward looking price changes by asset
+#' @param signals list of paramset forward looking price changes by asset
 #' @param rows number of rows for plot
 #' @param columns number of columns for plot
 #' @param mai A numerical vector of the form c(bottom, left, top, right) which gives the margin size specified in inches.
@@ -787,7 +788,8 @@
 #' @param xaxt A character which specifies the x axis type. Specifying "n" suppresses plotting of the axis. The standard value is "s": for compatibility with S values "l" and "t" are accepted but are equivalent to "s": any value other than "n" implies plotting.
 #' @param cex.axis The magnification to be used for axis annotation relative to the current setting of cex.
 #' @param h the y-value(s) for horizontal line(s).
-#' @param hlinecol A specification for the default plotting color. See section ‘Color Specification’.
+#' @param hlinecol A specification for the default plotting color. See section \sQuote{Color Specification}.
+#' @param ... any other passthru parameters
 #' @author Michael Guan
 #' @export
 
@@ -817,10 +819,10 @@
 
 #' Visualization of Signal Across Lookback with Beanplots
 #'
-#' This function is similar to \code{plot.signals} but uses beanplots 
+#' This function is similar to \code{signal.plot} but uses beanplots 
 #' instead of barplots. Requires 'beanplot' package
 #'                          
-#' @param signal list of paramset forward looking price changes by asset
+#' @param signals list of paramset forward looking price changes by asset
 #' @param rows number of rows for plot
 #' @param columns number of columns for plot
 #' @param mai A numerical vector of the form c(bottom, left, top, right) which gives the margin size specified in inches.
@@ -831,7 +833,8 @@
 #' @param xaxt A character which specifies the x axis type. Specifying "n" suppresses plotting of the axis. The standard value is "s": for compatibility with S values "l" and "t" are accepted but are equivalent to "s": any value other than "n" implies plotting.
 #' @param cex.axis The magnification to be used for axis annotation relative to the current setting of cex.
 #' @param h the y-value(s) for horizontal line(s).
-#' @param hlinecol A specification for the default plotting color. See section ‘Color Specification’.
+#' @param hlinecol A specification for the default plotting color. See section \sQuote{Color Specification}.
+#' @param ... any other passthru parameters
 #' @author Michael Guan
 #' @return plot
 #' @export
@@ -871,6 +874,7 @@
 #' @param xlim the x limits in the plot
 #' @param mai A numerical vector of the form c(bottom, left, top, right) which gives the margin size specified in inches.
 #' @param h the y-value(s) for horizontal line(s).
+#' @param ... any other passthru parameters
 #' @author Michael Guan
 #' @return plot
 #' @export
@@ -924,7 +928,7 @@
 #' @examples
 #' \dontrun{
 #' # signalAnalysisExample1.R
-#' plot.signal.path(results$sigret.by.asset$RTH$paramset.1.5[1:10,])
+#' signal.plot.path(results$sigret.by.asset$RTH$paramset.1.5[1:10,])
 #' }
 #' @export
 signal.path.plot<-function(data,main='Cumulative Return Paths'){

Modified: pkg/quantstrat/R/tradeOrderStats.R
===================================================================
--- pkg/quantstrat/R/tradeOrderStats.R	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/R/tradeOrderStats.R	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,7 +1,7 @@
 #' get order information associated with closing positions
 #' 
+#' Combine perTradeStats output with closed order information.
 #'
-#'
 #' TODO: decide which of these columns are actually important
 #' TODO: add option for opening order/trade pairing rather than closing
 #' 

Modified: pkg/quantstrat/R/walk.forward.R
===================================================================
--- pkg/quantstrat/R/walk.forward.R	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/R/walk.forward.R	2015-11-01 21:36:29 UTC (rev 1709)
@@ -146,7 +146,7 @@
             }
 
             # configure strategy to use selected param.combo
-            strategy <- quantstrat:::install.param.combo(strategy, param.combo, paramset.label)
+            strategy <- install.param.combo(strategy, param.combo, paramset.label)
 
             result$testing.timespan <- testing.timespan
 

Modified: pkg/quantstrat/demo/signal.SMA.R
===================================================================
--- pkg/quantstrat/demo/signal.SMA.R	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/demo/signal.SMA.R	2015-11-01 21:36:29 UTC (rev 1709)
@@ -127,7 +127,7 @@
                        x.val=seq(1, 10, 2),val=10,ylim=c(-20, 20),
                        xlim=c(0, 10),mai=c(1,1,0.3,0.5),h=0)
 
-plot.signals(results.w$sigret.by.asset$XLE, rows=5, columns = 4)
+signal.plot(results.w$sigret.by.asset$XLE, rows=5, columns = 4)
 beanplot.signals(results.w$sigret.by.asset$XLE, rows=5, columns = 4)
 
 
@@ -148,7 +148,7 @@
                        x.val=seq(1, 5, 1),val=10,ylim=c(-30, 30),
                        xlim=c(0, 5),mai=c(1,1,0.3,0.5),h=0)
 
-plot.signals(results.m$sigret.by.asset$XLE, rows=5, columns = 4)
+signal.plot(results.m$sigret.by.asset$XLE, rows=5, columns = 4)
 beanplot.signals(results.m$sigret.by.asset$XLE, rows=5, columns = 4)
 
 ###############################################################################

Deleted: pkg/quantstrat/man/add.constraint.Rd
===================================================================
--- pkg/quantstrat/man/add.constraint.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/add.constraint.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,44 +0,0 @@
-\name{add.constraint}
-\alias{add.constraint}
-\title{Adds a constraint on 2 distributions within a paramset}
-\usage{
-  add.constraint(strategy, paramset.label,
-    distribution.label.1, distribution.label.2, operator,
-    label, store = TRUE)
-}
-\arguments{
-  \item{strategy}{the name of the strategy object to add
-  the constraint to}
-
-  \item{paramset.label}{a label uniquely identifying the
-  paramset within the strategy}
-
-  \item{distribution.label.1}{a label identifying the first
-  distribution}
-
-  \item{distribution.label.2}{a label identifying the
-  second distribution}
-
-  \item{operator}{an operator specifying the relational
-  constraint between the 2 distributions}
-
-  \item{label}{a label uniquely identifying the constraint
-  within the paramset}
-
-  \item{store}{indicates whether to store the strategy in
-  the .strategy environment}
-}
-\description{
-  Creates a constraint on 2 distributions in a paramset,
-  i.e. a restriction limiting the allowed combinations from
-  the ranges for distribution 1 and distribution 2.
-}
-\author{
-  Jan Humme
-}
-\seealso{
-  \code{\link{add.distribution}},
-  \code{\link{delete.paramset}},
-  \code{\link{apply.paramset}}
-}
-

Modified: pkg/quantstrat/man/add.distribution.Rd
===================================================================
--- pkg/quantstrat/man/add.distribution.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/add.distribution.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/paramsets.R
 \name{add.distribution}
 \alias{add.distribution}
 \title{Adds a distribution to a paramset in a strategy}

Modified: pkg/quantstrat/man/add.distribution.constraint.Rd
===================================================================
--- pkg/quantstrat/man/add.distribution.constraint.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/add.distribution.constraint.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/paramsets.R
 \name{add.distribution.constraint}
 \alias{add.distribution.constraint}
 \title{Adds a constraint on 2 distributions within a paramset}

Modified: pkg/quantstrat/man/add.indicator.Rd
===================================================================
--- pkg/quantstrat/man/add.indicator.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/add.indicator.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/indicators.R
 \name{add.indicator}
 \alias{add.indicator}
 \title{add an indicator to a strategy}
@@ -30,43 +31,43 @@
 if \code{strategy} was the name of a strategy, the name. It it was a strategy, the updated strategy.
 }
 \description{
-Indicators are typically standard technical or statistical analysis outputs,
+Indicators are typically standard technical or statistical analysis outputs, 
 such as moving averages, bands, or pricing models.
 }
 \details{
 Indicators are always path-independent, and should be constructed from vectorized functions where possible.
 
-Indicators are applied before signals and rules, and the output of indicators
+Indicators are applied before signals and rules, and the output of indicators 
 may be used as inputs to construct signals or fire rules.
 
 \code{arguments} and \code{parameters} are named lists that describe the arguments to be passed to the indicator function.
-\code{arguments} is for defining any non-default arguments to be passed to the function named in the \code{name} of the indicator.
+\code{arguments} is for defining any non-default arguments to be passed to the function named in the \code{name} of the indicator.  
 For example, the \code{x} argument to a moving average function may be defined as \code{x=quote(Cl(mktdata))}
 
 If you look at the demo scripts, you'll notice that we often use \code{quote(mktdata)} in setting up indicators, signals, or rules.
 This tells \R to delay evaluation via \code{quote()}, and to use the special variable \code{mktdata}.
 
-\code{mktdata} is typically created internally to \code{quantstrat} by looking in the global environment for
-a time series of prices or returns. mktdata may also contain other data you've manipulated outside quantstrat,
-though where possible you should use quantstrat to contain all the logic for the strategy,
+\code{mktdata} is typically created internally to \code{quantstrat} by looking in the global environment for 
+a time series of prices or returns. mktdata may also contain other data you've manipulated outside quantstrat, 
+though where possible you should use quantstrat to contain all the logic for the strategy, 
 to aid in maintenance and modifications.
 
-The use of \code{quote()} tells R to not evaluate what's inside the quote until the function is evaluated later.
+The use of \code{quote()} tells R to not evaluate what's inside the quote until the function is evaluated later.  
 By the time that code is evaluated, \code{mktdata} will be populated with the correct price information based on the contents of whatever portfolio you are evaluating the strategy on.
 
-\code{parameters} is another named list, and normally will not be needed.
-If you have multiple indicator, signal, or rule functions share the that
-\emph{both} share the same argument names \emph{and} will need to have
+\code{parameters} is another named list, and normally will not be needed.  
+If you have multiple indicator, signal, or rule functions share the that 
+\emph{both} share the same argument names \emph{and} will need to have 
 different values passed to those arguments as defined parameters at apply-time,
 then you may need to give them unique names so that delayed evaluation can
-sort it all out for you at apply-time.
+sort it all out for you at apply-time.  
 We will endeavor to get an example of named parameters into the demo scripts.
 
 if \code{label} is not supplied,  NULL default will be converted to '<name>.ind' unless
 there already exists an indicator with that label in which case it will be appended
 with a number (i.e. '<name>.ind.2', '<name>.ind.3', etc.).
-If the indicator function returns multiple columns, the label will be
-\code{\link{paste}}'d to the end of either the returned column names or the
+If the indicator function returns multiple columns, the label will be 
+\code{\link{paste}}'d to the end of either the returned column names or the 
 respective column number when applying it to \code{mktdata}.
 }
 \examples{

Modified: pkg/quantstrat/man/add.init.Rd
===================================================================
--- pkg/quantstrat/man/add.init.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/add.init.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/initialize.R
 \name{add.init}
 \alias{add.init}
 \title{add arbitrary initialization functions to a strategy}
@@ -29,8 +30,8 @@
 if \code{strategy} was the name of a strategy, the name. It it was a strategy, the updated strategy.
 }
 \description{
-\code{\link{initStrategy}} will run a series of common initialization functions at the
-beginning of an \code{\link{applyStrategy}} call.  This function allows the user to
+\code{\link{initStrategy}} will run a series of common initialization functions at the 
+beginning of an \code{\link{applyStrategy}} call.  This function allows the user to 
 add arbitrary initialization functions to the sequence.
 }
 \details{
@@ -38,8 +39,8 @@
 and when \code{applyStrategy} is evaluated, the arbitrary initialization functions will
 be evaluated after the standardized functions.
 
-For example, if your strategy uses a synthetic basket instrument, you could use this
-initialization slot to add a custom constructor to build the basket instrument time
+For example, if your strategy uses a synthetic basket instrument, you could use this 
+initialization slot to add a custom constructor to build the basket instrument time 
 series and modify the symbols slot(s) of the strategy and portfolio.
 }
 

Modified: pkg/quantstrat/man/add.rule.Rd
===================================================================
--- pkg/quantstrat/man/add.rule.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/add.rule.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/rules.R
 \name{add.rule}
 \alias{add.rule}
 \title{add a rule to a strategy}
@@ -44,9 +45,9 @@
 Rules will be processed in a very particular manner, so it bears going over.
 }
 \details{
-First, rules are either path dependent or non-path-dependent.  Path dependent rules
+First, rules are either path dependent or non-path-dependent.  Path dependent rules 
 will be processed in every time increment for the \code{mktdata} passed into
-\code{\link{applyStrategy}}.  Non path dependent rules will likely be quite rare in real life,
+\code{\link{applyStrategy}}.  Non path dependent rules will likely be quite rare in real life, 
 and will be applied after indicators and signals, and before path-dependent rules are processed.
 
 All rules have a \code{type}.  These may be any of:
@@ -57,47 +58,47 @@
   \item{exit}{ rules to determine whether to exit a position}
   \item{enter}{ rules to determine whether to enter or increase a position}
   \item{chain}{ rules executed upon fill of an order corresponding to the label of the parent rule identified by the \code{parent} arg. }
-}
-
-The rules will be executed by type, in the order listed above.
-Multiple rules of each type may be defined, as with signals and indicators,
-they will be executed in order by index number with any other rules sharing the same
+} 
+ 
+The rules will be executed by type, in the order listed above.  
+Multiple rules of each type may be defined, as with signals and indicators, 
+they will be executed in order by index number with any other rules sharing the same 
 type.
 
-The rule execution order was constructed because path-dependent rules may modify
-the ability of rules that have not fired yet to be evaluated.  For example, a
-risk rule may flatten (close out) an entire position and put new orders
-on hold, effectively stopping all further execution of the strategy.
-Another example would be a rebalancing rule function that would enter
-orders to rebalance the portfolio, and would hold other strategy processing
+The rule execution order was constructed because path-dependent rules may modify   
+the ability of rules that have not fired yet to be evaluated.  For example, a 
+risk rule may flatten (close out) an entire position and put new orders 
+on hold, effectively stopping all further execution of the strategy.  
+Another example would be a rebalancing rule function that would enter 
+orders to rebalance the portfolio, and would hold other strategy processing 
 until the rebalancing period was over.
 
-The \code{timespan} parameter will limit rule execution by time of day using
-time based subsetting.  See ISO-8601 specification and xts documentation for
-more details.  Note that these are only applicable to intra-day execution,
-and will remain that way barring patches (tests and documentation) from
-interested parties.  The subsetting may (will likely) work with normal
+The \code{timespan} parameter will limit rule execution by time of day using 
+time based subsetting.  See ISO-8601 specification and xts documentation for 
+more details.  Note that these are only applicable to intra-day execution, 
+and will remain that way barring patches (tests and documentation) from 
+interested parties.  The subsetting may (will likely) work with normal 
 ISO/xts subset ranges, but consider it unsupported.
 
 The \code{name} parameter should be a character string naming the function
-to be called in the \code{\link{applyRules}} loop. The \code{add.rule}
-function will then call \code{\link{match.fun}}, ands store the actual function
-in your strategy object.
-This will avoid lookups via \code{\link{match.fun}} at \code{\link{applyRules}} time,
+to be called in the \code{\link{applyRules}} loop. The \code{add.rule} 
+function will then call \code{\link{match.fun}}, ands store the actual function 
+in your strategy object.  
+This will avoid lookups via \code{\link{match.fun}} at \code{\link{applyRules}} time, 
 and may provide a significant speed increase on higher frequency data (20\% or more).
 
-We anticipate that rules will be the portion of a strategy most likely to
-not have suitable template code included with this package, as every strategy
-and environment are different, especially in this respect.
+We anticipate that rules will be the portion of a strategy most likely to 
+not have suitable template code included with this package, as every strategy 
+and environment are different, especially in this respect.  
 We will attempt to provide enough examples and generic rules to give strategy
 authors a place to start.
 
-For quantstrat to be able to (largly) vectorize the execution of path-dependent
-rule evaluation, the rule function is presumed to have a function signature
-like that of \code{\link{ruleSignal}}, specifically the arguments \code{sigcol}
-and \code{sigval}.  If these are present and function in a manner similar to
-\code{\link{ruleSignal}} we can do some preprocessing to significantly reduce the
-dimensionality of the index we need to loop over.  The speedup is the ratio of
+For quantstrat to be able to (largly) vectorize the execution of path-dependent 
+rule evaluation, the rule function is presumed to have a function signature 
+like that of \code{\link{ruleSignal}}, specifically the arguments \code{sigcol} 
+and \code{sigval}.  If these are present and function in a manner similar to 
+\code{\link{ruleSignal}} we can do some preprocessing to significantly reduce the 
+dimensionality of the index we need to loop over.  The speedup is the ratio of 
 (symbols\*total observations)/signal observations, so it can be significant for many strategies.
 }
 

Modified: pkg/quantstrat/man/add.signal.Rd
===================================================================
--- pkg/quantstrat/man/add.signal.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/add.signal.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/signals.R
 \name{add.signal}
 \alias{add.signal}
 \title{add a signal to a strategy}
@@ -32,15 +33,15 @@
 This adds a signal definition to a strategy object.
 }
 \details{
-Signals denote times at which the strategy \emph{may} want to
-take action.  Common signals types from the literature include
+Signals denote times at which the strategy \emph{may} want to 
+take action.  Common signals types from the literature include 
 crossovers, thresholds, or other interactions between your \code{mktdata}
 and your indicators.
 
 if \code{label} is not supplied,  NULL default will be converted to '<name>.sig'
-if the signal function returns one named column, we use that, and ignore the label.
-If the signal function returns multiple columns, the label will be
-\code{\link{paste}}'d to either the returned column names or the
+if the signal function returns one named column, we use that, and ignore the label.  
+If the signal function returns multiple columns, the label will be 
+\code{\link{paste}}'d to either the returned column names or the 
 respective column number.
 }
 \seealso{

Modified: pkg/quantstrat/man/addOrder.Rd
===================================================================
--- pkg/quantstrat/man/addOrder.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/addOrder.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/orders.R
 \name{addOrder}
 \alias{addOrder}
 \title{add an order to the order book}
@@ -53,28 +54,28 @@
 \description{
 It is important to understand that all the order functionality included in \code{quantstrat}
 exists to more closely model a real trading environment both in backtesting and in production.
-Many backtesting systems make a set of assumptions about instant execution,
-and we have chosen not to do this in quantstrat, because real quantitative
-trading systems do not have instant execution.  They make decisions
+Many backtesting systems make a set of assumptions about instant execution, 
+and we have chosen not to do this in quantstrat, because real quantitative 
+trading systems do not have instant execution.  They make decisions 
 (the Rules) and then enter orders (the province of this function in backtesting),
-during which there is some \code{delay} between receiving the data that fires the
-Signal and Rule, and the time the order reaches the market, and then those orders
+during which there is some \code{delay} between receiving the data that fires the 
+Signal and Rule, and the time the order reaches the market, and then those orders 
 \emph{MAY} become transactions if market prices and liquidity cooperate.
 }
 \details{
-By default, this function will locate and replace any 'open' order(s)
-on the requested portfolio/symbol that have the same order
+By default, this function will locate and replace any 'open' order(s) 
+on the requested portfolio/symbol that have the same order  
 type and side.  If an orderset is also specified and replace=TRUE,
-\emph{all open orders} for the orderset will be replaced.
+\emph{all open orders} for the orderset will be replaced.   
 If you do not want open orders to be canceled and replaced with the new order,
 set \code{replace=FALSE}.
-
+ 
 We have modeled a 'limit' order, used to enter or exit a position at a specific price, determined by the
 prefered price (see \code{prefer}) plus \code{threshold} (see below).
 
 We have modeled two types of stop orders, which should be sufficient to model most types of stops.
 
-We have modeled the simplest type, a 'stoplimit' order, which is just a limit order used to enter
+We have modeled the simplest type, a 'stoplimit' order, which is just a limit order used to enter 
 or exit a position at a specific price, determined by the prefered price (see \code{prefer}) plus \code{threshold}
 (see below). The stoplimit order type can be used to implement both stop-enter (long/buy or short/sell)
 and stop-loss (long/sell or short/buy) style limit orders. There is no functional difference between a
@@ -86,20 +87,20 @@
 of the order. In this way, a 10 pct trailing exit will not change in size from the current price as the
 price changes. Be aware that a stoptrailing order may be moved ("replaced") frequently.
 
-Some markets and brokers recognize a stop that triggers a market order, when the stop is triggered,
+Some markets and brokers recognize a stop that triggers a market order, when the stop is triggered, 
 a market order will be executed at the then-prevailing price.  We have not modeled this type of order.
 
 We have also added the 'iceberg' order type.  This order type should
-most often be paired with \code{delay} and \code{\link{osMaxPos}}.  The
-iceberg order when initially entered is treated like a limit
-order, with an optional \code{threshold} (which is applied at initial order
+most often be paired with \code{delay} and \code{\link{osMaxPos}}.  The 
+iceberg order when initially entered is treated like a limit 
+order, with an optional \code{threshold} (which is applied at initial order 
 entry, so be careful).  Right now, they will enter a new order at price+threshold
-upon any execution of the prior iceberg order.  This process could
-be infinite if \code{\link{osMaxPos}} or an equivalent order sizing
+upon any execution of the prior iceberg order.  This process could 
+be infinite if \code{\link{osMaxPos}} or an equivalent order sizing 
 function is not used to limit total position size. An order \code{delay}
-is also advisable to model the delay that occurs between getting the trade
+is also advisable to model the delay that occurs between getting the trade 
 confirmation of the previous trade and entering the new order into the order book.
-
+ 
 The 'limit', 'stoplimit', 'stoptrailing' and 'iceberg' order types are the only order types that make
 use of the order \code{threshold}. Thresholds may be specified in one of 2 ways: as a scalar (\code{tmult=FALSE})
 or as a multiplier for the current price (\code{tmult=TRUE}). If \code{tmult=TRUE}, \code{threshold} is converted to a
@@ -111,10 +112,10 @@
 provide all thresholds as a positive number, and the software will automagically figure out whether to add or
 subtract the threshold amount from the price.
 
-If you ever wanted to move from a backtesting mode to a production mode,
-this function (and the linked funtion \code{\link{ruleOrderProc}}) would
-need to be replaced by functions that worked against your execution environment.
-Basically, the execution environment must provide three interfaces in a live
+If you ever wanted to move from a backtesting mode to a production mode, 
+this function (and the linked funtion \code{\link{ruleOrderProc}}) would 
+need to be replaced by functions that worked against your execution environment.  
+Basically, the execution environment must provide three interfaces in a live 
 trading environment:
 
 \enumerate{
@@ -122,10 +123,10 @@
 
 \item an order interface for sending orders (and canceling or updating them) to the market
 
-\item a fill interface that reports the transaction details when an order has been filled
+\item a fill interface that reports the transaction details when an order has been filled 
 }
 
-Conversion to a live trading environment will also likely require a new version of
+Conversion to a live trading environment will also likely require a new version of 
 \code{\link{applyStrategy}} to provide the event loop interface and interact with \code{mktdata}.
 }
 \seealso{

Modified: pkg/quantstrat/man/addPosLimit.Rd
===================================================================
--- pkg/quantstrat/man/addPosLimit.Rd	2015-11-01 17:40:34 UTC (rev 1708)
+++ pkg/quantstrat/man/addPosLimit.Rd	2015-11-01 21:36:29 UTC (rev 1709)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.2): do not edit by hand
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/osFUNs.R
 \name{addPosLimit}
 \alias{addPosLimit}
 \title{add position and level limits at timestamp}
@@ -26,32 +27,32 @@
 Typically, constraints will include position sizing limits.
 }
 \details{
-\code{addPosLimit} works with \code{\link{osMaxPos}} to set
+\code{addPosLimit} works with \code{\link{osMaxPos}} to set 
 and enforce position sizing limits.  If \code{levels=1},
 then all order sizing will be in the complete control of
 the strategy rules, up to the maximum position specified
-using \code{addPosLimit}'s \code{maxpos} and \code{minpos}
+using \code{addPosLimit}'s \code{maxpos} and \code{minpos} 
 arguments.
-
+  
 Simply setting a position limit will not do anything.
 The strategy entry rules also need to specify an
-the use of order sizing function \code{\link{osMaxPos}},
+the use of order sizing function \code{\link{osMaxPos}}, 
 most typically as an argument to \code{\link{ruleSignal}}.
 
-levels are a simplification of more complex (proprietary)
-techniques sometimes used for order sizing.
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/blotter -r 1709


More information about the Blotter-commits mailing list