Comparison of commodity prices by using machine learning models in the COVID-19 era

Comparison of commodity prices by using machine learning models in the COVID-19 era

Commodity products such as gold, silver, and metal have been seen as safe havens in past economic crises. This situation increases the interest in commodity products. Due to the COVID-19 pandemic, quarantine decisions and precautions have caused an economic slowdown in stock markets and consumer activities. This inactivity in the economy has led to the COVID-19 recession that started in February 2020. Because of the increase in the number of COVID-19 cases, the difficulty of physical buying-selling transactions has shown that commodity products can be a safe investment tool. Based on the fact that machine learning approaches gained importance in commodity price prediction, the main goal of this study is to understand whether machine learning methods are meaningful for commodity price prediction even in extraordinary situations. To measure commodities’ price volatility, a data set obtained from Borsa İstanbul is separated into pre-COVID-19 and COVID-19 periods. Daily prices for gold and silver commodities, from July 2018, which is before the ongoing COVID-19 recession, to October 2021 are used. The performances of the machine learning models were compared with MAE, MAPE, and RMSE metrics. The findings of this study point out that the LSTM model has more accurate predictions, especially in the pre-COVID-19 period. When considering the COVID-19 period only, SVR produces the best prediction results for the gold commodity and LSTM has the best prediction results for the silver commodity.

___

  • Usha, B. A., Manjunath, T. N., & Mudunuri, T. (2019, March). Commodity and Forex trade automation using deep reinforcement learning. In 2019 1st International Conference on Advanced Technologies in Intelligent Control, Environment, Computing & Communication Engineering (ICATIECE) (pp. 27-31). IEEE.
  • Kamdem, J. S., Essomba, R. B., & Berinyuy, J. N. (2020). Deep learning models for forecasting and analyzing the implications of COVID-19 spread on some commodities markets volatilities. Chaos, Solitons & Fractals, 140, 110215.
  • Depren, Ö., Kartal, M. T., & Depren, S. K. (2021). Changes of gold prices in COVID-19 pandemic: Daily evidence from Turkey's monetary policy measures with selected determinants. Technological Forecasting and Social Change, 170, 120884.
  • Elgammal, M. M., Ahmed, W. M., & Alshami, A. (2021). Price and volatility spillovers between global equity, gold, and energy markets prior to and during the COVID-19 pandemic. Resources Policy, 74, 102334.
  • Jabeur, S. B., Khalfaoui, R., & Arfi, W. B. (2021). The effect of green energy, global environmental indexes, and stock markets in predicting oil price crashes: Evidence from explainable machine learning. Journal of Environmental Management, 298, 113511.
  • Ramakrishnan, S., Butt, S., Chohan, M. A., & Ahmad, H. (2017, July). Forecasting Malaysian exchange rate using machine learning techniques based on commodities prices. In 2017 International Conference on Research and Innovation in Information Systems (ICRIIS) (pp. 1-5). IEEE.
  • Akın, B., Dizbay, İ. E., Gümüşoğlu, Ş., & Güdücü, E. (2018). Forecasting the Direction of Agricultural Commodity Price Index through ANN, SVM and Decision Tree: Evidence from Raisin. Ege Academic Review, 18(4), 579-588.
  • Yadav, S., & Sharma, K. P. (2018, December). Statistical analysis and forecasting models for stock market. In 2018 First International Conference on Secure Cyber Computing and Communication (ICSCCC) (pp. 117-121). IEEE.
  • Štifanić, D., Musulin, J., Miočević, A., Baressi Šegota, S., Šubić, R., & Car, Z. (2020). Impact of COVID-19 on forecasting stock prices: an integration of stationary wavelet transform and bidirectional long short-term memory. Complexity, 2020.
  • Luo, J. (2020, December). Bitcoin price prediction in the time of COVID-19. In 2020 Management Science Informatization and Economic Innovation Development Conference (MSIEID) (pp. 243-247). IEEE.
  • Amin, M. N. (2020, December). Predicting Price of Daily Commodities using Machine Learning. In 2020 International Conference on Innovation and Intelligence for Informatics, Computing and Technologies (3ICT) (pp. 1-6). IEEE.
  • Ruan, J., Wu, W., & Luo, J. (2020, December). Stock Price Prediction Under Anomalous Circumstances. In 2020 IEEE International Conference on Big Data (Big Data) (pp. 4787-4794). IEEE.
  • Ghosh, I., Sanyal, M. K., & Jana, R. K. (2020, February). An ensemble of ensembles framework for predictive analytics of commodity market. In 2020 4th International Conference on Computational Intelligence and Networks (CINE) (pp. 1-6). IEEE.
  • Ly, R., Traore, F., & Dia, K. (2021). Forecasting commodity prices using long-short-term memory neural networks (Vol. 2000). Intl Food Policy Res Inst.
  • Mahdi, E., Leiva, V., Mara’Beh, S., & Martin-Barreiro, C. (2021). A new approach to predicting cryptocurrency returns based on the gold prices with support vector machines during the COVID-19 pandemic using sensor-related data. Sensors, 21(18), 6319.
  • Vora, C., Sheth, D., Shah, B., & Shah, N. B. (2021, June). Stock Price Analysis and Prediction. In 2021 International Conference on Communication information and Computing Technology (ICCICT) (pp. 1-7). IEEE.
  • Chandra, R., & He, Y. (2021). Bayesian neural networks for stock price forecasting before and during COVID-19 pandemic. Plos one, 16(7), e0253217.
  • Niu, H., & Zhao, Y. (2021). Crude oil prices and volatility prediction by a hybrid model based on kernel extreme learning machine. Mathematical Biosciences and Engineering, 18(6), 8096-8122.
  • Olubusoye, O. E., Akintande, O. J., Yaya, O. S., Ogbonna, A. E., & Adenikinju, A. F. (2021). Energy pricing during the COVID-19 pandemic: Predictive information-based uncertainty indexes with machine learning algorithm. Intelligent Systems with Applications, 12, 200050.
  • Garreta, R., & Moncecchi, G. (2013). Learning scikit-learn: machine learning in python. Packt Publishing Ltd.
  • Bressert, E. (2012). SciPy and NumPy: an overview for developers.
  • McKinney, W., (2011). Pandas: a foundational Python library for data analysis and statistics. Python for high performance and scientific computing, 14(9), 1-9.
  • Abadi, M., Barham, P., Chen, J., Chen, Z., Davis, A., Dean, J., ... & Zheng, X. (2016). TensorFlow: a system for Large-Scale machine learning. In 12th USENIX symposium on operating systems design and implementation (OSDI 16) (pp. 265-283).
  • Hansun, S. (2013, November). A new approach of moving average method in time series analysis. In 2013 conference on new media studies (CoNMedia) (pp. 1-4). IEEE.
  • Breiman, L. (2001). Random forests. Machine learning, 45(1), 5-32.
  • Géron, A. (2022). Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow. " O'Reilly Media, Inc.".
  • De Myttenaere, A., Golden, B., Le Grand, B., & Rossi, F. (2016). Mean absolute percentage error for regression models. Neurocomputing, 192, 38-48.
  • Sammut, C., & Webb, G. I. (2010). Mean absolute error. Encyclopedia of Machine Learning, 652.
  • Nevitt, J., & Hancock, G. R. (2000). Improving the root mean square error of approximation for nonnormal conditions in structural equation modeling. The Journal of experimental education, 68(3), 251-268.