Advertisement IC Markets

The Savitzky-Golay filter: why the smoothest curve on the chart may be using bars that haven't happened yet

Discuss 1-minute to 15-minute price action setups, fading intraday momentum, key support/resistance zones, and proven short-term trading methodologies.
Post Reply
Shadow Trader
Posts: 6144
Joined: Wed Sep 09, 2026 5:19 pm

The Savitzky-Golay filter: why the smoothest curve on the chart may be using bars that haven't happened yet

Post by Shadow Trader »

The Savitzky-Golay filter is a smoothing method borrowed from signal processing. Instead of averaging the prices in a window, as a moving average does, it fits a small polynomial, usually quadratic or cubic, to the points in a sliding window and uses the fitted value. The result follows turning points much better than a moving average of the same length. Peaks stay peaks instead of being flattened and delayed.

On a historical chart it looks remarkable: smooth, with almost no visible lag, turning right at the tops and bottoms. That's exactly why it deserves suspicion.

The standard version is centred. The value at bar t comes from a polynomial fitted to bars on both sides of t, including bars after it. On past data that's fine. On the live bar, the future bars don't exist, so an indicator built this way either can't compute the latest value or it computes it with a lopsided window and then revises it as new bars come in. Either way, the curve you see on history isn't what you would have seen in real time. It repaints.

There is a causal version, which fits the polynomial only to past bars and reads the value at the end of the window. It's honest, but it loses most of the appeal: the end of a fitted polynomial is the least stable part, so the line becomes noisy and tends to overshoot at turning points.

That's a general lesson about smoothing filters on charts. Any filter that looks almost lag-free on history should be checked for whether it uses future data. A quick test is to record the indicator's value on the live bar each minute and compare it with the value the chart shows for that same bar an hour later. If they differ, the historical curve is not something you could have traded.

Has anyone come across indicators like this in the wild that looked great on history and turned out to be centred? It seems a common trap with the more exotic smoothing tools.
Recommended broker for automated trading & scalping IC Markets
Post Reply