0% found this document useful (0 votes)
14 views9 pages

ARIMA vs LSTM in Stock Prediction

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views9 pages

ARIMA vs LSTM in Stock Prediction

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Assessing the Predictive Capabilities of ARIMA

and Hybrid Models in Stock Market Analysis


Ramesh G1 , Souparnika U S2 , Malini K A3 ,Arav Hanshik4 , Shivadeep U S5 , Kiran Raj K M6
Department of Artificial Intelligence and Machine Learning
Alva’s Institute of Engineering and Technology
Moodbidri, Karnataka, India

Abstract—This study endeavors to advocate the utilization of portunities, the need for robust prediction models becomes
ARIMA, LSTM, and Linear Regression algorithms for predicting ever more pressing. [5] By harnessing the power of machine
stock prices of both NASDAQ (American) and NSE (Indian) learning, analysts aim to gain deeper insights into stock market
markets, aiming to assess their respective accuracies. These
machine learning techniques are applied to historical stock data behavior and anticipate future trends with greater precision. [6]
as well as real-time stock prices. Historical NASDAQ stock data The literature review presented in this paper provides a
was sourced from the Yahoo Finance API, while NSE stock data comprehensive overview of previous research endeavors in
was obtained from the Alpha Vantage API. The project was stock market prediction, showcasing the evolution of predictive
entirely developed in Python, with the complete source code made
techniques and methodologies over [Link] studies have
[Link] is hypothesized that for NASDAQ forecasts, ARIMA
and LSTM models demonstrate greater compatibility compared explored various techniques, from complex deep learning
to the Linear Regression model. Conversely, concerning NSE architectures like LSTM networks to conventional time series
stocks, LSTM and Linear Regression models exhibit superior analysis techniques like ARIMA. [7] These studies have
efficiency compared to [Link] research underscores the yielded valuable insights into the strengths and limitations of
significance of employing diverse machine learning algorithms in
different models, paving the way for further advancements in
stock market prediction, highlighting the variability in perfor-
mance across different markets and datasets. Additionally, the predictive analytics.
study underscores the practical application of these algorithms Furthermore, the paper highlights the significance of eval-
in both retrospective analysis and real-time prediction scenarios, uating model performance using appropriate metrics such
thereby contributing to a more comprehensive understanding of as mean absolute percentage error (MAPE) and root mean
their efficacy in financial forecasting.
square error (RMSE). By rigorously assessing the accuracy
Index Terms—Stock market prediction,Machine learning tech-
niques, LSTM , Hybrid models , Financial markets and reliability of prediction models, researchers can discern the
most effective strategies for forecasting stock market trends.
I. I NTRODUCTION In essence, this introduction sets the stage for an in-depth
study of machine learning methods for stock market forecast-
Accurately predicting stock market trends has long been a ing, highlighting the value of using cutting-edge analytical
sought-after skill of financial analysts and researchers, driven tools to negotiate the complexity of financial markets and
by the profound impact such predictions have on businesses’ empower informed decision-making. [8]
profitability and investors’ decisions. In recent years, amidst
the surge of big data and heightened market volatility [1], A. Motivation
the quest for precise stock market predictions has intensified,
prompting the adoption of advanced machine learning tech- eveloping a stock market prediction project utilizing
niques. ARIMA, LSTM, and Linear Regression algorithms offers
This paper delves into the realm of stock market prediction, a compelling opportunity to explore the efficacy of diverse
examining the efficacy of machine learning models in captur- forecasting methodologies. By leveraging these techniques,
ing the intricate dynamics of financial markets. [2] Specifi- we can gain valuable insights into market trends, enhance
cally, the focus lies on three prominent models: Long Short- decision-making processes, and potentially capitalize on prof-
Term Memory (LSTM) networks, neural networks (NN), and itable investment opportunities.
autoregressive Integrated Moving Average (ARIMA). [3]These
models have garnered significant attention for their potential B. Organization of the paper
to extract meaningful insights from vast datasets and improve Section I’s primary subjects are an overview of the project
forecast accuracy. and its algorithm. The literature is reviewed in Section II.
The motivation for this study stems from the increasing Section III addresses issues and its main objectives. While
reliance on data-driven decision-making processes in the fi- Section IV concentrates on methodology, Section V discusses
nancial sector. [4]As businesses strive to navigate through suggested approach. Section VII concludes with a summary of
turbulent market conditions and capitalize on emerging op- significant discoveries, a discussion of possible enhancements,
and an evaluation of the study’s worth. The experimental Recurrent Neural Network (RNN). The aim is to effectively
results are described in Section VI. capture the dynamic nature of the S & P 500 stock market data
using an accessible Application Programming Interface (API).
II. L ITERATURE R EVIEW Through an in-depth analysis of past stock market fluctuations,
A. Utilizing LSTM, ARIMA, and neural network models, fore- both upward (bull) and downward (bear) trends are studied.
cast stock prices. The Physics Journal The proposed LSTM-ARIMA hybrid model is tailored to
Ho, M., Darman, H., & Musa, S. (2021). Precisely fore- handle both Aspects of the time series data that are both
casting stock prices has been more important but also more linear and nonlinear. The study also makes use of Facebook’s
difficult in recent years for businesses looking to make the Prophet forecasting library, which is renowned for requiring
most profit. Since big data first emerged, financial analysts little preprocessing. The two methods are compared, with an
have turned to machine learning approaches to increase fore- emphasis on performance measures like Mean Square Error
cast accuracy. This article examines the prediction of Bursa (MSE) and Root Mean Square Error (RMSE). The findings
Malaysia’s stock closing prices using neural network (NN), show that the ARIMA-LSTM hybrid performs better than the
auto-regressive integrated moving average (ARIMA), and long Prophet model, which has a high RMSE of 27.59 and MSE of
short-term memory network (LSTM) models from 2/1/2020 761.33. Its MSE is 3.03, RMSE is 1.74, and its outstanding 99
to 19/1/2021. Evaluation metrics such as root mean square % model fit. Consequently, the hybrid model is selected as the
error (RMSE) and mean absolute percentage error (MAPE) preferred algorithm for implementation due to its significantly
are used to assess the performance of the model. The re- enhanced predictive accuracy compared to Prophet.
sults show that LSTM is remarkably accurate—it exceeds 90
percent—especially when predicting stock prices during the D. Predicting Stock Market Trends using High-Order Time
pandemic’s difficulties. Series Data

B. Review and Taxonomy of Prediction Techniques for Stock Wen, M., Li, P., Zhang, L.,& Chen, Y. (2019) et al. ,
Market Analysis. Recent research has begun to explore the potential of machine
learning techniques in extracting meaningful insights from
Shah, D., Isah, H., & Zulkernine, F. (2019). el at, Stock mar- financial time series data, such as the S&P 500 index,to
ket prediction has long captivated the interest of analysts and forecast changes in the market. However, precise forecasting
researchers. Conventional wisdom often characterizes stock is severely hampered by the stock market’s volatility and
markets as unpredictable, akin to a random walk. Despite non-stationary character. To address these complications, our
this perception, attempting to forecast stock prices remains paper provides a fresh technique in response. Using motifs
a daunting task due to the multitude of influencing variables. or recurring patterns found in the data, our approach starts
While short-term market behavior resembles a voting machine by using sequence reconstruction to streamline noisy financial
driven by sentiment, longer-term trends reflect fundamental time series data. The spatial structure of the time series is then
factors, offering potential for predictive analysis over extended captured using a convolutional neural network (CNN), which
periods. There is a lot of promise in the field of stock price improves our capacity to recognize pertinent characteristics
analysis when machine learning techniques and algorithms are for prediction. The results of our experiments suggest that
applied. This paper begins with a brief introduction to stock our proposed method is effective in feature learning, with 4%
markets and a classification of prediction techniques. It then - 7% accuracy improvement over deep learning models for
dives into significant research findings in the areas of technical, frequency trading patterns and other standard signal processing
fundamental, and temporal approaches to stock analysis and techniques. Through the use of CNNs and motifs, our method
prediction tailored to address different time horizons. Through provides a viable path.
a comprehensive review, the paper highlights advancements
in understanding and forecasting stock market behavior. It
E. Moving toward developing a hybrid stock index prediction
emphasizes the utility of diverse techniques, ranging from
model
technical indicators to fundamental analysis, in deciphering
market dynamics. Furthermore, it underscores the importance Creighton, J., & Zulkernine, F. (2017). et al, The use of
of identifying challenges and seizing research opportunities computer-generated models to forecast stock prices has been
in this field to enhance predictive accuracy and navigate the extensively studied and is a major area of research. New
complexities of financial markets. research problems are still presented by the global financial
market’s interconnectedness, the availability of big data in a
C. A Hybrid ARIMA-LSTM Model for Real-Time Stock Market variety of fields that impact the financial market, the need
Prediction for quick analytics, and the accessibility of information in
Sakshi, K., & Vijayalakshmi, A. (2020). et al, This paper real time. One of the challenges is the variety of ways we
introduces a novel approach to forecasting stock market trends try to define prediction parameters, such as the difference
by combining Using the conventional time series forecasting in the growth pattern of individual stocks or the duration of
technique of Auto Regressive Integrated Moving Average the projections. Due to the intricacy, there is a movement in
(ARIMA), Long Short-Term Memory (LSTM), a kind of this subject towards more sophisticated methods, such as the
study of creating hybrid models, which are made up of several III. P ROBLEM S TATEMENT A ND O BJECTIVES
prediction models.
• Evaluate the predictive accuracy: Compare the perfor-
mance of ARIMA, LSTM, and linear regression models
F. Application of LSTM, GRU and ICA for stock price pre- in terms of their ability to accurately forecast stock
diction. market trends and prices.
• Assess computational efficiency: Analyze the computa-
Hossain, M. A., Karim, R., Thulasiram, R. K., Bruce, N.
tional resources required by each model to make pre-
D. B., & Wang, Y. (2018). et al, Stock price prediction is
dictions, considering factors such as training time and
crucial for financial decision-making, yet traditional meth-
memory usage.
ods struggle with market volatility and non-linearity. This
• Understand model interpretability: Examine the inter-
paper proposes a hybrid deep learning model combining
pretability of predictions from each model to gain in-
Long Short-Term Memory (LSTM), Convolutional Neural
sights into the underlying factors driving stock market
Networks (CNNs), and attention mechanisms to address these
movements.
challenges. The model captures short-term dependencies and
• Explore robustness to different market conditions: Inves-
long-term patterns in stock price data, enhancing predic-
tigate how each model performs under various market
tive [Link] handles noise and missing values,
conditions, including periods of stability, volatility, and
while LSTM networks capture sequential dependencies. CNNs
trend reversals. [9]
extract spatial features, and attention mechanisms focus on rel-
• Investigate sensitivity to hyperparameters: Study how
evant inputs. Evaluation on historical data, including the S &P
changes in hyperparameters affect the performance of
500, shows superior performance over traditional methods and
ARIMA, LSTM, and linear regression models, and iden-
single neural networks. The hybrid model offers robustness
tify optimal parameter configurations for accurate predic-
in volatile markets, making it a valuable tool for stock price
tions.
prediction.
• Consider practical implementation considerations: Assess
the feasibility of implementing each model in real-world
G. Stock prediction using deep learning. Multimedia Tools stock market prediction scenarios, considering factors
and Applications such as data availability, model complexity, and scala-
bility. [10]
Singh, R., & Srivastava, S. (2016). et al, The stock market,
characterized by chaos, complexity, volatility, and dynamism,
presents one of the most formidable challenges in time series IV. P ROPOSED M ETHODOLOGY
forecasting. While existing Artificial Neural Network (ANN) A. ARIMA (Auto-Regressive Integrated Moving Average)
methods have struggled to yield promising outcomes, recent
advancements in machine learning have shown remarkable ARIMA, short for Auto-Regressive Integrated Moving Av-
success in fields like speech recognition, image classification, erage, emerges as a potent statistical technique extensively
and language processing. Drawing parallels between stock employed in the realm of time series prediction. This method
data and digital signal processing, both being time series, amalgamates In addition to differencing, the autoregressive
underscores the potential applicability of methods from the (AR) and moving average (MA) components to adeptly model
latter to the former. Moreover, the insights gleaned from this intricate data patterns. Its coreIts predictive power is mostly
study could be extrapolated to other time series data domains, determined by three parameters: p (autoregressive order), d
such as speech. This paper introduces deep learning as a (degree of differencing), and q (moving average order). [11]
novel approach to stock market prediction and evaluates its Expanding upon its acronym, ARIMA denotes Auto-
performance using multimedia data (charts) of Google stock Regressive Integrated Moving Average. Within the spectrum of
prices sourced from NASDAQ. The primary objective is to ARIMA models, there exist two primary variants: seasonal and
showcase how deep learning can enhance the accuracy of non-seasonal ARIMA. In the context of analyzing stock data,
stock market forecasting. To this end, the (2D)2PCA + Deep the non-seasonal ARIMA model typically finds precedence
Neural Network (DNN) methodology is compared against the due to the inherent characteristics of the dataset. [12]
state-of-the-art approach, (2D)2PCA + Radial Basis Function ARIMA models leverage historical data points to establish
Neural Network (RBFNN). The findings indicate that the correlations and forecast future values. The three principal
proposed method outperforms the existing RBFNN approach, parameters—p, d, and q—play distinct roles:
achieving an enhanced accuracy of 4.8 % for Hit Rate with a • p (Autoregressive order): This parameter delineates the
window size of 20. Furthermore, a comparison with Recurrent number of preceding observations considered in model
Neural Network (RNN) demonstrates a notable improvement computation. For instance, if p equals 4, the model
in accuracy for Hit Rate by 15.6%. Additionally, the correla- incorporates the preceding four observations, facilitating
tion coefficient between the actual and predicted returns for adjustment to the relevant lag.
DNN surpasses that of RBFNN by 17.1% and exceeds RNN • d (Degree of differencing): Differencing serves to ren-
by 43.4%. der time series data stationary by mitigating trends and
Algorithm 1 ARIMA Algorithm
Input:
Time-series data

Procedure:
1. Gather historical stock market data.
2. Clean the data, handle missing values, and ensure sta-
tionarity.
3. Determine ARIMA model parameters (p, d, q) using
autocorrelation and partial autocorrelation plots.
[Link] forecasts for future time steps using the trained
ARIMA model
[Link] the model’s performance using metrics like RMSE
or MAE..
[Link] the ARIMA model to the training data.
Output:
Forecast

B. Long Short-Term Memory (LSTM)


A particular kind of recurrent neural network (RNN) trained
by backpropagation is the Long Short-Term Memory (LSTM)
network, which is designed to solve the vanishing gradient
issue that conventional RNNs. LSTM networks possess their
own memory cells, making them adept at handling large-scale
Fig. 1. Block Diagram of the ARIMA RNN architectures and addressing time-specific scheduling
challenges. Unlike traditional neurons, the memory blocks in
LSTM networks are interconnected through recurrent layers,
enhancing their ability to retain and process sequential data.
seasonality. The parameter d signifies the count of differ- [15]
encing iterations required to achieve stationarity. LSTM blocks comprise numerous basic and a few intricate
• q (Moving average order): q denotes the magnitude components, endowing them with superior intelligence com-
of the moving average window, indicating the count of pared to standard neurons. These components include various
lagged forecast errors incorporated into the model. [11] gates that regulate the flow of information between input
and output functions. Upon receiving an input, a gate within
As shown in fig 1 ,The autoregressive facet of ARIMA the block is activated to make decisions regarding further
hinges on past data values, manifesting a direct reliance on processing.
preceding observations. Its application is warranted when au- In its simplest form, as shown in fig 2, a standard LSTM
tocorrelation function (ACF) plots exhibit a diminishing trend block consists of four primary components:
towards zero, lag-1 autocorrelation emerges as significant, and 1) Cell: The cell serves as a memory unit, retaining values
partial autocorrelation function (PACF) plots depict abrupt over arbitrary time intervals, thus enabling the network to
declines to zero. [13] capture long-term dependencies within sequential data.
2) Input Gate: This gate determines which information is
Conversely, the moving average component addresses
relevant to retain within the cell, allowing the LSTM network
stochastic fluctuations in data, aiming to elucidate and eluci-
to selectively process input data based on its significance.
date forecast inaccuracies. Its deployment is warranted when
3) Output Gate: Responsible for deciding The output gate
noticeable declines in ACF manifest after a few lag periods,
selects which portion of the cell state is to be output, enabling
the model displays adverse lags, and PACF trends exhibit
the network to produce relevant outputs based on the current
gradual descent.
input and internal state.
The combined element is invoked in scenarios where time 4) Forget Gate: The forget gate is essential for figuring out
series data exhibit periodic trends or seasonal variations. It what information is discarded from the cell memory, aiding
entails division and differencing of the data to effectively in the management of irrelevant or outdated data within the
address such patterns. ARIMA’s adaptability and efficacy network.
render it indispensable across diverse domains, encompassing Through the coordinated functioning of these components,
finance, economics, and epidemiology. [14] LSTM networks excel in modeling and predicting intricate
The following equation governs linear regression:

Y = β0 + β1 X1 + β2 X2 +
+ βn Xn + .....1
where the dependent variable is denoted by Y , the indepen-
dent variables by X1 , X2 , ..., Xn , the coefficients indicating
the direction and strength of the relationship between the
variables by β0 , β1 , ..., βn , and the error term accounting for
unexplained variability by ϵ. [17]
The goal of linear regression is to estimate the coefficients
(β) that reduce the total squared discrepancies between the
estimated and actual values. In order to reduce the total error,
a straight line must be fitted to the data points in this process.
Linear regression offers several advantages, including sim-
plicity, interpretability, and ease of implementation. It serves as
a foundational technique in various fields such as economics,
social sciences, and healthcare, enabling researchers to analyze
and predict outcomes based on input variables. [18]
Fig. 2. Understanding LSTM working
In the context of the current study, linear regression is
employed as one of the benchmark models for stock market
temporal dynamics in a number of disciplines, including prediction, alongside ARIMA and LSTM. Through compar-
as speech, natural language understanding, and time series ative analysis, the research aims to assess how well linear
forecasting recognition. Their ability to effectively capture and regression performs and whether it is appropriate for capturing
retain long-range dependencies makes them invaluable tools in the underlying patterns and movements of stock market data.
the realm of sequential data analysis and prediction. [16] [19]

Algorithm 2 LSTM Algorithm Algorithm 3 Linear Regression


Input: Input:
Sequences Features

Procedure: Procedure:
1. Gather historical stock market data. 1. Fit a linear regression model to historical stock market
2. Clean the data, handle missing values, and ensure data.
stationarity. 2. Clean the data, handle missing values, and ensure sta-
3. Create input sequences and labels. tionarity.
4. Design LSTM architecture, train, and tune 3. Use the trained model to predict future stock prices.
hyperparameters. [Link] the model’s accuracy and refine if necessary to
[Link] model performance. improve forecasting performance.
6. Utilize the trained LSTM model for forecasting.
Output:
Output: Predictions
Predictions

This version simplifies the steps while retaining the key V. DATA - S ET AND R ESOURCES
components of the LSTM process for stock market prediction. A. Data Analysis Stage - Dataset
This LaTeX code will generate a formatted list with each
step in bold, as described. Yahoo Finance offers a convenient API to fetch historical
stock values of any company based on its ticker symbol
C. Linear Regression programmatically. As shown in fig 3 ,This API allows users
A basic statistical technique for simulating the relationship to retrieve prices within a specified date range, facilitating the
between a dependent variable and one or more independent initial step in constructing a machine learning model: acquiring
variables is called linear regression. To enable the prediction of an optimal dataset. [20]
the target variable based on the input features, linear regression However, openly available financial data on the internet
seeks to create a linear relationship between the input variables often suffers from various discrepancies, including Unstruc-
and the target variable in the context of predictive modeling. tured formatting, duplicate rows, and missing values. Before
In regression, a curve is plotted on a graph representing the
variations in stock prices over time, with the date on the X-axis
and the closing price on the Y-axis. [23]
During the training and testing stages of the model devel-
opment process, several steps are undertaken:
1. Adjusting the label attribute’s values by the desired predic-
tion percentage.
2. Converting the dataframe format to the Numpy array format.
3. Removing all NaN (missing) data values before inputting
the data into the classifier.
4. Scaling the data to ensure uniformity.
5. Splitting the data into separate test and train datasets based
on their respective types (label and feature). [24]
By following these steps and utilizing appropriate pre-
processing techniques, the dataset is optimized for training
machine learning models, ultimately enhancing the accuracy
of stock price predictions.
B. Results
The stock market forecast model using a machine learn-
ing algorithm utilizing ARIMA, LSTM, and Linear Regres-
sion integrates the strengths of each technique to enhance
predictive accuracy and robustness. [25]Firstly, the ARIMA
model captures linear trends and seasonality in the stock
market data, providing a solid foundation for time series
[Link], to extract complex temporal patterns and
long-term dependencies from the data, LSTM, a kind of
recurrent neural network, is used. [26] Its gated mechanisms
facilitate selective information retention, enabling it to excel in
modeling complex sequential data. Finally, Linear Regression
complements these methods by providing interpretable insights
and capturing linear relationships between predictor variables
and stock prices. [27] By combining ARIMA’s statistical
rigor, LSTM’s temporal modeling capabilities, and Linear
Regression’s simplicity and interpretability, the hybrid model
offers a comprehensive approach to stock market prediction,
leveraging the diverse strengths of each technique to navigate
the complexities of financial markets and enhance prediction
accuracy. [28]
VI. R ESULTS AND A NALYSIS
A. Downloading and Viewing NASDAQ Data
Fig. 3. Basic Block Diagram of the System Fig 4 shows the Data pertaining to NASDAQ (an American
company) stock performance over the previous two years,
alongside real-time prices, is retrieved from the Yahoo Finance
entering the information into a model for machine learning, it API and visualized using Python. This process involves ac-
is essential to preprocess it to ensure accuracy in the model’s cessing historical stock data and dynamically updating current
predictions. [21] prices, offering users a comprehensive view of NASDAQ’s
Financial datasets typically comprise several attributes, with stock performance. Through Python’s capabilities, users can
the date of each stock price and the closing price being primary analyze trends, fluctuations, and make informed decisions
among them. While other attributes such as opening price, high based on real-time market data provided by the Yahoo Finance
and low prices, and volume of stocks traded are also important, API. This integration streamlines the process of accessing
the closing price is commonly favored as the key attribute for and interpreting financial information, facilitating efficient
model training. [22] decision-making for investors and analysts alike.
By utilizing regression models in machine learning, future In the the predicted closing price of AAPL for tomorrow,
stock prices can be predicted based on historical closing prices. generated by LSTM (Long Short-Term Memory) model, is
Fig. 4. Historic Stock Data for NASDAQ (AAPL) stock Fig. 7. The graph output using Linear Regression

Fig. 8. Tomorrow’s AAPL Closing Price Prediction by LSTM

included for analysis and visualization. This integration allows


researchers to observe the model’s forecast directly within
their workflow, enhancing accessibility and efficiency. By
leveraging this capability, researchers can seamlessly evaluate
the accuracy and reliability of the LSTM predictions, promot-
ing reproducibility and facilitating further analysis.

B. LSTM stock forecast NASDAQ


In the fig 5 ,the predicted closing price of AAPL for
tomorrow, generated by For analysis and visualization, the
Long Short-Term Memory (LSTM) model is incorporated.
Fig. 5. The graph output using ARIMA model This connection improves accessibility and productivity by
enabling researchers to view the model’s forecast right within
their workflow. Researchers can easily assess the precision and
dependability of the LSTM predictions by utilizing this capa-
bility, which encourages reproducibility and makes additional
analysis easier.

C. Linear Regression stock forecast for NASDAQ


In the fig 6 ,the predicted closing price of AAPL for tomor-
row, generated by Linear Regression, is included for analysis
and visualization. The inclusion of this functionality enables
researchers to directly observe the forecast produced by the
model within their workflow, thus enhancing accessibility
and productivity. By utilizing this capability, researchers can

Fig. 6. The graph output using LSTM model


Fig. 9. Tomorrow’s AAPL Closing Price Prediction by Linear Regression
parameterization make it accessible to a wider range of users,
including those without extensive machine learning expertise.
The superior performance of the ARIMA model translates
Fig. 10. Tomorrow’s AAPL Closing Price Prediction by ARIMA into tangible benefits for real-world applications, such as
portfolio management, risk assessment, and algorithmic trad-
ing strategies. Its reliable predictions empower investors and
seamlessly assess the accuracy and dependability of the linear financial professionals to make timely and informed decisions
regression predictions, thereby encouraging reproducibility in dynamic market conditions. While ARIMA emerges as
and streamlining further analysis. the preferred model in our study, future research avenues
D. ARIMA stock forecast NASDAQ could explore hybrid approaches that combine the strengths
of different techniques. Additionally, advancements in deep
Fig 7 displays the forecasted closing price of AAPL for learning architectures and ensemble methods may further
the following day, predicted by the ARIMA model, facili- enhance the predictive capabilities of LSTM and other neural
tating analysis and visualization. This incorporation enhances network models in financial forecasting tasks. In summary, our
researchers’ ability to conveniently assess the forecast within research underscores the prominence of the ARIMA model
their workflow, thus increasing accessibility and effectiveness. as the optimal choice for stock market prediction, offering
By utilizing this feature, researchers can easily gauge the unparalleled accuracy, interpretability, and real-world appli-
accuracy and consistency of ARIMA predictions, promoting cability. As financial markets continue to evolve, leveraging
reproducibility and simplifying further analyses. the strengths of ARIMA alongside emerging technologies
E. Classification model comparison promises to further advance the field of quantitative finance
and empower stakeholders with actionable insights.
The evaluation compared three models: ARIMA, LSTM,
and linear regression, across various aspects such as parameter
R EFERENCES
count, trainable and non-trainable parameters, RMSE values,
loss graphs, ease of learning, and classification results. The [1] M. K. Ho, H. Darman, and S. Musa, “Stock price prediction using
analysis delved into the RMSE values and loss graphs of each ARIMA, neural network and LSTM models,” J. Phys. Conf. Ser., vol.
1988, no. 1, p. 012041, Jul. 2021.
model, considering their ease of learning. Table 1 examined the
[2] R. I. Arnob, R. Alam, and A. E. Alam, “Dhaka stock market analysis
classification results for each model across different evaluation with ARIMA-LSTM hybrid model,” Ph.D. dissertation, Brac University,
parameters. Aug. 2019.
[3] A. Indika, N. Warusamana, E. Welikala, and S. Deegalla, “Ensemble
stock market prediction using SVM,LSTM, and linear regression,” Sep.
TABLE I 2021.
C OMPARISON OF RMSE VALUES AND PREDICTED VS . PRESENT VALUES [4] N. Latif, J. D. Selvam, M. Kapse, V. Sharma, and V. Mahajan, “Compar-
FOR DIFFERENT ALGORITHMS . ative performance of LSTM and ARIMA for the short-term prediction of
bitcoin prices,” Australas. Acc. Bus. Fin. J., vol. 17, no. 1, pp. 256–276,
Algorithms RMSE values Predicted values Present values 2023.
ARIMA 2.301 173.476 171.300 [5] G. Bathla, R. Rani, and H. Aggarwal, “Stocks of year 2020: prediction
LSTM 5.850 168.927 171.300 of high variations in stock prices using LSTM,” Multimed. Tools Appl.,
Linear Regression 10.408 172.979 171.300 vol. 82, no. 7, pp. 9727–9743, Mar. 2023.
[6] D. Shah, H. Isah, and F. Zulkernine, “Stock market analysis: A review
and taxonomy of prediction techniques,” Int. J. Fin. Stud., vol. 7, no. 2,
VII. C ONCLUSION p. 26, May 2019.
[7] T. Fischer and C. Krauss, “Deep learning with long short-term memory
In conclusion, our comprehensive investigation into stock networks for financial market predictions,” Eur. J. Oper. Res., vol. 270,
market prediction techniques utilizing ARIMA, LSTM, and no. 2, pp. 654–669, Oct. 2018.
[8] M. Wen, P. Li, L. Zhang, and Y. Chen, “Stock market trend prediction
linear regression models has yielded several noteworthy find- using high-order information of time series,” IEEE Access, vol. 7, pp.
ings. Across various evaluation metrics and experimental 28 299–28 308, 2019.
scenarios, the ARIMA model consistently exhibits higher [9] E. Chong, C. Han, and F. C. Park, “Deep learning networks for stock
market analysis and prediction: Methodology, data representations, and
accuracy as compared to linear regression and LSTM. Its case studies,” Expert Syst. Appl., vol. 83, pp. 187–205, Oct. 2017.
remarkable capacity to identify both cyclical and stationary [10] J. Creighton and F. H. Zulkernine, “Towards building a hybrid model
patterns in stock prices emphasizes how reliable its financial for predicting stock indexes,” in 2017 IEEE International Conference
on Big Data (Big Data). IEEE, Dec. 2017.
time series data forecasting is. The basis of ARIMA in time-
[11] M. A. Hossain, R. Karim, R. Thulasiram, N. D. B. Bruce, and Y. Wang,
series analysis and statistical methods provides a solid frame- “Hybrid deep learning model for stock price prediction,” in 2018 IEEE
work for modeling and predicting stock market behavior. Its Symposium Series on Computational Intelligence (SSCI). IEEE, Nov.
reliance on historical data patterns and mathematical principles 2018.
[12] K. Sakshi, School of Computer Science and Engineering, Vellore Insti-
allows for a more transparent and interpretable forecasting tute of Technology, Chennai, India, and Vijayalakshmi, “An ARIMA-
process, essential for financial decision-making. While LSTM LSTM hybrid model for stock market prediction using live data,” J. Eng.
and linear regression models offer flexibility and computa- Sci. Technol. Rev., vol. 13, no. 4, pp. 117–123, Aug. 2020.
[13] G. Bathla, “Stock price prediction using LSTM and SVR,” in 2020 Sixth
tional power, they often introduce complexity and challenges International Conference on Parallel, Distributed and Grid Computing
in interpretation. In contrast, ARIMA’s simplicity and intuitive (PDGC). IEEE, Nov. 2020.
[14] J. Eapen, D. Bein, and A. Verma, “Novel deep learning model with CNN
and bi-directional LSTM for improved stock market index prediction,”
in 2019 IEEE 9th Annual Computing and Communication Workshop and
Conference (CCWC). IEEE, Jan. 2019.
[15] W. Huang, Y. Nakamori, and S.-Y. Wang, “Forecasting stock market
movement direction with support vector machine,” Comput. Oper. Res.,
vol. 32, no. 10, pp. 2513–2522, Oct. 2005.
[16] R. Singh and S. Srivastava, “Stock prediction using deep learning,”
Multimed. Tools Appl., vol. 76, no. 18, pp. 18 569–18 584, Sep. 2017.
[17] T. Fischer and C. Krauss, “Deep learning with long short-term memory
networks for financial market predictions,” Eur. J. Oper. Res., vol. 270,
no. 2, pp. 654–669, Oct. 2018.
[18] X. Zhong and D. Enke, “Forecasting daily stock market return using
dimensionality reduction,” Expert Syst. Appl., vol. 67, pp. 126–139, Jan.
2017.
[19] M. Nikou, G. Mansourfar, and J. Bagherzadeh, “Stock price prediction
using DEEP learning algorithm and its comparison with machine learn-
ing algorithms,” Intell. Syst. Account. Finance Manag., vol. 26, no. 4,
pp. 164–174, Oct. 2019.
[20] J. Patel, S. Shah, P. Thakkar, and K. Kotecha, “Predicting stock market
index using fusion of machine learning techniques,” Expert Syst. Appl.,
vol. 42, no. 4, pp. 2162–2172, Mar. 2015.
[21] P. Meesad and R. I. Rasel, “Predicting stock market price using support
vector regression,” in 2013 International Conference on Informatics,
Electronics and Vision (ICIEV). IEEE, May 2013.
[22] Hiransha, Gopalakrishnan, V. K. Menon, and Soman, “NSE stock market
prediction using deep-learning models,” Procedia Comput. Sci., vol. 132,
pp. 1351–1362, 2018.
[23] R. M. I. Kusuma, T.-T. Ho, W.-C. Kao, Y.-Y. Ou, and K.-L. Hua, “Using
deep learning neural networks and candlestick chart representation to
predict stock market,” Feb. 2019.
[24] W. Jiang, “Applications of deep learning in stock market prediction:
Recent progress,” Expert Syst. Appl., vol. 184, no. 115537, p. 115537,
Dec. 2021.
[25] G. Abdoli, “Comparing the prediction accuracy of LSTM and ARIMA
models for time-series with permanent fluctuation,” SSRN Electron. J.,
2020.
[26] S. M. Idrees, M. A. Alam, and P. Agarwal, “A prediction approach for
stock market volatility based on time series data,” IEEE Access, vol. 7,
pp. 1–1, 2019.
[27] S. Ahmed, R. K. Chakrabortty, D. L. Essam, and W. Ding, “Poly-linear
regression with augmented long short term memory neural network:
Predicting time series data,” Inf. Sci. (Ny), vol. 606, pp. 573–600, Aug.
2022.
[28] G. Chniti, H. Bakir, and H. Zaher, “E-commerce time series forecasting
using LSTM neural network and support vector regression,” in Proceed-
ings of the International Conference on Big Data and Internet of Thing.
New York, NY, USA: ACM, Dec. 2017.

You might also like