[R-SIG-Finance] Downloading Real Time Data from FRED (fImport/fredSeries)
Brian G. Peterson
brian at braverock.com
Fri Jan 8 14:14:41 CET 2010
Costas Vorlow wrote:
> Dear Brian,
>
> Thanks. I tried to download data from FRED via quantmod (BTW excellent
> package) but I can't. It returns empty time series (unlike the GS
> Yahoo example). Is there something wrong? (using 2.9.2 R).
>
I have no idea, as you didn't provide a reproducible example (see
posting guide or http://catb.org/~esr/faqs/smart-questions.html)
Also, please keep replies on-list, so everyone can benefit from what you
discover or create.
Regards,
- Brian
> 2010/1/8 Brian G. Peterson <brian at braverock.com
> <mailto:brian at braverock.com>>
>
> Research wrote:
>
> Hi,
>
> I was looking at the API for ALFRED:
>
> http://api.stlouisfed.org/docs/fred/realtime_period.html
> http://api.stlouisfed.org/docs/fred/series_release.html
>
> ALFRED is like FRED but provides us with real-time data, i.e.,
> data for macroeconomic variables as they were originaly
> announced (released) and not the revised (finalised) data
> which FRED contains. These are useful for real-time
> econometric applications.
>
> I was wondering, how can one use the existing
> routines/packages that access FRED, to access ALFRED.
>
> >From what I have checked so far, the mnemonics appear to be
> the same on FRED and ALFRED for the same series (say PAYMES
> for non-farm payrolls).
>
>
> I haven't used the fImport function, but quantmod has a similar
> function, so I'll use that in my examople on modifying, the
> details should be quite similar.
>
> look at function:
>
> getSymbols.FRED
>
> copy this to function getSymbols.ALFRED
>
> modify it to include a parameter for the api key, or better yet
> register one for the project.
> then modify the line starting with download.file to reflect the
> new required URL. While the Symbol may be the same, the url is
> clearly different
>
> test and share with the community
>
> Regards,
>
> - Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
>
>
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the R-SIG-Finance
mailing list