pair_trade.R
带有输入参数的精彩quanstrat
包(几分钟前通过 SVN 更新)的富有洞察力的演示:SD <- 1 ; N <-10
给出以下错误:
[1] "2009-01-26 00:00:00 DIA -500 @ 76.1735958352934"
Error in `/.default`(TxnFees, abs(TxnQty)) :
non-numeric argument to binary operator
我sessionInfo()
的如下:
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] quantstrat_0.9.1669 foreach_1.4.2
[3] blotter_0.9.1666 PerformanceAnalytics_1.4.3541
[5] FinancialInstrument_1.2.0 quantmod_0.4-3
[7] TTR_0.22-0 xts_0.9-7
[9] zoo_1.7-11
loaded via a namespace (and not attached):
[1] codetools_0.2-9 grid_3.1.2 iterators_1.0.7 lattice_0.20-29
我没有看到任何明确提及TxnQty
或TxnFees
在代码中,当然,对于原始参数集,演示似乎运行没有错误SD <- 2 ; N <- 20
。
我错过了什么还是这是一个错误?