Skip to content

A bug report on quantmod::getSymbols (or a bug in FRED)

3 messages · Ajay Shah, Mark Breman, Jeff Ryan

#
Folks,

Here's a blemish:

  library(quantmod)
  getSymbols("PPIACO", src="FRED")
  PPIACO[342:347,]

which gives me:

           PPIACO
1941-06-01   15.0
1941-07-01   15.3
1941-08-01   15.6
1941-09-01   15.8
<NA>         15.9
1941-11-01   15.9

where, as you see, the date for October 1941 is missing. This could be
a mistake in the underlying FRED data or it could be a flaw in
getSymbols.FRED.

Hope this helps,
#
Try the newest version (from R-forge) of xts.  There was a strange R
bug in POSIXct times that combined with xts caused some odd behavior.
Not too sure if that is the reason, but mine seems to work:
[1] "PPIACO"
PPIACO
1941-01-01   13.9
1941-02-01   13.9
1941-03-01   14.0
1941-04-01   14.4
1941-05-01   14.6
1941-06-01   15.0
1941-07-01   15.3
1941-08-01   15.6
1941-09-01   15.8
1941-10-01   15.9
1941-11-01   15.9
1941-12-01   16.2
sessionInfo() is also helpful when it comes to diagnosing.
R version 2.10.1 (2009-12-14)
i386-apple-darwin10.0.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] quantmod_0.3-14 TTR_0.20-1      Defaults_1.1-1  xts_0.7-1
[5] zoo_1.6-2

loaded via a namespace (and not attached):
[1] grid_2.10.1     lattice_0.17-26


Best,
Jeff
On Thu, Mar 18, 2010 at 12:30 AM, Ajay Shah <ajayshah at mayin.org> wrote: