A Comparison of Time Series and Deep Learning Methods for Predicting Stock Prices

Thumbnail Image

Date

2023-03-23

Journal Title

Journal ISSN

Volume Title

Publisher

Saudi Digital Library

Abstract

Stock market is one of the most competitive financial markets where investors need to know the trend of prices in advance. There have been many improvements and advancements in the application of neural networks in the financial industry. In this research, two advanced methods were used to simulate and predict the close stock prices of Saudi Telecom Company (STC). The first method was the autoregressive integrated moving average (ARIMA) and the second method was a by using a class of deep learning neural networks called recurrent neural networks (RNN). ARIMA (p,d,q) was the statistical method selected as a time series model based on the level, trend ,and seasonality of data. Additionally, the order of p and q is based on an autocorrelation function ‘ACF’ ,and a partial autocorrelation function ‘PACF’, the optimal model of this research was ARIMA (1,0,28). Moreover, RNN uses long short-term memory layers (LSTMs), dropout regularisation, activation functions, a loss function, which is the mean square error (MSE), and the Adam optimiser to simulate the predictions. The unique characteristic of LSTMs is that the model is able to store previous data over time and use this data to predict future prices. The structure of the LSTM consists of five layers: one input layer, three hidden layers ,and one output layer. The methods used to measure the performance of predictions of each model are the mean absolute percentage error ‘MAPE’ and the root squared mean error ‘RMSE’. ARIMA (1,0,28) is the model that was found to have a lower error between actual and predicted prices. After analysing each model, ARIMA model’s prediction accuracy was 96.3% and RNN’s accuracy was 93.8%; we concluded that the ARIMA model is better than the RNN model for forecasting the close stock prices of STC. This research include important data which can benefit investors and companies to make economical decisions, such as when to buy or sell shares.

Description

Keywords

Time series analysis, ARIMA model, Deep learning, Neural networks, LSTM, Forecasting stock prices

Citation

Endorsement

Review

Supplemented By

Referenced By

Copyright owned by the Saudi Digital Library (SDL) © 2025