The same conclusion can be drawn from the results
of the three error metrics. Based on the MAE, MSE,
and RMSE results for both models, it is evident that
the values of these three matrices for the ARIMA
model are lower than the LSTM model, which means
that the predicted accuracy of the ARIMA model in
this case is higher than the LSTM model. Therefore, it
is reasonable to conclude that, in the given context, the
ARIMA model outperforms the LSTM model in
predicting the stock price from the standpoint of the
predicted graphs and the assessment outcomes of
these two models.
Generally speaking, both the ARIMA model and
the LSTM model have benefits and drawbacks. The
ARIMA model offers simplicity and has a well-
defined structure. Only the parameters of the model
need to be estimated from the data. The drawback of
the ARIMA model is that the time series data needs to
be stable when used in the ARIMA model. If the data
is unstable, the ARIMA model may fail to capture the
underlying pattern and produce accurate predictions.
It is widely recognized that initial stock data are non-
stationary, necessitating certain preprocessing steps
for prediction. The LSTM model is an enhanced RNN
model that fixes issues with RNN while retaining the
majority of its characteristics. It is an ideal model for
dealing with issues that are highly correlated with time
series, like the stock prediction problem discussed in
this paper. Theoretically, by adjusting the number of
layers and several specific parameters in the LSTM
model, its predictive accuracy should be significantly
improved. However, one of the drawbacks is that the
LSTM model needs higher hardware requirements
when dealing with longer training time for running
predictions. It may take hours to run when processing
datasets over a long time span. The aforementioned
studies indicate that the lightweight LSTM model's
forecasting accuracy is actually less than that of the
ARIMA model. Additionally, these results suggest
that it is challenging to demonstrate the benefits of
LSTM in the typical network construction and
operating scenario (Wenjuan 2021).
5 CONCLUSION
This paper commences by outlining the theoretical
underpinnings of two widely used time-series models:
the ARIMA and LSTM models. Subsequently, this
paper, using the close prices of the S&P 500 stock
index in the recent 5 years as a dataset, basically states
the building process and the forecasting results of
these two models. Finally, the comparison between
the results of these two models suggests that although
in this situation the ARIMA model predicts better than
the LSTM model, both models have advantages and
disadvantages. Thus, it is important to notice that the
choice between the ARIMA and LSTM models for
stock price forecasting should be based on the specific
features of the data and the forecasting horizon. The
whole study using two of time-series models offers
guidance to investors and researchers seeking to make
informed decisions in the dynamic world of financial
markets. There are many more relative time-series
models that can be used to predict stock prices or stock
index prices, all of which warrant further investigation
and may prove beneficial for future stock price
predictions.
REFERENCES
G. Gaiwen and W. Shihan, "Stock price prediction based on
gray theory and ARIMA model," Journal of Henan
Institute of Education (Natural Science Edition), vol. 32,
no. 02, pp. 22-27, 2023.
J. Young, M. Kazel, and G. Scott, "Market Index:
Definition, How Indexing Works, Types, and
Examples," Investopedia, Jul. 23, 2023.
J. Wang, J.-Z. Wang, Z.-G. Zhang, and S.-P. Guo, "Stock
index forecasting based on a hybrid model," Omega,
vol. 40, no. 6, pp. 758-766, 2012.
W. Kenton, "Understanding S&P 500 Index – Standard &
Poor’s 500 Index," Investopedia, Mar. 23, 2021.
Tableau, "Time Series Forecasting: Definition,
Applications, and Examples," 2023/8/1, 2023/9/17,
https://www.tableau.com/learn/articles/time-series-
forecasting.
A. Garlapati, D. R. Krishna, K. Garlapati, N. m. Srikara
Yaswanth, U. Rahul and G. Narayanan, "Stock Price
Prediction Using Facebook Prophet and Arima Models,"
in 2021 6th International Conference for Convergence
in Technology (I2CT), Maharashtra, India, 2021, pp. 1-
7.
M. Ameri, "s&p500_daily_2018-05-07 to 2023-05-05,"
Kaggle, May 2023.
https://www.kaggle.com/datasets/mojtabaameri/s-and-
p500-daily-2018-05-07-to-2023-05-05.
A. A. Ariyo, A. O. Adewumi and C. K. Ayo, "Stock Price
Prediction Using the ARIMA Model," in 2014 UKSim-
AMSS 16th International Conference on Computer
Modelling and Simulation, Cambridge, UK, pp. 106-
112, 2014.
B. Guha and G. Bandyopadhyay, "Gold Price Forecasting
Using ARIMA Model," Journal of Advance
Management Journal, 2016.
C. Haowei, "A comparative study of models related to stock
price forecasting," Chongqing University, 2023.
Z. Hanqing, "Research on stock price prediction based on
long and short-term memory neural network," Chengdu
University of Technology, 2023.
Evaluating ARIMA and LSTM Approaches for Predicting S&P 500 Index Movements: A Comparative Analysis
449