timeseries-detrending

Detrend macroeconomic time series with HP filtering and log transformation.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill timeseries-detrending-generalreasoning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: timeseries-detrending
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/econ-detrending-correlation/environment/skills/timeseries-detrending
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill timeseries-detrending-generalreasoning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides guidance on decomposing economic time series into trend and cyclical components, enabling analysis of business cycles and comparative volatility.

Core Features & Use Cases

  • HP filter guidance for annual, quarterly, and monthly data, including interpretation of the trend and cycles.
  • Log transformation guidance to stabilize variance and convert multiplicative growth to additive growth for clearer cycle analysis.
  • End-to-end workflow for preparing data, applying detrending, and analyzing cyclical relationships across series with practical examples in macroeconomics.

Quick Start

Perform HP filtering on a logged real GDP series to extract the cyclical component for cycle analysis.

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?

To detrend macroeconomic time series and reveal business cycles, apply an HP filter to logged data, separating the underlying trend from the cyclical component for analysis of GDP, consumption, or investment indicators.

What is the HP filter used for in macroeconomics time-series analysis?

The HP filter in macroeconomics time-series analysis decomposes economic indicators like GDP into trend and cyclical components, extracting cyclical fluctuations to compute volatilities and cross-series correlations.

When should I apply log transformation before detrending macro data?

Apply log transformation before detrending macro data to stabilize variance and convert multiplicative growth into additive growth, yielding clearer cycle extraction and more accurate comparative volatility analysis.

Can I use this detrending workflow for monthly and quarterly macro data?

Yes, this detrending workflow supports annual, quarterly, and monthly macro data, providing specific HP filter guidance and interpretation for each frequency to analyze underlying business cycles across various indicators.

What is the best way to analyze cross-series cyclical relationships in macroeconomics?

The best way to analyze cross-series cyclical relationships is to log-transform multiple macro indicators, apply detrending to extract cycles, then compute correlations and volatilities across the extracted cyclical components.