我以前使用 quantsrat_0.9.1739 和blotter_0.9.1741 有一段时间了,它工作正常,直到我用blotter 0.12.4 将它们更新到最新版本0.10.7。
我之前编写的大多数模拟都包含以下消息:(这个是从演示(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
提前感谢您提供的任何帮助!