[R-SIG-Finance] A bug report on quantmod::getSymbols (or a bug in FRED)

Jeff Ryan jeff.a.ryan at gmail.com
Thu Mar 18 13:57:14 CET 2010


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:

> getSymbols("PPIACO", src="FRED")
[1] "PPIACO"
> PPIACO['1941']
           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.
> sessionInfo()
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:
> 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,
>
> --
> Ajay Shah                                      http://www.mayin.org/ajayshah
> ajayshah at mayin.org                             http://ajayshahblog.blogspot.com
> <*(:-? - wizard who doesn't know the answer.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



-- 
Jeffrey Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics
www.insightalgo.com



More information about the R-SIG-Finance mailing list