Skip to main content
Track Historical analog comparison
10 / 19
Library

2001issue C111-5

Nearest-neighbor one-week forecast from log-price patterns

A four-lag pattern in weekly log-changes can be ranked by absolute distance so the later paths of the closest historical analogs become a one-week outlook.

  • A nearest-neighbor forecast can be assembled from ordered weekly closes by defining a four-point pattern, ranking past weeks by similarity, and reading the later path of the closest matches.
  • The pattern uses weekly differences of the natural log of the close at lags of one, two, four, and five weeks, and similarity is the sum of absolute differences on those four moves.
  • A one-week outlook can be the average of the four subsequent weekly log-changes that followed the nearest historical matches.
  • Averaging several neighbors, and optionally giving closer analogs more normalized weight, is presented as a way to keep one noisy lag from dominating the pattern.
Entries in this reading2 entries

A four-point analog from weekly closes

A nearest-neighbor forecast can be assembled from ordered weekly closes by defining a four-point pattern, ranking past weeks by similarity, and reading the subsequent path of the closest matches.

The reconstructed pattern uses weekly differences of the natural log of the close at lags of one, two, four, and five weeks.

How similarity becomes a one-week outlook

Similarity is the sum of absolute differences between those four log-moves and the same four moves on the current reference week.

A one-week outlook can be taken as the average of the four subsequent weekly log-changes that followed the nearest historical matches.

Weekly S&P 500 closes in the analog window

From 21 July to 15 December 2000 the weekly S&P 500 climbs to 1520.8 on 1 September and then slides to 1312.2 on 15 December, the reference week whose four log-change lags are matched to history. These are the exact closes from the article’s nearest-neighbor spreadsheet, not a redrawn price chart.
From 21 July to 15 December 2000 the weekly S&P 500 climbs to 1520.8 on 1 September and then slides to 1312.2 on 15 December, the reference week whose four log-change lags are matched to history. These are the exact closes from the article’s nearest-neighbor spreadsheet, not a redrawn price chart.S&P 500 · Weekly · 2000-07-21T00:00:00.000Z to 2000-12-15T00:00:00.000Z

The sheet is stored newest-first; the series here is chronological. Only the last 22 weekly rows are visible. The full worksheet in the article runs from 5 January 1980 to 15 December 2000.

Global screens and local lags

Independence and conditional-entropy checks can hint at how much memory a series holds, but they remain global screens. Pattern lags may still need trial-and-error for a local predictor.

Neighbor pool and weighting

Because only older observations than the reference week can serve as analogs, a longer backtest shrinks the usable neighbor pool as the reference date moves backward.

Averaging several neighbors and using absolute distance rather than a single closest match is presented as a way to keep one noisy lag from dominating the pattern.

Closer analogs can be given more weight than distant ones if the weights are normalized, instead of treating the four nearest matches as equal.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
10 of 19 in the Historical analog comparison track
20011-2 pp.Next on Historical analog comparisonConstructing nearest-neighbor forecasts gated by a trend filterA nearest-neighbor forecast estimates the current pattern’s next move by averaging the subsequent moves of historically similar neighbors.
All readings on this track · 19 readings
  1. 1988Crash fear fails the depression regime test
  2. 1990October 1987 cycle overlay and the loss-trap
  3. 1990Constructing nested four-year market cycles
  4. 1991Evaluating quarterly return runs with historical analogs
  5. 1992Evaluating split events across correction and bear regimes
  6. 1993Mining-bullion relative strength as a gold-sleeve regime
  7. 1994A two-horizon case study of a market-breadth oscillator
  8. 1994Extreme short-rate declines as equity regime context
  9. 1997Clustered true-range days as a regime label rather than a top forecast
  10. 2001Nearest-neighbor one-week forecast from log-price patterns
  11. 2001Constructing nearest-neighbor forecasts gated by a trend filter
  12. 2003Regime context for debt-era bear rallies
  13. 2004Testing a 1987 stock and gold analog by wave degree
  14. 2004Shifting calendar regimes and election-cycle analogs
  15. 2006Aligning sugar boom phases with seasonal analogs
  16. 2009Crowd consensus and failed targets as regime context
  17. 2011Treat a long-horizon chart analog as a regime scenario
  18. 2012Build a weekly analog as a dated forecast object
  19. 2015From a drawn price shape to an event-cloud case study
All 19 readings tagged Historical analog comparison
Also on Historical analog comparison5 readings