Documentation Index
Fetch the complete documentation index at: https://fred-mcp-server.amorelli.tech/llms.txt
Use this file to discover all available pages before exploring further.
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:Units: Billions of Dollars
Change (chg)
Absolute period-to-period change:x_t - x_{t-1}
Output:
- Quarterly GDP additions
- Monthly employment changes
- Period-over-period differences
Percent Change (pch)
Period-to-period percentage change:((x_t / x_{t-1}) - 1) * 100
Output:
- Month-over-month inflation
- Quarter-over-quarter growth
- Short-term momentum
Percent Change from Year Ago (pc1)
Year-over-year percentage change:((x_t / x_{t-n}) - 1) * 100
where n = periods in a year
Output:
- Annual inflation rates
- Year-over-year GDP growth
- Annual wage growth
Compounded Annual Rate of Change (pca)
Annualized growth rate:(((x_t / x_{t-1})^(n)) - 1) * 100
where n = periods per year
Output:
- Quarterly GDP at annual rates (official reporting)
- Annualizing monthly growth
Change from Year Ago (ch1)
Absolute change from same period last year:x_t - x_{t-n}
Output:
- Year-over-year job gains
- Annual change in levels
Continuously Compounded Rate (cch)
Log difference (percentage):(ln(x_t) - ln(x_{t-1})) * 100
Output:
- Financial returns analysis
- Statistical modeling
- Volatility calculations
Continuously Compounded Annual Rate (cca)
Log difference annualized:(ln(x_t) - ln(x_{t-n})) * 100
Use cases:
- Academic research
- Econometric modeling
Natural Log (log)
Logarithmic transformation:ln(x_t)
Output:
- Identifying exponential trends
- Statistical analysis requiring normality
- Growth rate calculations
Transformation Selection Guide
By Use Case
- Headlines & Reporting
- Trend Analysis
- Momentum Analysis
- Statistical Analysis
By Data Frequency
| Frequency | Common Transformations | Example |
|---|---|---|
| Daily | lin, pch, cch | Stock returns |
| Weekly | lin, pch, pc1 | Initial claims |
| Monthly | pc1, pch, ch1 | Inflation, employment |
| Quarterly | pca, pc1, log | GDP growth |
| Annual | pc1, chg | Demographics |
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
Mixing Frequencies
Mixing Frequencies
❌ Don’t: Compare monthly % change with quarterly✅ Do: Use consistent frequencies
Transformation on Transformations
Transformation on Transformations
❌ Don’t: Apply transformations to already-transformed series✅ Do: Use base series
Ignoring Units
Ignoring Units
❌ Don’t: Forget to check original units✅ Do: Verify units in response
Seasonality Issues
Seasonality Issues
❌ Don’t: Use NSA data for growth rates✅ Do: Use SA data for comparisons
Transformation Reference
Quick Reference Table
| Code | Name | Formula | Period | Use Case |
|---|---|---|---|---|
| lin | Levels | x_t | - | Raw data |
| chg | Change | x_t - x_ | Prior | Absolute change |
| ch1 | Change YoY | x_t - x_ | Year ago | Annual absolute change |
| pch | % Change | ((x_t/x_)-1)*100 | Prior | Growth rate |
| pc1 | % Change YoY | ((x_t/x_)-1)*100 | Year ago | Annual growth |
| pca | Compounded Annual | (((x_t/x_)^n)-1)*100 | Annual | Annualized rate |
| cch | Log Change | (ln(x_t)-ln(x_))*100 | Prior | Log returns |
| cca | Log Change Annual | (ln(x_t)-ln(x_))*100 | Annual | Annual log returns |
| log | Natural Log | ln(x_t) | - | Log levels |
Frequency Multipliers (n)
| Frequency | n (per year) |
|---|---|
| Daily | 365 (business) / 260 (trading) |
| Weekly | 52 |
| Monthly | 12 |
| Quarterly | 4 |
| Semi-annual | 2 |
| Annual | 1 |
Best Practices
Next Steps
Time Series Analysis
Analyze transformed data
Advanced Queries
Complex data retrieval
Economic Indicators
Common indicator patterns
API Reference
Full transformation docs