Run statistical analysis on FRED® time series data via pipeline input.
The analyze command consumes JSONL from stdin and produces summary statistics or trend estimates. It is a terminal operator — it does not emit JSONL for further piping.
Examples:
- Summary — descriptive statistics (mean, median, std, etc.)
- Trend — direction and slope of a time series
USAGE
reserve analyze [subcommand]
Available Subcommands:
| summary | Compute descriptive statistics for a series |
| trend | Fit a trend model (linear or Theil-Sen) |
reserve analyze [subcommand] –help (for more details about a specific subcommand)
SUMMARY
Compute descriptive statistics for a time series.
Outputs include count, missing values, mean, standard deviation, percentiles, and change over time.
# Basic usage
reserve obs get UNRATE –format jsonl | reserve analyze summary
# Handle missing values
reserve obs get UNRATE –format jsonl | reserve transform filter –drop-missing | reserve analyze summaryTREND
Estimate the direction and slope of a time series.
Supports linear regression and Theil-Sen (robust to outliers and structural breaks).
Usage: reserve analyze trend [–method linear|theil-sen]
# Linear trend (default)
reserve obs get CPIAUCSL –start 2020-01-01 –format jsonl | reserve analyze trend
# Robust trend
reserve obs get CPIAUCSL –start 2020-01-01 –format jsonl | reserve analyze trend –method theil-sen
# Smoothe transformations
reserve obs get CPIAUCSL –start 2020-01-01 –format jsonl | reserve transform pct-change –period 12 | reserve window roll –stat mean –window 3 | reserve analyze trendWORKFLOW
# Fetch and summarize unemployment data
reserve obs get UNRATE –start 2020-01-01 –format jsonl | reserve analyze summary
# Compute year over year inflation
reserve obs get CPIAUCSL –start 2020-01-01 –format jsonl | reserve transform pct-change –period 12
# Trend estimation
reserve obs get CPIAUCSL –start 2020-01-01 –format jsonl | reserve transform pct-change –period 12 | reserve window roll –stat mean –window 3 | reserve analyze trend
See Global Flags for additional global options available for this command.