Skip to main content
Track Correlation analysis
35 / 37
Library

2020issue C0524-27

Constructing a bounded correlation-trend-filter

A correlation-trend-filter is assembled by correlating ordered prices with a linear-slope-reference. The reading stays in the closed interval from -1 to +1, and correlation-length sets both the intended holding scale and the expected delay.

  • A correlation-trend-filter is assembled by correlating an ordered price series with a linear-slope-reference that has a fixed positive slope.
  • Over the lookback, a rising path reads near +1, a falling path near -1, and a sideways or oscillating path shows little correlation, all inside the closed interval from -1 to +1.
  • Correlation-length is the window length that sets holding-period scale and a lag of about half that window, so a 10-bar reading marks trend-onset-and-failure sooner than a 40-bar reading.
  • A shorter window can mark onset or failure first, then be lengthened as a directional move persists. The same measure can also be run as a cyclic-mode-reading over about half a cycle.
Entries in this reading3 entries

Assembling the filter

A trend filter can be assembled by correlating an ordered price series with a straight reference line that has a positive slope. In this construction the correlation-trend-filter is that lookback correlation between observed prices and an explicit upward linear reference, used as a bounded reading of directional regime.

The linear-slope-reference is a synthetic straight line with a fixed positive slope that stands in for an idealized trend path over the estimation window.

Over the chosen lookback, a rising price path produces a correlation near +1, a falling path produces a correlation near -1, and a sideways or oscillating path produces little correlation. The construction confines the output to the closed interval from -1 to +1, so the same filter can be applied to different symbols without rescaling.

Choosing correlation-length

Correlation-length is the number of bars in the window. It sets both the intended holding-period scale and the expected delay of the reading. The reading lags by about half the correlation-length, so a 10-bar window can mark onset or failure with less delay while a 40-bar window is smoother but later.

Correlation-length can be sized to an intended holding interval: a 20-bar window for a hold of about one month, and a 40- to 60-bar window for a hold on the order of a quarter year.

A shorter correlation period can be used first to mark trend-onset-and-failure, then lengthened as a directional move persists. Trend-onset-and-failure is the movement of the bounded reading away from or back toward zero, used to mark when a directional regime starts or ends.

Cyclic-mode-reading

If the correlation-length is shortened to about half a cycle, the same measure can follow the cyclic component. That cyclic-mode-reading turns positive on the upswing and negative on the downswing, with lag of at least a quarter cycle when the length is half the cycle.

Worked implementation

A worked implementation correlates closing prices with a linear time index that is signed so the reference slope stays positive when the window is counted backward. It then applies the standard two-variable correlation ratio after confirming that both series have nonzero variance.

The product-moment-guard is that zero-variance check on both series before forming the two-variable correlation ratio, so the filter is undefined rather than unstable when a window has no spread.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
35 of 37 in the Correlation analysis track
202052-56 pp.Next on Correlation analysisConstructing a correlation-to-line trend filterThe indicator is constructed by correlating a security's recent closes with a straight-line ideal trend over a chosen lookback.
All readings on this track · 37 readings
  1. 1988Constructing a lead-aware correlation coefficient
  2. 1989A precious-metal price as a changing intermarket equation
  3. 1990Two clocks for copper: a factor regime, a regression baseline, and leftover moving-average timing
  4. 1990Earnings yield, rate correlation and regression for equity value
  5. 1991Name the window, then combine leaders
  6. 1991Constructing a two-market linear correlation check
  7. 1991Constructing a commodity-bond correlation regime filter
  8. 1992Building intermarket context with linear correlation
  9. 1993Inverse-scale overlays as a gold-equity regime filter
  10. 1994Constructing seasonal slots from windows, analog years, and implied volatility
  11. 1995Pin one reference close and roll companion correlations as an overlay
  12. 1995Rolling correlation windows for shifting intermarket regimes
  13. 1998Gold as a cross-market regime barometer
  14. 1999The gold-bond inverse is a regime, not a cause
  15. 1999A nested lag test of gold leading bond yields
  16. 1999Constructing spreads from stock and intermarket correlation
  17. 2000Evaluating headline versus food-and-energy-excluded CPI as bond-yield context
  18. 2005A late EUR/USD fifth wave tested by the Bund-Treasury gap
  19. 2006Intermarket dislocation as context for short-horizon momentum
  20. 2008Map ordinary 12-month outcomes before stacking valuation, rates, and seasonality
  21. 2008A clean-energy theme inside the oil-and-energy regime
  22. 2014Quantitative-easing overlays as fragile belief regimes
  23. 2015Three intermarket checks from the late-2014 crude decline
  24. 2015Basket construction via rank, correlation, and locked rules
  25. 2015Construct a CAD-oil pair from percent-of-range Bollinger maps
  26. 2015CAD/USD and crude: first the correlation, then the band gap
  27. 2017Correlation regime versus moving-average crossover for S&P 500 exposure
  28. 2017Updating intermarket systems after correlation shifts
  29. 2017Constructing a correlation-divergence regime filter for yen and Nikkei context
  30. 2018Clustered negative troughs in an energy-index pairwise correlation
  31. 2018Filter pairwise-correlation before reading an intermarket regime
  32. 2018Moving-average supports in the March 2018 correlation shock
  33. 2020Bond spreads as an equity regime lens
  34. 2020Crash-protection folklore as a correlation regime question
  35. 2020Constructing a bounded correlation-trend-filter
  36. 2020Constructing a correlation-to-line trend filter
  37. 2020Bitcoin correlation regimes across equities and gold
All 52 readings tagged Correlation analysis
Also on Correlation analysis5 readings