Skip to content
All library documents

KNN Trend Prediction with Historical Neighbors and Smoothed Signals

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses K-nearest neighbors to classify the current market state from similar historical observations. Users can choose a price-derived input, such as HL2, VWAP, or a moving average, and a target such as price action or volatility. The directions of the selected neighbors determine a bullish or bearish prediction, which is then smoothed with a moving average before signals are generated. The source also describes entering on classifier-line turns and reversing or closing positions on an opposite turn.

The document provides a method outline, configurable inputs, and published backtest settings for BTC/USDT futures, but reports no performance results or validation procedure. Its account of the neighbor comparison and labeling is high level, so key implementation details cannot be assessed from the description. It notes dependence on representative historical data and parameter choices, with added risk during abrupt regime changes; smoothing may also delay signals.

Key ideas

  • The strategy compares the current market input with historical observations to identify nearby cases.
  • Neighbor trend directions are combined to form a bullish or bearish prediction.
  • A moving average smooths the prediction before trading signals are acted on.
  • Results may be unreliable when history is unrepresentative or parameters are poorly chosen.
  • The published material supplies backtest settings but no performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.