Predicting the South African Stock Market Using the Hybrid of LSTM-ARFIMA Model
摘要
Stock price forecasting is a fundamental challenge for traders and investors who rely on historical price patterns for decision-making. In this study, we forecast the Financial Times Stock Exchange (FTSE) South Africa index from March 1, 2023, to May 3, 2025, based on three-time series models: Long Short-Term Memory (LSTM), Auto-Regressive Fractionally Integrated Moving Average (ARFIMA), and Auto-Regressive Integrated Moving Average (ARIMA) and the hybrid of LSTM-ARIMA. This study compares the performance of these models to identify the most accurate approach for forecasting the South African stock market. The models were evaluated based on percentage changes in historical daily price data of the FTSE South Africa index obtained from publicly available sources. The dataset was cleaned, normalized, and split into training (80%) and testing (20%) subsets. The LSTM model, which can capture long-term dependencies in time-series data, was implemented using TensorFlow and trained on normalized data. Traditional statistical models such as ARFIMA and ARIMA were also trained using the same dataset. Forecasting measures—Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE)—were utilized for model performance comparison. The results revealed that LSTM, and the hybrid of deep learning and traditional model was statistically much better than the ARFIMA and ARIMA models in prediction, overall lesser values of MAE and RMSE quantifying its superior performance in capturing the underlying trends of stock market data. The model exhibited more stability and handled sequential dependence and nonlinearity in stock market data. The findings demonstrate that the hybrid LSTM-ARFIMA model outperforms traditional time-series models (ARIMA and ARFIMA) in stock market forecasting, making it a valuable tool for future investment decisions.