Home  /  Products  /  Features  /  Import FRED

<-  See Stata's other features


  • Click to search, browse, and import

  • Access over 566,000 time series

  • Access both FRED and archived data (ALFRED)

  • Combine multiple series

The St. Louis Federal Reserve makes available over 566,000 U.S. and international economic and financial time series to registered users. It's free. It's easy to register. It's called FRED.

In Stata, you can directly access FRED! You can search. You can browse. By category. By release. By source. You can click to download, and Stata will combine the series and load them instantly into memory.

Or you can do the same with the import fred command, which is especially convenient when you want to automate updating 27 different series that you are tracking.

Let's see it work

You need GDP for Venezuela, Colombia, and Peru. You launch Stata. You choose File > Import > Federal Reserve Economic Data (FRED). You type "Venezuela Gross Domestic Product" and click on Search. It looks like this:


There's a lot to choose from. You choose RGDPNAVEA666NRUG, which fortunately you do by clicking on it. The series is added to the import list on the right. Now repeat the process for Colombia and Peru, and you have three series listed for download.


Click on Import, and choose the date range and aggregation.


Click on Submit, and Stata swings into action. Stata downloads the data into its memory and combines them into a single dataset. To find out what you now have, just type describe.

. describe

Contains data
 Observations:            28
    Variables:             5
Variable Storage Display Value name type format label Variable label
datestr str10 %-10s observation date daten int %td numeric (daily) date RGDPNAVEA666N~G float %9.0g Real GDP at Constant National Prices for Bolivarian Republic of Venezuela RGDPNACOA666N~G float %9.0g Real GDP at Constant National Prices for Colombia RGDPNAPEA666N~G float %9.0g Real GDP at Constant National Prices for Peru
Sorted by: datestr Note: Dataset has changed since last saved.

If you prefer, you can type commands to search and load instead.

However you do it, you will want to rename the variables. Who wants variables with names like RGDPNAVEA666NRUG? You could type

. rename RGDPNAVEA666NRUG venezuela 

but don't do that. Instead, just type

. rename

Double-click on the variable name in Stata's Variables pane. You will see

. rename RGDPNAVEA666NRUG 

Now type venezuela and press Enter.

. rename RGDPNAVEA666NRUG venezuela 

One down, two more to go! Then, you can analyze the series by using Stata's time-series commands.

Tell me more

Learn more about the import fred command at [D] import fred.

Learn more about Stata's data management features.