Cover Image

Crude Oil Price Forecasting Using Long Short-Term Memory

Muhamad Fariz Maulana, Siti Sa’adah, Prasti Eko Yunanto


Crude oil has an important role in the financial indicators of global markets and economies. The price of crude oil influences the income of a country, both directly and indirectly. This includes affecting the prices of basic needs, transportation, commodities, and many more. Therefore, understanding the future price of crude oil is essential in helping to budgeting and planning for a better economy. The contribution of this research is in finding the best hyperparameters and using early stopping methods in the LSTM model to predict oil prices. This research implemented Long Short-Term Memory (LSTM), an artificial neural network that can handle long-term dependencies and the problems of time series data. The LSTM method will be used to predict Brent oil prices on daily and weekly time frames. The experiment has been conducted by tuning some parameters to obtain the best result. From the daily time frame experiment, the model obtained RMSE and MAE of 1.27055 and 0.92827, respectively, while the weekly time frame has RMSE and MAE of 3.37817 and 2.60603, respectively. The results show that the LSTM model can improve to the trends that occur in the original data.


Brent Oil; Forecasting; LSTM; MAE; RMSE

Full Text:



M. I. Haque, “Oil price shocks and energy consumption in GCC countries: a system-GMM approach,†Environ. Dev. Sustain., vol. 23, no. 6, pp. 9336–9351, 2021.

Y. Chen, R. Inglesi-Lotz, and T. Chang, “Revisiting the asymmetric causal link between energy consumption and output in China: Focus on coal and oil consumption,†Energy Sources, Part B Econ. Plan. Policy, vol. 12, no. 11, pp. 992–1000, 2017.

Y. Sun, M. Sun, and X. Tang, “Influence Analysis of Renewable Energy on Crude Oil Future Market,†2019 3rd IEEE Int. Conf. Green Energy Appl. ICGEA 2019, pp. 167–171, 2019.

R. Cherif, F. Hasanov, and A. Pande, “Riding the Energy Transition: Oil beyond 2040,†Asian Econ. Policy Rev., vol. 16, no. 1, pp. 117–137, 2021.

S. A. Basher, A. A. Haug, and P. Sadorsky, “The impact of oil-market shocks on stock returns in major oil-exporting countries,†J. Int. Money Financ., vol. 86, pp. 264–280, 2018.

S. Singhal, S. Choudhary, and P. C. Biswal, “Return and volatility linkages among International crude oil price, gold price, exchange rate and stock markets: Evidence from Mexico,†Resour. Policy, vol. 60, pp. 255–261, 2019.

L. Charfeddine and K. Barkat, “Short- and long-run asymmetric effect of oil prices and oil and gas revenues on the real GDP and economic diversification in oil-dependent economy,†Energy Econ., vol. 86, p. 104680, 2020.

Z. Ftiti, K. Guesmi, F. Teulon, and S. Chouachi, “Relationship between crude oil prices and economic growth in selected OPEC countries,†J. Appl. Bus. Res., vol. 32, no. 1, pp. 11–22, 2016.

F. Taghizadeh-Hesary, N. Yoshino, E. Rasoulinezhad, and Y. Chang, “Trade linkages and transmission of oil price fluctuations,†Energy Policy, vol. 133, no. August 2018, p. 110872, 2019.

J. Peng, Z. Li, and B. M. Drakeford, “Dynamic characteristics of crude oil price fluctuation-from the perspective of crude oil price influence mechanism,†Energies, vol. 13, no. 17, 2020.

L. A. Gil-Alana and M. Monge, “Crude Oil Prices and COVID-19: Persistence of the Shock,†Energy Res. Lett., vol. 1, pp. 19–22, 2020.

S. Sa’adah and M. S. Wibowo, “Prediction of Gross Domestic Product (GDP) in Indonesia Using Deep Learning Algorithm,†2020 3rd Int. Semin. Res. Inf. Technol. Intell. Syst. ISRITI 2020, no. 1, pp. 32–36, 2020.

O. B. Sezer, M. U. Gudelek, and A. M. Ozbayoglu, “Financial time series forecasting with deep learning: A systematic literature review: 2005–2019,†Appl. Soft Comput. J., vol. 90, p. 106181, 2020.

H. Salvi, A. Shah, M. Mehta, and S. Correia, “Long Short-Term Model for Brent Oil Price Forecasting,†Int. J. Res. Appl. Sci. Eng. Technol., vol. 7, no. 11, pp. 315–319, 2019.

A. Ghosh, S. Bose, G. Maji, N. C. Debnath, and S. Sen, “Stock price prediction using lstm on indian share market,†Epic Ser. Comput., vol. 63, pp. 101–110, 2019.

S. Siami-Namini, N. Tavakoli, and A. Siami Namin, “A Comparison of ARIMA and LSTM in Forecasting Time Series,†Proc. - 17th IEEE Int. Conf. Mach. Learn. Appl. ICMLA 2018, pp. 1394–1401, 2019.

X. Song et al., “Time-series well performance prediction based on Long Short-Term Memory (LSTM) neural network model,†J. Pet. Sci. Eng., vol. 186, p. 106682, 2020.

A. Sherstinsky, “Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) network,†Phys. D Nonlinear Phenom., vol. 404, no. March, pp. 1–43, 2020.

S. Zhelev and D. R. Avresky, “Using LSTM Neural Network for Time Series Predictions in Financial Markets,†2019 IEEE 18th Int. Symp. Netw. Comput. Appl. NCA 2019, pp. 1–5, 2019.

J. M. Navarro, R. Martínez-España, A. Bueno-Crespo, R. Martínez, and J. M. Cecilia, “Sound levels forecasting in an acoustic sensor network using a deep neural network,†Sensors (Switzerland), vol. 20, no. 3, pp. 1–16, 2020.

A. Sagheer and M. Kotb, “Time series forecasting of petroleum production using deep LSTM recurrent networks,†Neurocomputing, vol. 323, pp. 203–213, 2019.

K. Greff, R. K. Srivastava, J. Koutník, B. R. Steunebrink and J. Schmidhuber, "LSTM: A Search Space Odyssey," in IEEE Transactions on Neural Networks and Learning Systems, vol. 28, no. 10, pp. 2222-2232, Oct. 2017.

S. Alhagry, A. Aly, and R. A., “Emotion Recognition based on EEG using LSTM Recurrent Neural Network,†Int. J. Adv. Comput. Sci. Appl., vol. 8, no. 10, pp. 8–11, 2017.

Jiang Q., Tang C., Chen C., Wang X., Huang Q., “Stock Price Forecast Based on LSTM Neural Network. †In Xu J., Cooke F., Gen M., Ahmed S. (eds) Proceedings of the Twelfth International Conference on Management Science and Engineering Management. ICMSEM 2018. Lecture Notes on Multidisciplinary Industrial Engineering. Springer, Cham.

R. Dey and F. M. Salemt, “Gate-variants of Gated Recurrent Unit (GRU) neural networks,†Midwest Symp. Circuits Syst., vol. 2017-Augus, no. 2, pp. 1597–1600, 2017.

S. Selvin, R. Vinayakumar, E. A. Gopalakrishnan, V. K. Menon, and K. P. Soman, “Stock price prediction using LSTM, RNN and CNN-sliding window model,†2017 Int. Conf. Adv. Comput. Commun. Informatics, ICACCI 2017, vol. 2017-Janua, pp. 1643–1647, 2017.

N. Sakinah, M. Tahir, T. Badriyah, and I. Syarif, “LSTM with Adam Optimization-Powered High Accuracy Preeclampsia Classification,†IES 2019 - Int. Electron. Symp. Role Techno-Intelligence Creat. an Open Energy Syst. Towar. Energy Democr. Proc., pp. 314–319, 2019.

S. Ruder, “An overview of gradient descent optimization algorithms,†arXiv preprint, p. 1609.04747, 2016.

H. Yang, Z. Pan, and Q. Tao, “Robust and adaptive online time series prediction with long short-term memory,†Comput. Intell. Neurosci., vol. 2017, p. 9478952, 2017.

D. Singh and B. Singh, “Investigating the impact of data normalization on classification performance,†Appl. Soft Comput., vol. 97, Part B, p. 105524, 2020.

H. Haifa Zahrah, S. Sa’adah, and R. Rismala, “The Foreign Exchange Rate Prediction Using Long-Short Term Memory: A Case Study in COVID-19 Pandemicâ€, ijoict, vol. 6, no. 2, pp. 94-105, Jan. 2021.

R. Patil and S. Tamane, “A comparative analysis on the evaluation of classification algorithms in the prediction of diabetes,†Int. J. Electr. Comput. Eng., vol. 8, no. 5, pp. 3966–3975, 2018.



  • There are currently no refbacks.

Copyright (c) 2021 Muhamad Fariz Maulana

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

About the JournalJournal PoliciesAuthor Information

Jurnal Ilmiah Teknik Elektro Komputer dan Informatika
ISSN 2338-3070 (print) | 2338-3062 (online)
Organized by Electrical Engineering Department - Universitas Ahmad Dahlan
Published by Universitas Ahmad Dahlan
Email 1:
Email 2:
Office Address: Kantor Program Studi Teknik Elektro, Lantai 6 Sayap Barat, Kampus 4 UAD, Jl. Ringroad Selatan, Tamanan, Kec. Banguntapan, Bantul, Daerah Istimewa Yogyakarta 55191, Indonesia