[R-SIG-Finance] quantstrat demo(faber_rebal)

Simon Otziger simon at volemont.com
Fri Mar 28 22:00:45 CET 2014


Dear list members,

I'm trying to run the demo(faber_rebal) from the Quantstrat package
(R-Forge Rev. 1590):
library(quantstrat)
Sys.setenv(TZ = "America/New_York")
demo(faber_rebal)

The demo stops on line 133 with the error message:
> out<-applyStrategy.rebalancing(strategy='faber' , portfolios='faber')
Error in paste("::", timestamp, sep = "") :
  cannot coerce type 'closure' to vector of type 'character'

I guess it's a namespace/masking clash with the timestamp() function
of the R.utils package. Another quantstrat user posted the same issue
in the R-Forge forums, see
https://r-forge.r-project.org/forum/forum.php?thread_id=28525&forum_id=1032&group_id=316

Any idea how to fix it?

Thanks,
Simon


> sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] quantstrat_0.8.0           foreach_1.4.1
 [3] blotter_0.8.17             PerformanceAnalytics_1.1.0
 [5] FinancialInstrument_1.1.9  quantmod_0.4-0
 [7] Defaults_1.1-1             TTR_0.22-0
 [9] xts_0.9-7                  zoo_1.7-11

loaded via a namespace (and not attached):
[1] codetools_0.2-8 grid_3.0.3      iterators_1.0.6 lattice_0.20-27
[5] tools_3.0.3



More information about the R-SIG-Finance mailing list