Skip to main content
Track Moving-average crossover
42 / 57
Library

2007issue C121-6

Confirming trend with regression slope and r-squared

R-squared shows how closely a linear-regression line tracks price, while linear-regression slope shows whether that fitted line is rising or falling. The archive workflow treats a price move as a confirmed trend only when both readings agree with a moving-average crossover and the stochastic oscillator.

  • R-squared is a zero-to-one measure of how closely the linear-regression line tracks price. Rising values mark stronger trend association and do not identify whether prices are advancing or declining.
  • Linear-regression slope is the per-bar change of the fitted line, not raw price. A reading above zero points up and a reading below zero points down.
  • A moving-average crossover and a rising stochastic oscillator are treated as a possible countertrend rally unless r-squared is also above the 0.20 threshold for a 20-period lookback and slope is positive.
  • The paired regression filters can help judge trend strength, skip some short-lived false moves, and flag fading momentum. They miss exact tops and bottoms and can conflict in sideways or transitional markets.
Entries in this reading3 entries

Two filters from one fitted line

A linear-regression line is a least-squares best-fit through recent prices. It reduces bar-to-bar noise and is the shared baseline for the two readings used here: r-squared and linear-regression slope.

R-squared is a zero-to-one association measure that shows how closely that line tracks the price series it is fitted to. Linear-regression slope measures the per-bar change of the same fitted line, not the raw price series.

Editorial interpretation: treat r-squared as a trend-strength filter and linear-regression slope as a direction filter. A price move is treated as a confirmed trend only when both agree with a moving-average crossover and the stochastic oscillator. Without that agreement, the same move is treated as a possible countertrend rally.

How r-squared measures trend association

Rising r-squared marks stronger trend association. Falling values mark weakening association. The reading does not identify price direction. A rising value can accompany either advancing or declining prices.

The r-squared threshold for a 95% positive correlation depends on lookback length. A 10-period reading needs about 0.40, a 20-period reading needs 0.20, and a 50-period reading needs about 0.08.

A 20- to 30-period r-squared lookback is presented as practical for end-of-day work. The examples use a 20-period setting that matches the regression length.

R-squared reversals from levels above 0.70 are treated as warnings of a possible near-term price change. Declines from high levels often coincide with flattening or rounding of the regression line.

How slope reads direction

Linear-regression slope is the per-bar change of the fitted line. It is plotted around zero so that a positive reading points up and a negative reading points down.

A reading above zero is read as upward direction. A reading below zero is read as downward direction. Slope answers the direction question that r-squared leaves open.

Agreement with crossovers and the stochastic oscillator

A moving-average crossover is a dual moving-average signal used as a price-structure confirmation, not as a standalone entry rule. The stochastic oscillator is a momentum oscillator used to flag overbought or oversold conditions and possible countertrend rallies that still need regression confirmation.

When a moving-average crossover and a rising stochastic oscillator are not joined by r-squared above the 0.20 threshold and a positive slope, the combination is treated as a possible countertrend rally rather than a confirmed uptrend.

Late confirmation and failed confirmation

In the gold example, later confirmation by both regression outputs arrived after the stochastic oscillator was already overbought and the moving averages had widened, after which price rose an additional 45 points.

A rising stochastic oscillator and rising r-squared can still fail as trend confirmation if linear-regression slope stays negative and price cannot clear a short-term moving average. Strength of association is not enough when the fitted line is still pointing down.

What the paired filters can and cannot do

The paired regression filters are described as useful for judging trend strength, skipping some short-lived false moves, and flagging fading momentum.

They still miss exact tops and bottoms. They also produce conflicts in sideways or transitional markets, where r-squared, slope, the moving-average crossover, and the stochastic oscillator need not point the same way.

Editorial interpretation

This is a TradersWeek editorial reading of the archive workflow, not a claim from the archive. R-squared is the trend-strength filter. Linear-regression slope is the direction filter. The moving-average crossover supplies price-structure confirmation. The stochastic oscillator flags momentum extremes and possible countertrend rallies.

Editorial interpretation: agreement across those readings is the bar for calling a confirmed trend. Disagreement, especially a negative slope or r-squared below the lookback threshold, keeps the move in the countertrend-rally category.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
42 of 57 in the Moving-average crossover track
20081-2 pp.Next on Moving-average crossoverConstructing a multi-timeframe smoothed crossoverThe triple-smoothed-overlay is three displaced lines read as an alignment-state: a clean stack licenses a long or short hypothesis, and entanglement keeps the procedure out.
All readings on this track · 57 readings
  1. 1988Constructing moving averages: weights, smoothing and crossovers
  2. 1988Constructing breadth and average trend states
  3. 1989Evaluating an always-in-the-market moving-average crossover
  4. 1989Constructing symmetric market-breadth ratio accumulators
  5. 1989Objective crossover tests of Fibonacci wave ratios
  6. 1990Volume-adjusted moving average construction
  7. 1991Constructing a mechanical crossover on a synthetic price series
  8. 1991A two-speed breadth reading for intermediate market direction
  9. 1992A Deutschemark yield map with dual-average and relative-strength timing
  10. 1992Confirming currency-fund trends with a crossover and a filter
  11. 1992A moving-average slope filter for crossover signals
  12. 1992Occupancy and split-sample tests for average crossovers
  13. 1994Gold-mining seasonality and bond-fund duration switching
  14. 1994Price oscillator from two moving averages
  15. 1995Explicit exponential weights and binary entry filters
  16. 1996Currency futures crossover with slope, bond filter, and stop
  17. 1996Two-market average crossover entry with a fixed stop
  18. 1997Construction of a filtered three-average crossover
  19. 1998Two-group exponential average compression as a trend filter
  20. 1998Constructing r-squared trend filters with dual lookbacks
  21. 1998Moving-average length is a habit, not a secret
  22. 1999Solving the close that triggers a moving-average crossover
  23. 2000Kagi yang and yin control versus crossover noise
  24. 2000Constructing simple moving average crossover filters
  25. 2000Building a vertical-horizontal filter to gate trend signals
  26. 2000Two-average crossover as a check on trend following
  27. 2003Stacked exponential-average retracement entries and extreme stops
  28. 2003Evaluating oscillator thresholds against optimized crossovers
  29. 2004Constructing a semicycle trend-quality filter
  30. 2004Commodity subgroups labeled by crossover, support, or convergence
  31. 2004Full-window evaluation of crossover trend systems
  32. 2004Two-average trend filters as a classroom critique of indicator stacking
  33. 2005Three-layer confirmation from a moving-average cross, candles, and Q-stick
  34. 2005Charting put prices beside an equity breakdown
  35. 2005Range-gated moving-average crossover construction
  36. 2007Anticipating a simple-average crossover with a threshold-close
  37. 2007Anticipating moving-average crossovers one bar ahead
  38. 2007Lead-series moving-average crossovers with a stochastic and relative strength index
  39. 2007Next-bar SMA crossover hypotheses from theoretical crossing values
  40. 2007Anticipating a moving-average crossover before confirmation
  41. 2007A three-horizon moving-average stack as a construction problem
  42. 2007Confirming trend with regression slope and r-squared
  43. 2008Constructing a multi-timeframe smoothed crossover
  44. 2008Best-day clusters versus trend filters
  45. 2008Allied markets as a confirmation gate for crossover and breakout signals
  46. 2008Weekly exponential-average crossover as a mechanical trend case study
  47. 2010Evaluating a 200-day crossover as long, short, and stand-aside rules
  48. 2010Read a 10-and-40 trend on two neighboring time frames
  49. 2012Sampling unit as a first-class parameter on dual simple moving averages
  50. 2012Constructing index-ETF entries from volatility-index persistence
  51. 2013Moving-average baselines versus crossover signals
  52. 2013Constructing a typical-price and heikin-ashi crossover as one mechanical procedure
  53. 2016A three-gate checklist for longs after a sharp drop
  54. 2016Weekly inflation-ratio crossover for commodity regimes
  55. 2017Normalized Laguerre zero-axis warning as a two-marker construction
  56. 2019Range-weighted construction of an adaptive exponential moving average
  57. 2020Construct a second-pullback entry after a moving-average crossover
All 108 readings tagged Moving-average crossover
Also on Moving-average crossover5 readings