fred-macro

Retrieve and analyze U.S. macroeconomic time-series from FRED with growth calculations and HP filtering.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill fred-macro-xjtulyc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fred-macro
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/07-economics/fred-macro
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill fred-macro-xjtulyc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fredapi, pandas, numpy, matplotlib, statsmodels, openpyxl.

What problem does it solve?

It removes the friction of downloading, cleaning, and analyzing U.S. macroeconomic time-series data from FRED so you can quickly study growth, trends, and business-cycle dynamics with consistent charts.

Core Features & Use Cases

  • Fetch FRED series and build macro panels: Retrieve multiple indicators (e.g., GDP, unemployment, inflation, yield spreads) into aligned pandas DataFrames for analysis and comparison.
  • Compute common macro transformations: Generate level-based measures plus MoM, YoY, and QoQ growth rates and optionally use FRED unit transformations for validation.
  • Decompose cycles and visualize with NBER shading: Apply the Hodrick-Prescott filter and produce publication-quality plots with recession shading and inversion overlays.

Quick Start

Use the fred-macro skill to fetch a set of FRED macro series starting in 2000, compute YoY inflation and recession shading, and generate an output chart for your report.

Frequently Asked Questions about fred-macro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I download and align FRED macroeconomic time-series data for analysis?

To download and align FRED macroeconomic time-series, use this Skill to fetch multiple indicators via the fredapi into aligned pandas DataFrames, handling uneven native frequencies automatically.

Can I plot FRED data with NBER recession shading in Python?

You can plot FRED data with NBER recession shading using this Skill to generate publication-ready matplotlib charts that automatically overlay recession periods.

Do I need a FRED API key to retrieve macroeconomic data?

You need a FRED API key to retrieve macroeconomic data, which must be provided via environment variables for the fredapi library to authenticate and fetch series.

How do I apply an HP filter to decompose business cycles in Python?

To apply an HP filter and decompose business cycles in Python, this Skill uses statsmodels to separate trend and cyclical components from macroeconomic series.

What is the best way to compute MoM and YoY growth rates for FRED series?

The best way to compute MoM and YoY growth rates for FRED series is using this Skill to automatically calculate level-based measures and validate them against FRED unit transformations.

Can I track yield-curve inversions using FRED data and matplotlib?

You can track yield-curve inversions using FRED data and matplotlib by leveraging this Skill to construct multi-series panels with inversion overlays.