Forecasting of time series using a neural network with parallel-stacked LSTM blocks
Yurii Futryk, Ivan PeleshchakTime series forecasting is crucial for supporting decisions in financial analytics, where data is characterised by non-linearity, non-stationarity, and high noise levels. The purpose of the study was to determine the effective configuration of a recurrent neural network with a parallel combination of Long Short-Term Memory (LSTM) cell stacks to improve the accuracy of stock price forecasting, and the possibilities of applying the back-end model in industry, energy, and related domains. The study applied deep learning methods using the TensorFlow/Keras library, and used historical data from Google shares to train the model. It was established that the architecture with parallel-stacked blocks provided higher learning stability compared to standard recurrent models due to more efficient allocation of technical features of the time sequence. It has been experimentally proven that the optimal number of neurons in the hidden layers for such a task was 100-200 units, while a further increase in the power of the model lead to a retraining effect. It was found that the use of dropout regularisation in the range of 0.1-0.2 minimised the error in the validation sample, while values over 0.3 significantly slowed down the convergence of the algorithm. Feature analysis showed that integrating an exponential moving average with a short time window improved the model result, showing a higher correlation with the target index than the relative strength index. The prediction quality of the model was evaluated by the Mean Squared error (MSE), the Root Mean Squared Error (RMSE), and the Mean Absolute Percentage Error (MAPE). It was found that configurations (50-100 blocks) were characterised by increased MAPE values, while in the range of 180-400 blocks the error decreased and became stable. The most accurate result was obtained for a configuration with 325 blocks, Dropout regularisation = 0.05 and Nadam optimiser (Nesterov-accelerated Adam): MAPE = 1.62%, RMSE = 2.41, MSE = 6.05. The practical significance of the study lied in the formulation of clear recommendations for setting up hyperparameters of LSTM models for applied short-term forecasting of financial series
References
- Abbasimehr, H., & Paki, R. (2022). Improving time series forecasting using LSTM and attention models. Journal of Ambient Intelligence and Humanized Computing, 13, 673-691. doi: 10.1007/s12652-020-02761-x.
- Chicco, D., Warrens, M.J., & Jurman, G. (2021). The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Computer Science, 7, article number e623. doi: 10.7717/peerj-cs.623.
- Draw.io. (n.d.). Retrieved from https://app.diagrams.net/.
- Ez-zaiym, M., Senhaji, Y., Rachid, M., El Moutaouakil, K., & Palade, V. (2025). Fractional optimizers for LSTM networks in financial time series forecasting. Mathematics, 13(13), article number 2068. doi: 10.3390/math13132068.
- Ghojogh, B., & Ghodsi, A. (2023). Recurrent neural networks and long short-term memory networks: Tutorial and survey. ArXiv. doi: 10.48550/arXiv.2304.11461.
- Gülmez, B. (2023). Stock price prediction with optimized deep LSTM network with artificial rabbits optimization algorithm. Expert Systems with Applications, 227, article number 120346. doi: 10.1016/j.eswa.2023.120346.
- Kabir, M.R., Bhadra, D., Ridoy, M., & Milanova, M. (2025). LSTM-transformer-based robust hybrid deep learning model for financial time series forecasting. Sci, 7(1), article number 7. doi: 10.3390/sci7010007.
- Koo, E., & Kim, G. (2022). A hybrid prediction model integrating GARCH models with a distribution manipulation strategy based on LSTM networks for stock market volatility. IEEE Access, 10, 34743-34754. doi: 10.1109/ACCESS.2022.3163723.
- Kurniawan, A., Indrabayu, & Yusuf, M. (2024). Stock price prediction using technical data and sentiment score. In 2024 IEEE international conference on Industry 4.0, artificial intelligence, and communications technology (IAICT) (pp. 360-366). Bali: IEEE. doi: 10.1109/IAICT62357.2024.10617768.
- Lim, B., Arık, S.O., Loeff, N., & Pfister, T. (2021). Temporal fusion transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting, 37(4), 1748-1764. doi: 10.1016/j.ijforecast.2021.03.012.
- Lindemann, B., Müller, T., Vietz, H., Jazdi, N., & Weyrich, M. (2021). A survey on long short-term memory networks for time series prediction. Procedia CIRP, 99, 650-655. doi: 10.1016/j.procir.2021.03.088.
- Livieris, I.E., Pintelas, E., & Pintelas, P. (2020). A CNN-LSTM model for gold price time-series forecasting. Neural Computing and Applications, 32, 17351-17360. doi: 10.1007/s00521-020-04867-x.
- Lytvyn, V., Peleshchak, I., Stepaniak, Y., Peleshchak, R., & Ishchuk, O. (2025). High-precision detection of GPS spoofing attacks on UAVs using MLP. International Journal of Computing, 24(2), 254-262. doi 10.47839/ijc.24.2.4008.
- Peleshchak, I., & Futryk, Y. (2025). Time series forecasting using sequentially connected LSTM blocks. Herald of Khmelnytskyi National University. Technical Sciences, 347(1), 432-441. doi: 10.31891/2307-5732-2025-347-59.
- Sezer, O.B., Gudelek, M.U., & Ozbayoglu, A.M. (2020). Financial time series forecasting with deep learning: A systematic literature review: 2005-2019. Applied Soft Computing, 90, article number 106181. doi: 10.1016/j.asoc.2020.106181.
- Smyl, S. (2020). A hybrid method of exponential smoothing and recurrent neural networks. International Journal of Forecasting, 36(1), 75-85. doi: 10.1016/j.ijforecast.2019.03.017.
- Wang, Q., & Zhang, Y. (2022). Research on PM2.5 pollution prediction method in hefei city based on CNN-LSTM hybrid model. Journal of Physics: Conference Series, 2400(1), article number 012006. doi: 10.1088/1742-6596/2400/1/012006.
- Widiputra, H., Mailangkay, A., & Gautama, E. (2021). Multivariate CNN-LSTM model for multiple parallel financial time-series prediction. Complexity. doi: 10.1155/2021/9903518.
- Wu, H., Xu J., Wang J., & Longet M. (2021). Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. ArXiv. doi: 10.48550/arXiv.2106.13008.
- Yahoo Finance. (n.d.). Dataset historical data: GOOG stock price. Retrieved from https://finance.yahoo.com/quote/GOOG/history/.
- Yamak, P.T., Yujian, L., & Gadosey, P.K. (2020). A comparison between ARIMA, LSTM, and GRU for Time Series Forecasting. In Proceedings of the 2019 2nd international conference on algorithms, computing and artificial intelligence (pp. 49-55). New York: ACM. doi: 10.1145/3377713.3377722.
- Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., & Zhang, W. (2021). Informer: Beyond efficient transformer for long sequence time-series forecasting. Proceedings of the AAAI Conference on Artificial Intelligence, 35(12), 11106-11115. doi: 10.1609/aaai.v35i12.17325.