Forecasting economic indicators using the LSTM model
Abstract
Relevance. Forecasting economic indicators, particularly oil prices, is critically important for various industries such as energy, finance, manufacturing, transportation, and government policy. Accurate forecasts facilitate informed decision-making and resource optimization. In conditions of high oil price volatility, traditional forecasting methods like ARIMA often do not provide sufficient accuracy, making the use of modern methods such as LSTM necessary.
Objective. The objective of the study is to develop a model for forecasting Brent crude oil prices using the LSTM model and to compare its accuracy with traditional methods, including ARIMA.
Research methods. Two main time series forecasting methods, ARIMA and LSTM, were used in this study. Exploratory data analysis, data preparation, model building, model tuning, and evaluation using MSE, MAE, and RMSE metrics were conducted. Brent crude oil price data was processed and normalized before being fed into the models.
Results. The LSTM model demonstrated significantly higher forecasting accuracy compared to ARIMA. The metrics for LSTM (MSE = 0.003, MAE = 0.055, RMSE = 0.055) significantly outperform the corresponding values for ARIMA (MSE = 12.59, MAE = 2.84, RMSE = 3.55). LSTM better handles nonlinear dependencies and data volatility, making it an optimal choice for long-term forecasting.
Conclusions. The use of LSTM for forecasting economic indicators, particularly oil prices, is more effective compared to traditional methods. The model demonstrates the ability to accurately model complex dependencies and adapt to market volatility, making it a reliable tool for forecasting in modern conditions.
Downloads
References
/References
Box, G. E., Jenkins, G. M., & Reinsel, G. C. (2015). Time Series Analysis: Forecasting and Control (5th ed.). Wiley. https://doi.org/10.1002/9781118619193 (дата звернення 12.10.2024)
Dozdar Mahdi Ahmed, Masoud Muhammed Hassan and Ramadhan J. Mstafa (2022). A Review on Deep Sequential Models for Forecasting Time Series Data. https://doi.org/10.1155/2022/6596397 (дата звернення 12.10.2024)
Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735-1780. https://doi.org/10.1162/neco.1997.9.8.1735 (дата звернення 12.10.2024)
Bouktif, S., Fiaz, A., Ouni, A., & Serhani, M. A. (2018). Optimal deep learning LSTM model for electric load forecasting using feature selection and genetic algorithm: Comparison with machine learning approaches. Energies, 11(7), 1636. https://doi.org/10.3390/en11071636 (дата звернення 12.10.2024)
Nelson, D. M., Pereira, A. C. M., & de Oliveira, R. A. (2017). Stock market’s price movement prediction with LSTM neural networks. Proceedings of the International Joint Conference on Neural Networks (IJCNN), 1419-1426. https://doi.org/10.1109/IJCNN.2017.7966019 (дата звернення 12.10.2024)
Shahid, F., Zameer, A., & Muneeb, M. (2020). Predictions for COVID-19 with deep learning models of LSTM, GRU and Bi-LSTM using sequential and statistical data. Chaos, Solitons & Fractals, 140, 110212. https://doi.org/10.1016/j.chaos.2020.110212 (дата звернення 12.10.2024)
Zhang, G. P. (2003). Time series forecasting using a hybrid ARIMA and neural network model. Neurocomputing, 50, 159-175. https://doi.org/10.1016/S0925-2312(01)00702-0 (дата звернення 12.10.2024)
Makridakis, S., Spiliotis, E., & Assimakopoulos, V. (2018). Statistical and Machine Learning forecasting methods: Concerns and ways forward. PLoS ONE, 13(3), e0194889. https://doi.org/10.1371/journal.pone.0194889 (дата звернення 12.10.2024)
Smyl, S. (2020). A hybrid method of exponential smoothing and recurrent neural networks for time series forecasting. International Journal of Forecasting, 36(1), 75-85. https://doi.org/10.1016/j.ijforecast.2019.03.017 (дата звернення 12.10.2024)
Lawrence, M. J., Goodwin, P., O’Connor, M., & Önkal, D. (2006). Judgmental forecasting: A review of progress over the last 25 years. International Journal of Forecasting, 22(3), 493-518. https://doi.org/10.1016/j.ijforecast.2006.03.007 (дата звернення 12.10.2024)
Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: Principles and Practice (2nd ed.). OTexts. https://otexts.com/fpp3/ (дата звернення 12.10.2024)
Siami-Namini, S., Tavakoli, N., & Siami Namin, A. (2019). A comparison of ARIMA and LSTM in forecasting time series. IEEE International Conference on Machine Learning and Applications (ICMLA), 1394-1401. https://doi.org/10.1109/ICMLA.2018.00227 (дата звернення 12.10.2024)
Gers, F. A., Schmidhuber, J., & Cummins, F. (2000). Learning to forget: Continual prediction with LSTM. Neural Computation, 12(10), 2451-2471. https://doi.org/10.1162/089976600300015015 (дата звернення 12.10.2024)
Zhou, Z. H. (2012). Ensemble methods: Foundations and algorithms. Chapman and Hall/CRC. https://doi.org/10.1201/b12207 (дата звернення 12.10.2024)
Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, 27(3), 1-22. https://doi.org/10.18637/jss.v027.i03 (дата звернення 12.10.2024)
Box, G. E., Jenkins, G. M., & Reinsel, G. C. (2015). Time Series Analysis: Forecasting and Control (5th ed.). Wiley. https://doi.org/10.1002/9781118619193 (дата звернення 12.10.2024)
Dozdar Mahdi Ahmed, Masoud Muhammed Hassan and Ramadhan J. Mstafa (2022). A Review on Deep Sequential Models for Forecasting Time Series Data. https://doi.org/10.1155/2022/6596397 (дата звернення 12.10.2024)
Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735-1780. https://doi.org/10.1162/neco.1997.9.8.1735 (дата звернення 12.10.2024)
Bouktif, S., Fiaz, A., Ouni, A., & Serhani, M. A. (2018). Optimal deep learning LSTM model for electric load forecasting using feature selection and genetic algorithm: Comparison with machine learning approaches. Energies, 11(7), 1636. https://doi.org/10.3390/en11071636 (дата звернення 12.10.2024)
Nelson, D. M., Pereira, A. C. M., & de Oliveira, R. A. (2017). Stock market’s price movement prediction with LSTM neural networks. Proceedings of the International Joint Conference on Neural Networks (IJCNN), 1419-1426. https://doi.org/10.1109/IJCNN.2017.7966019 (дата звернення 12.10.2024)
Shahid, F., Zameer, A., & Muneeb, M. (2020). Predictions for COVID-19 with deep learning models of LSTM, GRU and Bi-LSTM using sequential and statistical data. Chaos, Solitons & Fractals, 140, 110212. https://doi.org/10.1016/j.chaos.2020.110212 (дата звернення 12.10.2024)
Zhang, G. P. (2003). Time series forecasting using a hybrid ARIMA and neural network model. Neurocomputing, 50, 159-175. https://doi.org/10.1016/S0925-2312(01)00702-0 (дата звернення 12.10.2024)
Makridakis, S., Spiliotis, E., & Assimakopoulos, V. (2018). Statistical and Machine Learning forecasting methods: Concerns and ways forward. PLoS ONE, 13(3), e0194889. https://doi.org/10.1371/journal.pone.0194889 (дата звернення 12.10.2024)
Smyl, S. (2020). A hybrid method of exponential smoothing and recurrent neural networks for time series forecasting. International Journal of Forecasting, 36(1), 75-85. https://doi.org/10.1016/j.ijforecast.2019.03.017 (дата звернення 12.10.2024)
Lawrence, M. J., Goodwin, P., O’Connor, M., & Önkal, D. (2006). Judgmental forecasting: A review of progress over the last 25 years. International Journal of Forecasting, 22(3), 493-518. https://doi.org/10.1016/j.ijforecast.2006.03.007 (дата звернення 12.10.2024)
Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: Principles and Practice (2nd ed.). OTexts. https://otexts.com/fpp3/ (дата звернення 12.10.2024)
Siami-Namini, S., Tavakoli, N., & Siami Namin, A. (2019). A comparison of ARIMA and LSTM in forecasting time series. IEEE International Conference on Machine Learning and Applications (ICMLA), 1394-1401. https://doi.org/10.1109/ICMLA.2018.00227 (дата звернення 12.10.2024)
Gers, F. A., Schmidhuber, J., & Cummins, F. (2000). Learning to forget: Continual prediction with LSTM. Neural Computation, 12(10), 2451-2471. https://doi.org/10.1162/089976600300015015 (дата звернення 12.10.2024)
Zhou, Z. H. (2012). Ensemble methods: Foundations and algorithms. Chapman and Hall/CRC. https://doi.org/10.1201/b12207 (дата звернення 12.10.2024)
Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, 27(3), 1-22. https://doi.org/10.18637/jss.v027.i03 (дата звернення 12.10.2024)