Course contentsShow
← Data Science
Lesson 736 of 2,14519. Time Series FoundationsFree lesson

Higher-Order Differencing

Apply second-order and higher differencing to remove polynomial trends and complex non-stationary patterns.

Higher-Order Differencing

What you'll learn: How to apply second-order and higher differencing to eliminate complex trends and stubborn non-stationary patterns in time series data.


The Core Idea

Sometimes first-order differencing (subtracting consecutive values) isn't enough. When your time series still shows trends after one round of differencing—especially polynomial or quadratic trends—you need to difference again. This is higher-order differencing.

Second-order differencing means you difference the already-differenced data:

  • First difference: y'(t) = y(t) - y(t-1)
  • Second difference: y''(t) = y'(t) - y'(t-1)

Think of it like smoothing a bumpy road. One pass with the grader removes big hills. If gentle slopes remain, you make a second pass to flatten those too.

When to Use It

  • Quadratic or polynomial trends: When your data curves upward or downward in an accelerating pattern
  • After testing: If your first-differenced series still fails stationarity tests (ADF, KPSS)
  • ACF/PACF clues: When your first-differenced ACF still shows slow decay

Real-World Analogy

Imagine tracking a car's position over time. First-order differencing gives you velocity (change in position). Second-order differencing gives you acceleration (change in velocity). If velocity itself is trending, you need that second difference to stabilize the series.

Caution

More isn't always better. Over-differencing can introduce unnecessary complexity and make patterns harder to model. Most real-world series need at most d=1 or d=2 differences. Always verify with stationarity tests after each differencing step.

Key Takeaway: Higher-order differencing removes polynomial trends by repeatedly taking differences of differences, but stop once stationarity is achieved to avoid over-differencing.