Skip to content

FRED — Federal Reserve Economic Data

Verified May 16, 2026 · tested with live no-key CSV fetch (GDP, USREC, SP500)

macrotime-seriesfreeno-api-keyfederal-reserve

FRED (Federal Reserve Economic Data, St. Louis Fed) is the single most useful free source for macro and financial time series: ~800,000 series — output, prices, rates, spreads, the cross-section of Treasury yields, recession indicators — with a clean API and, crucially, a no-authentication CSV fallback. It is the default calibration source the ZeroPaper pipeline reaches for when a model needs macro moments. This page is the distilled access recipe.

Option 1 — No API key (fallback, zero setup)

Section titled “Option 1 — No API key (fallback, zero setup)”

Any series has a direct CSV endpoint that needs no authentication:

https://fred.stlouisfed.org/graph/fredgraph.csv?id=GDP
import pandas as pd
gdp = pd.read_csv(
"https://fred.stlouisfed.org/graph/fredgraph.csv?id=GDP",
parse_dates=["observation_date"], index_col="observation_date",
)

This works for most series and is the right default for a pipeline that shouldn’t depend on a key being present. Use it unless you need search, metadata, vintages, or bulk pulls.

Option 2 — fredapi (preferred when a key is available)

Section titled “Option 2 — fredapi (preferred when a key is available)”

Get a free key at https://fred.stlouisfed.org/docs/api/api_key.html and store it in the environment (e.g. .env as FRED_API_KEY=...) — never hard-code it.

# pip install fredapi python-dotenv
import os
from dotenv import load_dotenv
from fredapi import Fred
load_dotenv()
fred = Fred(api_key=os.environ["FRED_API_KEY"])
gdp = fred.get_series("GDP")
https://api.stlouisfed.org/fred/series/observations?series_id=GDP&api_key={KEY}&file_type=json

Useful for series search (/fred/series/search), release calendars, and ALFRED vintage (real-time) data that fredapi doesn’t expose as conveniently.

The reason to read this page rather than the FRED docs. Verified against live data on the date above.

  • SP500 is price-only and ~10 years deep. The series begins ~10 years back (confirmed: first observation 2016-05-16) and is an index level, not total return. For asset-pricing work use the Ken French market series or CRSP instead — never SP500 for long-horizon return studies.
  • Revisions. GDP/GDPC1 are revised for years. If your result depends on what was known at the time, use ALFRED vintages, not the latest series.
  • Mixed frequencies. Don’t silently merge daily and monthly series; resample deliberately and document the convention.
  • Discontinued series. Some IDs stop updating or are superseded; check the last observation date before trusting a “current” value.
  • Rate limits. The keyed API rate-limits bulk pulls — batch and cache; the CSV fallback is fine for low-volume use.
  • Units & seasonal adjustment. Many series are indices or seasonally adjusted (SA) variants — read the series page; don’t assume levels or NSA.
  • CSV column name. The no-key endpoint returns observation_date as the date column (not DATE); parse it explicitly as shown above.

FRED has ~800,000 series; for finance and macro calibration the recurring set is small. Search the site or the API for anything else.

Series IDDescriptionFrequency
GDPNominal GDPQuarterly
GDPC1Real GDPQuarterly
CPIAUCSLCPI, all urban consumersMonthly
PCEPILFECore PCE inflationMonthly
FEDFUNDSEffective fed funds rateMonthly
GS1010-year Treasury yieldMonthly
TB3MS3-month T-bill rateMonthly
BAA10YBaa corporate – 10yr Treasury spreadMonthly
UNRATEUnemployment rateMonthly
PCEPersonal consumption expendituresMonthly
VIXCLSCBOE VIXDaily
SP500S&P 500 index (price-only, ~10yr — see gotchas)Daily
USRECNBER recession indicator (0/1)Monthly
  • Moments: report mean, std, and autocorrelation of growth rates (log differences), not levels, when calibrating to a stationary model.
  • Business-cycle stats: HP-filter or band-pass the cyclical component; use USREC for recession dating.
  • Term structure / spreads: combine yield series (GS10, TB3MS, BAA10Y) rather than hunting for a pre-computed spread.
  • Real vs. nominal: deflate with CPIAUCSL or the PCE deflator; be explicit about which.
  • Always state the sample period and frequency when reporting any moment — FRED series are revised and extended, so an unstated window is not reproducible.

Cite the series and provider, e.g.: U.S. Bureau of Economic Analysis, Gross Domestic Product [GDP], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/GDP, accessed YYYY-MM-DD. Each series page lists its original source and the exact suggested citation.

Found an error or want a topic covered? Open an issue, use the Edit page link above, or email contact@instituteforautomatedresearch.org. Edits are reviewed before publishing; provenance and accuracy are the point.