519.2 Investigation of time series forecasting quality using C++ implementation of AT-LSTM model

Oblakova T. V. (Bauman Moscow State Technical University), Alekseev D. S. (Bauman Moscow State Technical University)

DEEP LEARNING, RECURRENT NEURAL NETWORK, AT-LSTM MODEL, LSTM MODEL, LONG SHORT-TERM MEMORY NEURAL NETWORKS, ATTENTION MECHANISM, TIME SERIES FORECASTING, AT-LSTM IMPLEMENTATION IN C++, FORECASTING QUALITY RESEARCH


doi: 10.18698/2309-3684-2025-1-8091


The implementation of recurrent neural network AT-LSTM (Attention based Long Short Term Memory) in C++ programming language is considered. This model was developed to reduce the training and inference times. The paper presents the architecture of this neural network and working examples, also describes the training procedure and results estimation. In the research work, calculations were carried out to estimate the performance of the AT-LSTM neural network for training and forward passes in comparison with the Python implementation. The performance analysis included the training time and the running time estimations of the neural network with the same length of input data but different values of hyperparameters. The calculations showed that it is possible to significantly decrease the training time, reduce the prediction error and maintain the high quality of the prediction results when using the C++ programming language implementation. In order to estimate the applicability of the considered AT-LSTM implementation in real cases, the precision of financial time series forecasting was analysed. USD/RUB and EUR/RUB currency rates, as well as Apple (AAPL) and Microsoft (MSFT) share prices were chosen as the objects of current research. The results showed that the obtained model is highly effective for time series forecasting and can be successfully applied in real cases. Finally, based on the experiments and analyses, it was concluded that the considered implementation of AT-LSTM in C++ allows for fast and high-quality training of the model for further time series forecasting.


[1] Makarenko A.V. Deep neural networks: origin, formation, current state. Management problems, 2020, no. 2, pp. 3–19.
[2] Labusov M.V. Neural networks of long short-term memory and their use for modeling financial time series. Innovations and investments, 2020, no. 3, pp. 167–171.
[3] Shiryaev A.N. Probabilistic and statistical models of the evolution of financial indices [Review of applied and industrial mathematics], Moscow, TVP, 1995, vol. 2, no. 4, pp. 527–555.
[4] Bulinsky A.V., Shiryaev A.N. Teoriya sluchajnyh processov [Theory of random processes]. Moscow, Fizmatlit Publ., 2005, 408 p.
[5] Shiryaev A.N. Osnovy stohasticheskoj finansovoj matematiki. Tom 1. Fakty. Modeli [Fundamentals of stochastic financial mathematics. Volume 1. Facts. Models]. Moscow, MCСME Publ., 2016, 440 p.
[6] Ekhlakov R.S., Sudakov V.A. Forecasting the cost of quotes using LSTM and GRU networks. Keldysh Institute PREPRINTS, 2022, no. 17, 13 p.
[7] Alzheev A.V., Kochkarov R.A. Comparative Analysis of ARIMA and lSTM Predictive Models: Evidence from Russian Stocks. Finance: Theory and Practice, 2020, 24(1), pp. 14–23.
[8] Oblakova T.V., Alekseev D.S. Comparative analysis of methods for modeling and forecasting time series based on the theory of fractal Brownian motion. Mathematical modeling and numerical methods, 2022, no. 4, p. 48–62.
[9] As'ad Mohamad, Sujito Sujito, Setyowibowo Sigit. Neural Network Autoregressive For Predicting Daily Gold Price. Jurnal INFORM, 2020, vol. 5, no. 69, 10.25139/inform.v0i1.2715.


Облакова Т.В., Алексеев Д.С. Исследование качества прогнозирования временных рядов с помощью реализации модели AT-LSTM на C++. Математическое моделирование и численные методы, 2025, № 1, с. 80–91.



Download article

Количество скачиваний: 368