[R-SIG-Finance] quantstrat applyStrategy error
Marteau
mcmarteau at yahoo.com
Tue Mar 19 11:19:03 CET 2013
I’m going through a few quantstrat examples, e.g.
http://www.r-bloggers.com/low-volatility-with-r/
and I consistently get an error on the applyStrategy function
as per example: out<-try(applyStrategy(strategy=stratRSRANK , portfolios=portfolio.st))
the error is the following
Error in as.POSIXlt.character(x, tz, ...) :
character string is not in a standard unambiguous format
> traceback()
10: stop("character string is not in a standard unambiguous format")
9: as.POSIXlt.character(x, tz, ...)
8: as.POSIXlt(x, tz, ...)
7: as.POSIXct(as.POSIXlt(x, tz, ...), tz, ...)
6: as.POSIXct.default(TxnDate)
5: as.POSIXct(TxnDate)
4: addTxn(Portfolio = portfolio, Symbol = symbol, TxnDate = txntime,
TxnQty = orderQty, TxnPrice = txnprice, ... = ..., TxnFees = txnfees)
3: ruleOrderProc(portfolio = portfolio, symbol = symbol, mktdata = mktdata,
timestamp = timestamp, ...)
2: applyRules(portfolio = portfolio, symbol = symbol, strategy = strategy,
mktdata = mktdata, Dates = NULL, indicators = sret$indicators,
signals = sret$signals, parameters = parameters, ..., path.dep = TRUE)
1: applyStrategy(strategy = stratRSRANK, portfolios = portfolio.st)
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] PerformanceAnalytics_1.1.0 quantstrat_0.7.7 foreach_1.4.0
[4] blotter_0.8.12 FinancialInstrument_1.0.3 quantmod_0.4-0
[7] Defaults_1.1-1 TTR_0.21-1 xts_0.9-3
[10] zoo_1.7-7
loaded via a namespace (and not attached):
[1] codetools_0.2-8 grid_2.15.1 iterators_1.0.6 lattice_0.20-10 tools_2.15.
More information about the R-SIG-Finance
mailing list