1

I am using blotter and related packages to create a small portfolio. These packages rely on data from yahoo. Additionally, they are using xts internally, but somehow the functions on a xts object don't work and return the desired results. This of course would need a lot of changing the internal features just to replace end() with a working call like max(index()).

library(quantmod)
library(xts)
getSymbols("LGQM.DE", from="2017-01-01", to=Sys.Date(), src='yahoo',
          auto.assign = TRUE, adjust = TRUE)

str(LGQM.DE)
end(LGQM.DE)

max(index(LGQM.DE))

As can be seen, when executing this code the end() function only returns an empty date value, although the date is stored properly, as can be seen when checking the result of max(index(LGQM.DE)). The packages were installed from github using the devtools and I restarted the R session after the installation.

hannes101
  • 2,410
  • 1
  • 17
  • 40
  • `end(LGQM.DE)` and `max(index(LGQM.DE))` both return the same for me: `"2018-05-24"`, that is `structure(17675, tzone = "UTC", tclass = "Date", class = "Date")` – AkselA May 25 '18 at 09:22
  • Hmm, ok then something on my system is wrong, thanks. – hannes101 May 25 '18 at 09:24
  • Don't know if it makes a difference, but I got `quantmod` etc. from CRAN and is on R 3.5.0. – AkselA May 25 '18 at 09:26
  • 1
    Ok, just reinstalled from CRAN on R 3.5.0 and it works, sorry for the noise, will open an issue on github. – hannes101 May 25 '18 at 09:30
  • It's not clear where you intend to open an issue, and what the issue would be. I could not replicate this using the latest development xts, so I doubt the issue is with xts. – Joshua Ulrich May 25 '18 at 13:12
  • Perhaps it's in quantmod. Not sure, but I am still seeing it with versions quantmod_0.4-13.1 and xts_0.10-2.1 installed from github. Opened https://github.com/joshuaulrich/quantmod/issues/238 – hannes101 May 25 '18 at 13:18

0 Answers0