Skip to content
All library documents

Adaptive Trend Scanning for Financial Machine Learning Labels

Article MQL5 articles

Summary

This article explains trend scanning as an alternative to assigning every market observation a fixed prediction horizon. For each starting point, it fits linear trends over a range of forward windows, calculates a t statistic for each, and selects the window with the largest absolute statistic. The statistic’s sign supplies the trend direction, while its magnitude represents evidence strength. The article also presents an optimized implementation using Numba and describes options such as volatility masking, log prices, and forward or backward scans. Its aim is to generate labels that adapt their horizon to changing market conditions.

The article compares trend scanning with fixed horizon and triple barrier labels and reports stronger risk adjusted figures for its filtered trend scanning strategy, including Sharpe and Sortino ratios of 2.62 and 4.25. It also notes that results depend on the evaluation framework and that filtering for higher confidence signals matters. These reported figures are not enough to assess general reliability: the excerpt does not give full details on data, costs, or out of sample testing. Readers should check for boundary handling and label leakage when implementing forward looking labels, and independently reproduce the evaluation.

Key ideas

  • Trend scanning tests multiple forward windows and selects the horizon with the largest absolute linear trend t statistic.
  • The sign of the selected statistic indicates direction, while its magnitude reflects the strength of statistical evidence.
  • The described optimized implementation uses Numba and supports volatility masking and different scan directions.
  • The article reports improved risk adjusted metrics for filtered trend scanning, but the excerpt does not provide enough evaluation detail to establish general performance.
  • Forward looking label construction requires careful boundary handling and leakage checks.

Tags

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