Downloading FRED data with quantmod: can dates be specified?

后端 未结 3 1889
梦毁少年i
梦毁少年i 2021-01-18 00:14

I am downloading data from FRED with the quantmod library (author Jeffrey A. Ryan). With Yahoo and Google data, I am able to s

相关标签:
3条回答
  • 2021-01-18 01:00

    Alternatively you can download FRED data from Quandl (http://www.quandl.com/help/r) which offers more than 4 million datasets including all of the FRED data. There is an API and R package available. ("Quandl"). Data can be returned in several formats formats e.g. data frame ("raw"), ts ("ts"), zoo ("zoo") and xts ("xts"). For example to download GDPPOT10 and specify the dates and have it returned as an xts object all you have to do is:

    require(Quandl)
    mydata = Quandl("FRED/GDPPOT", start_date="2005-01-03",end_date="2013-04-10",type="xts")
    
    0 讨论(0)
  • 2021-01-18 01:07

    Quandl doesn't seem to offer all data from FRED, at least in terms data frequency. Quandl most likely offers only annual data which is not useful in many circumstance.

    0 讨论(0)
  • 2021-01-18 01:11

    You have to download all the data and subset later. getSymbols.FRED does not support the from argument like getSymbols.yahoo does.

    0 讨论(0)
提交回复
热议问题