我之前使用的是quantsrat_0.9.1739& blotter_0.9.1741已经有一段时间了,它工作正常,直到我用0.12.4的吸墨纸将它们更新到最新版本0.10.7。
我之前写的大部分模拟都出现在以下消息中: (这个是从demo(macd)中提取的)
Warning message:
In .updatePosPL(Portfolio = pname, Symbol = as.character(symbol), :
Could not parse ::2018-01-12 as ISO8601 string, or one/bothends of the range were outside the available prices: 2007-01-03/2014-05-30. Using all data instead.
它修改了我过去生成的近50%的回测结果。 如果我回到之前版本的quantstrat并运行相同的策略,一切都会恢复正常。
如果有人遇到与我相同的情况,我会很高兴能告诉我这个问题是如何解决的。
以下是有关我的会话的更多信息:
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] quantstrat_0.10.7 foreach_1.4.4 blotter_0.12.4
[4] PerformanceAnalytics_1.4.3541 FinancialInstrument_1.3.1 quantmod_0.4-12
[7] TTR_0.23-2 xts_0.10-1 zoo_1.8-1
[10] devtools_1.13.4
loaded via a namespace (and not attached):
[1] codetools_0.2-15 lattice_0.20-35 digest_0.6.13 withr_2.1.1 MASS_7.3-47 grid_3.4.3 R6_2.2.2
[8] git2r_0.21.0 httr_1.3.1 curl_3.1 boot_1.3-20 iterators_1.0.9 tools_3.4.3 compiler_3.4.3
[15] memoise_1.1.0
提前感谢您提供的任何帮助!