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.
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.
All readings on this track · 43 readings
- 1990Constructing dollar baselines from rates, inflation, and residuals
- 1990Constructing a nominal index value from forward earnings and fitted yield
- 1990Constructing a nominal index price from earnings and a fitted yield
- 1990Endpoint-pinned price paths are not forecasts
- 1990Constructing least-squares polynomial smoothers
- 1991Endpoint growth rates versus linear-regression consistency
- 1991Out-of-sample checks for linear growth fits
- 1991Trend as persistence, not a straight line
- 1991Quadratic trend, residual oscillator, and a secondary cycle calendar
- 1991Time-origin offset and residual-price divergence on a quadratic least-squares fit
- 1991A least-squares trendline from ordered prices
- 1992Constructing log-linear growth and reliability screens
- 1992Constructing log-linear growth-rate baselines
- 1992Next-session high, low, and close from rolling linear regression
- 1993Auditing an index price-earnings multiple with short-rate regression
- 1994Regression-seeded nested exponential price filter
- 1994Constructing the double exponential average from lag cancellation
- 1994Evaluating money supply as a linear leading-index baseline
- 1995Constructing least-squares trend channels
- 1995Linear baseline holdout checks for annual bill-rate forecasts
- 1995Projection bands from high and low regression slopes
- 1995Evaluating a least-squares end-point moving average on a known test series
- 1996Constructing an endpoint moving average from a least-squares line
- 1996Scoring equity path consistency with a k-ratio overlay
- 1996Evaluating month-end yield gaps for equity regimes
- 1996Constructing session-indexed standard error bands
- 1998Evaluating linear regression baselines for index valuation
- 1998R-squared as a two-state trend filter from a price-time fit
- 2000Second-order moving-average lag correction
- 2002Price regression line versus beta for index tracking
- 2003Regression slope with an r-squared trend confidence gate
- 2003Constructing finite-volume-element divergence with slope comparison
- 2004Building a daily score from regression, retracement, and volume
- 2004Constructing least-squares trendlines from ordered prices
- 2007Rectangle breakout targets beyond height
- 2007Confirming a price trend with regression slope and r-squared
- 2008A linear-regression angle assembled as one trend filter
- 2010A two-state swing machine from four running extremes
- 2016Score oil-complex tightness before divergence or regression
- 2017Nikkei-yen intermarket divergence as a regime case study
- 2017Constructing Calmar ratio and linear regression baselines
- 2019Pair-trade layer construction versus average-spread management
- 2020A convolution slope built from nested linear regression