Document Type : Research Paper

Authors

1 Allameh Tabataba'i University, Faculty of Economics

2 allemeh Tabataba'i University, Associate professor

10.22054/jiee.2025.82899.2120

Abstract

This study investigates the application of recurrent neural network (RNN) models—specifically RNN, long short-term memory (LSTM), and gated recurrent unit (GRU)—in predicting the stock indices of the Iranian energy industry. Using daily time series data from May 1, 2020, to May 1, 2024, the dataset was divided into a training period (80%) and a testing period (20%). In the first step, the optimal architectures of each model (estimating hyper-parameters) were determined for prediction horizons of 1, 2, 5 (one week), and 20 trading days (one month). Subsequently, prediction errors of the three machine learning models were compared with the linear econometric model (ARIMA) across various forecast horizons. The findings in two areas of cross validations of machine learning models as well as predication error reveal the following insights: First, as the forecast horizon increases, the batch size of optimal prediction decreases for all three machine learning models, and the larger the input training sample size leads to the smaller batch size. Second, in short-term forecast horizons (1, 2, and 5 trading days), machine learning models—particularly LSTM—demonstrate lower prediction errors than ARIMA, while in the 20-trading-day (1-month) forecast horizon, ARIMA's predictive accuracy approaches to the nonlinear machine learning models. Third, forecast accuracy decreases as the horizon lengthens, with accuracy dropping from approximately 98.5% (for a 1-day horizon) to 92.5% (for a 20-day horizon). Finally, selecting the appropriate forecasting method for the stock market indices of energy industries depends on the forecast horizon and data characteristics.

Keywords

Main Subjects