Skip to main content

Data Transformations

FRED provides powerful transformation capabilities to prepare data for analysis. Learn how to apply transformations directly in your requests.

Transformation Types

Levels (lin)

Raw, untransformed data:
Output:
Units: Billions of Dollars

Change (chg)

Absolute period-to-period change:
Formula: x_t - x_{t-1} Output:
Use cases:
  • Quarterly GDP additions
  • Monthly employment changes
  • Period-over-period differences

Percent Change (pch)

Period-to-period percentage change:
Formula: ((x_t / x_{t-1}) - 1) * 100 Output:
Use cases:
  • Month-over-month inflation
  • Quarter-over-quarter growth
  • Short-term momentum

Percent Change from Year Ago (pc1)

Year-over-year percentage change:
Formula: ((x_t / x_{t-n}) - 1) * 100 where n = periods in a year Output:
Use cases:
  • Annual inflation rates
  • Year-over-year GDP growth
  • Annual wage growth
pc1 is the most common transformation for inflation and growth rates

Compounded Annual Rate of Change (pca)

Annualized growth rate:
Formula: (((x_t / x_{t-1})^(n)) - 1) * 100 where n = periods per year Output:
Use cases:
  • Quarterly GDP at annual rates (official reporting)
  • Annualizing monthly growth
pca compounds the growth rate. A 0.75% quarterly growth becomes ~3% annual rate.

Change from Year Ago (ch1)

Absolute change from same period last year:
Formula: x_t - x_{t-n} Output:
Use cases:
  • Year-over-year job gains
  • Annual change in levels

Continuously Compounded Rate (cch)

Log difference (percentage):
Formula: (ln(x_t) - ln(x_{t-1})) * 100 Output:
Use cases:
  • Financial returns analysis
  • Statistical modeling
  • Volatility calculations

Continuously Compounded Annual Rate (cca)

Log difference annualized:
Formula: (ln(x_t) - ln(x_{t-n})) * 100 Use cases:
  • Academic research
  • Econometric modeling

Natural Log (log)

Logarithmic transformation:
Formula: ln(x_t) Output:
Use cases:
  • Identifying exponential trends
  • Statistical analysis requiring normality
  • Growth rate calculations

Transformation Selection Guide

By Use Case

By Data Frequency

FrequencyCommon TransformationsExample
Dailylin, pch, cchStock returns
Weeklylin, pch, pc1Initial claims
Monthlypc1, pch, ch1Inflation, employment
Quarterlypca, pc1, logGDP growth
Annualpc1, chgDemographics

Practical Examples

Inflation Analysis

GDP Growth

Employment Changes

Combining Transformations

Compare Multiple Views

Growth Decomposition

Advanced Techniques

Detrending

Remove long-term trends using logs:

Volatility Measurement

Use continuous compounding for returns:

Real vs Nominal

Deflate nominal series:
FRED often provides pre-calculated real series (look for “Real” in title)

Common Pitfalls

Don’t: Compare monthly % change with quarterly
Do: Use consistent frequencies
Don’t: Apply transformations to already-transformed series
Do: Use base series
Don’t: Forget to check original units
Do: Verify units in response
Don’t: Use NSA data for growth rates
Do: Use SA data for comparisons

Transformation Reference

Quick Reference Table

CodeNameFormulaPeriodUse Case
linLevelsx_t-Raw data
chgChangex_t - x_PriorAbsolute change
ch1Change YoYx_t - x_Year agoAnnual absolute change
pch% Change((x_t/x_)-1)*100PriorGrowth rate
pc1% Change YoY((x_t/x_)-1)*100Year agoAnnual growth
pcaCompounded Annual(((x_t/x_)^n)-1)*100AnnualAnnualized rate
cchLog Change(ln(x_t)-ln(x_))*100PriorLog returns
ccaLog Change Annual(ln(x_t)-ln(x_))*100AnnualAnnual log returns
logNatural Logln(x_t)-Log levels

Frequency Multipliers (n)

Frequencyn (per year)
Daily365 (business) / 260 (trading)
Weekly52
Monthly12
Quarterly4
Semi-annual2
Annual1

Best Practices

1

Start with Levels

Always examine raw data first to understand scale and patterns
2

Match Use Case

Choose transformation based on your analysis needs
3

Document Choices

Note which transformations you applied for reproducibility
4

Verify Results

Sanity-check transformed values against known economic facts

Next Steps

Time Series Analysis

Analyze transformed data

Advanced Queries

Complex data retrieval

Economic Indicators

Common indicator patterns

API Reference

Full transformation docs