  The ability to identify stock market trends has obvious advantages for
investors. Buying stock on an upward trend (as well as selling it in case of
downward movement) results in profit. Accordingly, the start and end-points of
the trend are the optimal points for entering and leaving the market. The
research concentrates on recognizing stock market long-term upward and downward
trends. The key results are obtained with the use of gradient boosting
algorithms, XGBoost in particular. The raw data is represented by time series
with basic stock market quotes with periods labelled by experts as Trend or
Flat. The features are then obtained via various data transformations, aiming
to catch implicit factors resulting in a change of stock direction. Modelling
is done in two stages: stage one aims to detect endpoints of tendencies (i.e.
sliding windows), stage two recognizes the tendency itself inside the window.
The research addresses such issues as imbalanced datasets and contradicting
labels, as well as the need for specific quality metrics to keep up with
practical applicability. The model can be used to design an investment strategy
though further research in feature engineering and fine calibration is
required.This paper is the full text of the research, presented at the 20th
International Conference on Artificial Intelligence and Soft Computing Web
System (ICAISC 2021)
