timeseries-detrending

Detrends macroeconomic time series using the HP filter with frequency-based lambda selection.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill timeseries-detrending
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: timeseries-detrending
Source: https://github.com/KaiserWhoLearns/skillsbench/tree/main/tasks/econ-detrending-correlation/environment/skills/timeseries-detrending
Command: npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill timeseries-detrending

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detrending time series is essential for macroeconomic analysis to separate long-run movement from short-term fluctuations, enabling clearer assessment of cycles.

Core Features & Use Cases

  • HP filter guidance: Decomposes a series into trend and cyclical components with guidance on choosing lambda by data frequency.
  • Log transformations for growth series: Applies log transforms before detrending to stabilize variance and interpret cycles as percentage deviations.
  • Correlation and volatility analysis: Enables comparisons of business-cycle dynamics across variables (GDP, consumption, investment) and cross-series correlations.
  • Workflow examples: Use cases include analyzing GDP growth dynamics, comparing sectoral cycles, and monitoring turning points in macro data.

Quick Start

Apply the HP filter to your log-transformed GDP series to extract the cycle and trend components.

Frequently Asked Questions about timeseries-detrending

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

FAQPage Schema
How do I detrend macroeconomic time series to reveal business cycles?▼

You detrend macroeconomic time series by applying an HP filter to log-transformed data, separating the long-run trend from short-term cyclical fluctuations. This decomposition isolates business-cycle dynamics for clearer analysis.

What is the best way to choose an HP filter lambda for quarterly or monthly data?▼

Choosing an HP filter lambda depends on data frequency, with specific frequency-based selection guidance provided for annual, quarterly, and monthly macroeconomic series. This ensures accurate extraction of cyclical components.

Why should I apply a log transformation before detrending GDP growth series?▼

Applying a log transformation before detrending GDP growth series stabilizes variance and allows you to interpret the extracted cyclical components as percentage deviations from the long-run trend.

Can I analyze cross-series correlations and volatility for macroeconomic data?▼

Yes, you can analyze cross-series correlations and volatility. Detrending enables comparisons of business-cycle dynamics across macroeconomic variables like GDP, consumption, and investment to monitor turning points.

What is the purpose of detrending time series for macroeconomic analysis?▼

The purpose of detrending time series is to separate long-run movement from short-term fluctuations. This separation is essential for macroeconomic analysis to enable clearer assessment and monitoring of business cycles.