help fredusex

Title

fredusex -- Import Federal Reserve economic data, 2024 HTML format

Syntax

fredusex series_1 [series_2 ... series_k]
, data(string) [replace]

Description

fredusex imports data from the 2024 HTML format of the Federal Reserve Economic Data (FRED)
repository into Stata

The FRED repository at http://fred.stlouisfed.org/
contains more than 824,000 U.S. economic time series from 114 sources. Each time series is
stored in a separate file that also contains a string-date variable and header
with information about the series. fredusex imports series into a Stata dataset.

Options

data(string) is a required option that specifies the name of the Stata dataset to be created in the current working directory.
You need not include the .dta extension. If the file exists, the replace option
must be used.

replace can be used to remove the existing output file and rewrite it.

Remarks

This routine updates David Drukker's very useful freduse routine, published in the Stata Journal
6(3) and updated in 15(3). Recent changes to the underlying text format used by FRED caused
the freduse routine to fail. Despite Stata's built-in import fred capability, it is useful to
have a simple way of accessing FRED data without needing an API key.

As of 26 September 2024, Federal Reserve Board authors have revised Drukker's original routine,
so that the version of freduse on the SSC Archive works again. fredusex displays the variables' characteristics
in the results window; char list will do the same in freduse. fredusex creates
a new .dta file, while freduse requires that existing data are cleared.

The names of the FRED series are not case sensitive. They will be changed to upper case,
as used in FRED.
All series on FRED are associated with daily dates in a string format as variable daten.
The date variable is a Stata variable containing this daily date. For cnnvenience,
Stata variables qdate and mdate are the quarterly and monthly equivalents of the daily
date variable. Annual data are always aligned with January 1, while quarterly (monthly) data are
aligned with the first day of the calendar quarter (month).

Examples

. fredusex gdp mehoinusmaa646n unrate mich cpiaucsl, data(fredtest)

Author

Kit Baum

Boston College

baum@bc.edu