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.
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.
All readings on this track · 37 readings
- 1988Constructing a lead-aware correlation coefficient
- 1989A precious-metal price as a changing intermarket equation
- 1990Two clocks for copper: a factor regime, a regression baseline, and leftover moving-average timing
- 1990Earnings yield, rate correlation and regression for equity value
- 1991Name the window, then combine leaders
- 1991Constructing a two-market linear correlation check
- 1991Constructing a commodity-bond correlation regime filter
- 1992Building intermarket context with linear correlation
- 1993Inverse-scale overlays as a gold-equity regime filter
- 1994Constructing seasonal slots from windows, analog years, and implied volatility
- 1995Pin one reference close and roll companion correlations as an overlay
- 1995Rolling correlation windows for shifting intermarket regimes
- 1998Gold as a cross-market regime barometer
- 1999The gold-bond inverse is a regime, not a cause
- 1999A nested lag test of gold leading bond yields
- 1999Constructing spreads from stock and intermarket correlation
- 2000Evaluating headline versus food-and-energy-excluded CPI as bond-yield context
- 2005A late EUR/USD fifth wave tested by the Bund-Treasury gap
- 2006Intermarket dislocation as context for short-horizon momentum
- 2008Map ordinary 12-month outcomes before stacking valuation, rates, and seasonality
- 2008A clean-energy theme inside the oil-and-energy regime
- 2014Quantitative-easing overlays as fragile belief regimes
- 2015Three intermarket checks from the late-2014 crude decline
- 2015Basket construction via rank, correlation, and locked rules
- 2015Construct a CAD-oil pair from percent-of-range Bollinger maps
- 2015CAD/USD and crude: first the correlation, then the band gap
- 2017Correlation regime versus moving-average crossover for S&P 500 exposure
- 2017Updating intermarket systems after correlation shifts
- 2017Constructing a correlation-divergence regime filter for yen and Nikkei context
- 2018Clustered negative troughs in an energy-index pairwise correlation
- 2018Filter pairwise-correlation before reading an intermarket regime
- 2018Moving-average supports in the March 2018 correlation shock
- 2020Bond spreads as an equity regime lens
- 2020Crash-protection folklore as a correlation regime question
- 2020Constructing a bounded correlation-trend-filter
- 2020Constructing a correlation-to-line trend filter
- 2020Bitcoin correlation regimes across equities and gold