fred-macro

Installation
SKILL.md

FRED Macroeconomic Data Analysis

This skill covers end-to-end macroeconomic data workflows using the Federal Reserve Economic Data (FRED) API via the fredapi Python package. You will learn to authenticate, fetch single and panel series, compute growth rates, apply the Hodrick-Prescott filter, date business cycles, and produce publication-quality charts with recession shading.


1. Authentication and Setup

Store your FRED API key as an environment variable. Never hard-code keys in source files.

# Obtain a free key at https://fred.stlouisfed.org/docs/api/api_key.html
export FRED_API_KEY="<paste-your-key>"
pip install fredapi pandas numpy matplotlib statsmodels openpyxl
Installs
8
GitHub Stars
38
First Seen
Mar 30, 2026