Forum: help


rebalance rule timestamp problem [ Reply ] By: Gergely Temesi on 2013-11-13 17:48 | [forum:40051] |
Hi, in the most current version of quantstrat/blotter/r a rebalancing rule like bellow throws an error when firing (including the macdRebalancing demo for example). It seems that rulePctEquity somehow does not see the timestamp argument. I attached my sessionInfo() as well. Can you confirm the issue or is it related to my environment? Thanks in advance, Greg add.rule(strat.st, 'rulePctEquity', arguments=list(rebalance_on='months', trade.percent=.02, refprice=quote(last(getPrice(mktdata)[paste('::',timestamp,sep='')])), digits=0 ), type='rebalance', label='rebalance' ) -----> Error in paste("::", timestamp, sep = "") : cannot coerce type 'closure' to vector of type 'character' ------- > sessionInfo() R version 3.0.2 (2013-09-25) Platform: i386-w64-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=Hungarian_Hungary.1250 LC_CTYPE=Hungarian_Hungary.1250 LC_MONETARY=Hungarian_Hungary.1250 [4] LC_NUMERIC=C LC_TIME=Hungarian_Hungary.1250 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] quantstrat_0.8.0 foreach_1.4.1 blotter_0.8.17 PerformanceAnalytics_1.1.0 [5] FinancialInstrument_1.1.9 quantmod_0.4-0 Defaults_1.1-1 TTR_0.22-0 [9] xts_0.9-7 zoo_1.7-10 loaded via a namespace (and not attached): [1] codetools_0.2-8 grid_3.0.2 iterators_1.0.6 lattice_0.20-24 tools_3.0.2 |