[Blotter-commits] r1373 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 21 20:04:12 CET 2013
Author: opentrades
Date: 2013-01-21 20:04:11 +0100 (Mon, 21 Jan 2013)
New Revision: 1373
Modified:
pkg/quantstrat/R/paramsets.R
pkg/quantstrat/R/strategy.R
Log:
- fixed bug when apply.paramset() was called without mktdata
Modified: pkg/quantstrat/R/paramsets.R
===================================================================
--- pkg/quantstrat/R/paramsets.R 2013-01-20 22:38:58 UTC (rev 1372)
+++ pkg/quantstrat/R/paramsets.R 2013-01-21 19:04:11 UTC (rev 1373)
@@ -356,7 +356,7 @@
#' @export
#' @seealso \code{\link{add.constraint}}, \code{\link{add.constraint}}, \code{\link{delete.paramset}}
-apply.paramset <- function(strategy.st, paramset.label, portfolio.st, account.st, mktdata, nsamples=0, user.func=NULL, user.args=NULL, calc='slave', audit=NULL, verbose=FALSE)
+apply.paramset <- function(strategy.st, paramset.label, portfolio.st, account.st, mktdata=NULL, nsamples=0, user.func=NULL, user.args=NULL, calc='slave', audit=NULL, verbose=FALSE)
{
must.have.args(match.call(), c('strategy.st', 'paramset.label', 'portfolio.st'))
Modified: pkg/quantstrat/R/strategy.R
===================================================================
--- pkg/quantstrat/R/strategy.R 2013-01-20 22:38:58 UTC (rev 1372)
+++ pkg/quantstrat/R/strategy.R 2013-01-21 19:04:11 UTC (rev 1373)
@@ -112,7 +112,7 @@
stop ("You must supply an object of type 'strategy'.")
}
- if (missing(mktdata)) load.mktdata=TRUE else load.mktdata=FALSE
+ if (missing(mktdata) || is.null(mktdata)) load.mktdata=TRUE else load.mktdata=FALSE
for (portfolio in portfolios) {
More information about the Blotter-commits
mailing list