Skip to content
All library documents

Smoothing Flow Data with an Exponential Moving Average

Article Quant Q&A · Author: Felton Wang

Summary

The document asks whether bank client transaction flows in a currency can serve as an estimate of market positioning. Its specific problem is that a rolling one-month sum can shift sharply when a large older observation leaves the window, even if current flow is unremarkable. The proposed remedy is to replace the simple rolling average with an exponential moving average, described more generally as an infinite impulse response filter. Because older observations lose influence gradually, they do not disappear all at once at a window boundary.

This answer addresses the abrupt change caused by dropping observations; it does not establish whether the bank’s client flows represent positioning across the whole market. The source gives no validation method, parameter guidance, or evidence about predictive value. An EMA smooths the series, but the estimate still depends on the chosen decay rate and on how representative the client sample is.

Key ideas

  • A simple rolling sum can jump when a large old observation falls outside its window.
  • An exponential moving average reduces abrupt changes by letting old data lose influence gradually.
  • An EMA is an infinite impulse response filter, unlike a finite-window rolling average.
  • Smoothing flow data does not by itself prove that the flows represent market-wide positioning.

Tags

Full text
# Estimate market positioning from flow data


# Estimate market positioning from flow data












I have a set of time series data from a bank that is transaction data from all its clients on a particular currency.

From that data, I attempt to estimate the current "position" of all market participants in that currency.

I do that through a rolling 20 day total (1 month). However sometimes that total changes significantly due to a large data point dropping out of the rolling window, which is an issue in creating an estimate of "positioning".

My questions are

- Is estimating the positioning from flow data reasonable?

- how to adjust for rolling sum changing significantly not due to new data, but old data dropping out?

## Answer by babelproofreader (score 1, accepted)

https://quant.stackexchange.com/a/70188

To answer your second point, use an exponential moving average rather than a simple moving average, or more technically, use an infinite impulse response filter rather than a finite impulse response filter.

This will avoid the drastic dropping out of older data.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.