Trend filter
Short answer
A trend filter is a rule that allows a trade only when the broader price trend points in a chosen direction. It is commonly used to stop dip-buying or mean-reversion strategies from buying assets in sustained declines.
A trend filter does not create trades on its own. It sits on top of another rule and switches it on or off. A dip-buying rule, for example, may only buy pullbacks when the longer-term trend is up, on the view that dips in uptrends are more likely to recover than drops in downtrends. Trend filters are often based on a moving average, the slope of prices over a longer window, or the sign of past performance.
How it is used in strategy design and testing
In strategy design, the filter must be slower than the trading rule it controls, so that it reflects the broader trend rather than the same short-term move. Designers choose the trend measure, how it is smoothed and what happens when the filter turns off: closing positions, stopping new entries, or reducing size. Filters reduce exposure to falling knives and long bear markets, but they also cause late re-entry after a trend turns and can whipsaw around the boundary.
In testing, a trend filter often looks helpful because it removes the worst periods of a strategy. The question is whether it does so on data it was not tuned on. Testers compare the filtered and unfiltered rule across many markets and periods, count how often the filter switches, include costs from those switches and check whether the result depends on the exact filter setting. A filter that only helps at a single setting is likely overfitted.
Common mistakes
- Tuning the filter to past crashes. A setting that avoided known declines may fail on new ones.
- Ignoring switching costs. Frequent on-off changes add trading costs and whipsaws.
- Using a filter as fast as the rule. It then reacts to the same noise it should screen out.
- Assuming the filter removes all risk. Sudden crashes can happen before a slow filter reacts.
Related
- Strategy guides: Dip Buying (Buying Pullbacks), Trend following
- Related terms: Moving average, Falling knife, Whipsaw, Market regime
Education only. Not investment advice.
Questions people ask
What is a trend filter in trading?
It is a rule that lets another strategy trade only when the broader trend agrees, such as buying dips only in uptrends.
Why use a trend filter with dip buying?
It aims to avoid buying assets in sustained declines, where drops are thought to be less likely to recover.
How is a trend filter measured?
Common choices include a moving average, the slope of prices over a longer window, or the sign of past performance.
What are the downsides of a trend filter?
It can re-enter late after a turn, switch back and forth near the boundary, and react too slowly to sudden crashes.