Centred vs trailing moving averages: lag and endpoint trade-offs of smoothing filters like Hodrick-Prescott

Quick Overview

Asks how a centred moving average differs from a trailing one and what lag and endpoint trade-offs come with smoothing filters such as the Hodrick-Prescott filter. Tests understanding of causal filtering, smoothing parameters, revisions at the edge of a sample and spurious cycles.

Centred vs trailing moving averages: lag and endpoint trade-offs of smoothing filters like Hodrick-Prescott

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

What is the difference between a centred and a trailing moving average, and what lag and endpoint trade-offs come with smoothing filters like the Hodrick-Prescott (HP) filter? Assume you are smoothing a monthly or quarterly business or economic series, both to describe its history and to read its current trend. ```hint Look at which observations each filter needs For each moving average, list the observations it uses to produce the value at time t. Then apply both to a straight line and see where the smoothed line ends up. ``` ```hint Write down what the HP filter minimizes The HP trend balances closeness to the data against a penalty on how fast the trend's slope changes. Ask what that balance looks like at the last observation, where no future data exists. ``` ### What a Strong Answer Covers - Which observations each moving average uses, how that affects alignment with the series, and which one can be computed at the latest point - How the lag of a trailing average grows with window length, ideally with the size of the lag - The general trade-off between removing noise, adding lag and blurring turning points - What the HP filter minimizes and what lambda controls - The endpoint problem of two-sided filters (unreliable latest estimates, revisions) and the risk of spurious cycles ### Follow-up Questions - How would you compute a centred moving average for monthly data with a 12-month window, which has no middle point? - You need a real-time trend estimate for a dashboard. How would you reduce the lag of a trailing average, and what do you give up? - How would you choose lambda for the HP filter on monthly data, and what happens to the trend as lambda goes to zero or to infinity? - How could you check whether a cycle found by the HP filter is real or an artifact of the filter?

Overview: Asks how a centred moving average differs from a trailing one and what lag and endpoint trade-offs come with smoothing filters such as the Hodrick-Prescott filter. Tests understanding of causal filtering, smoothing parameters, revisions at the edge of a sample and spurious cycles.

General logo
General
Nov 24, 2026
mediumData ScientistOtherStatistics & Math
0
0

What is the difference between a centred and a trailing moving average, and what lag and endpoint trade-offs come with smoothing filters like the Hodrick-Prescott (HP) filter?

Assume you are smoothing a monthly or quarterly business or economic series, both to describe its history and to read its current trend.

What a Strong Answer Covers Guidance

  • Which observations each moving average uses, how that affects alignment with the series, and which one can be computed at the latest point
  • How the lag of a trailing average grows with window length, ideally with the size of the lag
  • The general trade-off between removing noise, adding lag and blurring turning points
  • What the HP filter minimizes and what lambda controls
  • The endpoint problem of two-sided filters (unreliable latest estimates, revisions) and the risk of spurious cycles

Follow-up Questions Guidance

  • How would you compute a centred moving average for monthly data with a 12-month window, which has no middle point?
  • You need a real-time trend estimate for a dashboard. How would you reduce the lag of a trailing average, and what do you give up?
  • How would you choose lambda for the HP filter on monthly data, and what happens to the trend as lambda goes to zero or to infinity?
  • How could you check whether a cycle found by the HP filter is real or an artifact of the filter?