Skip to main content
Track Linear regression
10 / 43
Library

1991issue C091-3

Time-origin offset and residual-price divergence on a quadratic least-squares fit

Recover the time-origin offset on a second-degree least-squares fit, recompute one smoothed price, and treat residual-price divergence at successive swing lows as a higher-priority condition than the slope of the fitted trend.

  • A second-degree least-squares fit writes smoothed price as a quadratic function of time and estimates three constants from paired price-time observations.
  • Recover the time-origin offset before reading the curve: in the worked gold example the first observation uses t = 10, and that substitution produces a smoothed price of 383.35.
  • Residual-price divergence is present when successive swing lows rank one way on the residual series and the opposite way on original price; the later labeled swing has that disagreement and the earlier one does not, so they are separate conditions.
  • Rule precedence ranks residual-price divergence above a restriction that would allow action only in the direction of the fitted trend, including when that restriction would point the other way.
Entries in this reading2 entries

A reconstruction drill

A second-degree least-squares relation writes smoothed price as a quadratic function of time. The three constants of that least-squares fit are estimated from paired price-time observations. Editorial framing: use the fit as a reconstruction drill. Recover the time-origin offset, recompute one smoothed price, then inspect residual-price divergence at successive swing lows.

Recover the time-origin offset

In the worked gold example the time index is offset so the first observation uses t = 10. Substituting that value produces a smoothed price of 383.35. Plotting each smoothed price against its corresponding time index traces the fitted trend used as the baseline curve.

Obtain the three constants

After the required products and sums over n price-time pairs are formed, the three unknown constants are obtained by solving three simultaneous equations. Once summation is understood, computing those constants uses only addition, subtraction, multiplication, and division. For the 57-point sample, about 1,100 arithmetic operations were required to obtain the three constants, so a computer is treated as essential except for the smallest data sets.

Residual-price divergence at swing lows

A residual is the difference between an observed price and the fitted value at the same time index. Residual-price divergence is a disagreement between how successive swing lows rank on the residual series and how those same swings rank on the original price series. At one later labeled swing, the residual low that precedes it is higher than the residual low that precedes an earlier labeled swing, while the original-price lows reverse that ranking. That residual-versus-price disagreement is present at the later swing and absent at the earlier one, which is why the two points are not treated as the same condition.

Rule precedence over trend direction

The residual-versus-price disagreement is ranked above a restriction that would allow action only in the direction of the fitted trend. The archive restates that ranking as applying even when that restriction would point the other way. Editorial reading: residual-price divergence is the higher-priority, testable filter. The slope of the least-squares fit does not cancel that condition.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
10 of 43 in the Linear regression track
19911-6 pp.Next on Linear regressionA least-squares trendline from ordered pricesA least-squares line is the straight line that reduces the sum of the squared vertical deviations of the plotted points to a minimum.
All readings on this track · 43 readings
  1. 1990Constructing dollar baselines from rates, inflation, and residuals
  2. 1990Constructing a nominal index value from forward earnings and fitted yield
  3. 1990Constructing a nominal index price from earnings and a fitted yield
  4. 1990Endpoint-pinned price paths are not forecasts
  5. 1990Constructing least-squares polynomial smoothers
  6. 1991Endpoint growth rates versus linear-regression consistency
  7. 1991Out-of-sample checks for linear growth fits
  8. 1991Trend as persistence, not a straight line
  9. 1991Quadratic trend, residual oscillator, and a secondary cycle calendar
  10. 1991Time-origin offset and residual-price divergence on a quadratic least-squares fit
  11. 1991A least-squares trendline from ordered prices
  12. 1992Constructing log-linear growth and reliability screens
  13. 1992Constructing log-linear growth-rate baselines
  14. 1992Next-session high, low, and close from rolling linear regression
  15. 1993Auditing an index price-earnings multiple with short-rate regression
  16. 1994Regression-seeded nested exponential price filter
  17. 1994Constructing the double exponential average from lag cancellation
  18. 1994Evaluating money supply as a linear leading-index baseline
  19. 1995Constructing least-squares trend channels
  20. 1995Linear baseline holdout checks for annual bill-rate forecasts
  21. 1995Projection bands from high and low regression slopes
  22. 1995Evaluating a least-squares end-point moving average on a known test series
  23. 1996Constructing an endpoint moving average from a least-squares line
  24. 1996Scoring equity path consistency with a k-ratio overlay
  25. 1996Evaluating month-end yield gaps for equity regimes
  26. 1996Constructing session-indexed standard error bands
  27. 1998Evaluating linear regression baselines for index valuation
  28. 1998R-squared as a two-state trend filter from a price-time fit
  29. 2000Second-order moving-average lag correction
  30. 2002Price regression line versus beta for index tracking
  31. 2003Regression slope with an r-squared trend confidence gate
  32. 2003Constructing finite-volume-element divergence with slope comparison
  33. 2004Building a daily score from regression, retracement, and volume
  34. 2004Constructing least-squares trendlines from ordered prices
  35. 2007Rectangle breakout targets beyond height
  36. 2007Confirming a price trend with regression slope and r-squared
  37. 2008A linear-regression angle assembled as one trend filter
  38. 2010A two-state swing machine from four running extremes
  39. 2016Score oil-complex tightness before divergence or regression
  40. 2017Nikkei-yen intermarket divergence as a regime case study
  41. 2017Constructing Calmar ratio and linear regression baselines
  42. 2019Pair-trade layer construction versus average-spread management
  43. 2020A convolution slope built from nested linear regression
All 112 readings tagged Linear regression
Also on Linear regression5 readings