You are on page 1of 7

Stock Price Prediction Using the ARIMA Model

Abstract— Stock price prediction is an important topic in finance and economics which has
spurred the interest of researchers over the years to develop better predictive models. The
autoregressive integrated moving average (ARIMA) models have been explored in literature for
time series prediction. This paper presents extensive process of building stock price predictive
model using the ARIMA model. Published stock data obtained from National Stock Exchange
(NSE) are used with stock price predictive model developed. Results obtained revealed that the
ARIMA model has a strong potential for short-term prediction and can compete favourably
with existing techniques for stock price prediction.

I. INTRODUCTION

Researchers are continually driven by the fascination of prediction, pushing them to enhance existing
models. The impact of these models on institutions and individuals, aiding investment decisions and
strategic planning, motivates the pursuit of better predictive methods. Predicting stock prices remains
a challenging task in financial forecasting due to the complex nature of the stock market. Investors
actively seek reliable forecasting approaches to ensure profitability and minimize risks, prompting
ongoing innovation and the development of new predictive models.

Over the years, diverse models and techniques, including artificial neural networks (ANNs), have
been devised for stock price prediction. ANNs are particularly favored for their ability to learn
patterns from data and deduce solutions from unknown information. Previous research has integrated
ANNs into stock price prediction, referencing their effectiveness. Recently, hybrid approaches have
emerged, combining the strengths of different models to enhance predictive accuracy. While ANNs
belong to the realm of artificial intelligence, ARIMA models fall within the statistical models
category.

ARIMA models are recognized for their statistical robustness and efficiency in short-term financial
time series forecasting, often outperforming popular ANN techniques. They have found extensive
application in economics and finance, alongside other statistical models like regression methods,
exponential smoothing, and generalized autoregressive conditional heteroskedasticity (GARCH).

This paper delves into the comprehensive process of constructing ARIMA models for short-term stock
price prediction. Real-life data results showcase the substantial potential of ARIMA models in
providing short-term predictions that can guide investment decision-making. The subsequent sections
offer an overview of ARIMA models, detail the methodology employed, present experimental results,
and conclude the paper.

II. ARIMA MODEL

The ARIMA model, introduced by Box and Jenkins in 1970 and commonly referred to as the Box-
Jenkins methodology, is a systematic approach involving a series of steps for identifying, estimating,
and diagnosing ARIMA models based on time series data. Widely acclaimed as one of the leading
methods in financial forecasting, ARIMA models have demonstrated their efficiency in generating
short-term forecasts, consistently outperforming complex structural models in scenarios requiring
short-term predictions. In the ARIMA model, the future value of a variable is expressed as a linear
combination of past values and past errors, represented by equation (1):

Yt=ϕ1Yt−1+ϕ2Yt−2+…+ϕpYt−p+ϵt−θ1ϵt−1−θ2ϵt−2−…−θqϵt−q

Constructing an ARIMA predictive model involves three fundamental steps: model identification,
parameter estimation, and diagnostic checking.

III. METHODOLOGY

The comprehensive procedure utilized in this study to construct the ARIMA model for stock price
forecasting is outlined in the following subsections. The implementation tool for this research was
EViews software version 5. Historical daily stock prices from two different countries' stock exchanges
were employed, comprising four elements: open price, low price, high price, and close price. In this
investigation, the closing price was chosen to represent the index price for prediction, as it
encompasses all the day's trading activities.

To identify the most suitable ARIMA model among multiple experiments conducted, the following
criteria were employed for stock index selection:

 Bayesian or Schwarz Information Criterion (BIC) exhibiting relatively small values.

 Standard error of regression (S.E. of regression) displaying relatively small values.

 Adjusted R2 demonstrating relatively high values.

 Q-statistics and correlogram indicating the absence of significant patterns in the


autocorrelation functions (ACFs) and partial autocorrelation functions (PACFs) of the
residuals, signifying that the residuals of the chosen model constitute white noise.
The subsequent subsections delineate the step-by-step processes involved in the development of the
ARIMA model.

A. ARIMA (p, d, q) Model for ADANI POWER Stock Index


ADANI POWER stock data used in this study covers the period from 28th Mar, 2023 to 2nd
Jan, 2024 having a total number of 188 observations. Figure 1 depicts the original pattern of
the series to have general overview whether the time series is stationary or not. From the
graph below the time series have random walk pattern.

Figure 1: Graphical representation of the ADANI POWER

Figure 2 is the correlogram of ADANI POWER time series. From the graph, the ACF dies down
extremely slowly which simply means that the time series is nonstationary. If the series is not
stationary, it is converted to a stationary series by differencing. After the first difference, the
series “ADJCLOSE” of ADANI POWER becomes stationary as shown in figure 3 of the
correlogram.
Figure 2: The correlogram of ADANI POWER

Figure 3: The correlogram of ADANI POWER after first differencing


In figure 4 the model checking was done with Augmented Dickey Fuller (ADF) unit root test on
“d_AdjClose” of ADANI POWER. The result confirms that the series becomes stationary after the first-
difference of the series.

Figure 4: ADF unit root test for ADJCLOSE of ADANI POWER stock inde

Figure 5: Correlogram of ADANI POWER to determine the autoregressive (p) and moving average (q)
ARIMA Schwarz criterion Adjusted R-squared R-squared
(2,1,1) 925.815 0.982315 0.982587
(2,1,2) 926.8656 0.983094 0.983484
(2,1,3) 931.7407 0.98296 0.983484
(3,1,1) 930.6139 0.982185 0.982597
(3,1,2) 931.7407 0.98296 0.983484
(3,1,3) 935.9086 0.98292 0.983577
TABLE:1

ARIMA (2,1,1) is considered the best for ADANI POWER as shown in TABLE 1. The model returned the
smallest Bayesian or Schwarz information criterion of 925.815.

IV. RESULTS AND DISCUSSION


The experimental results of each of stock index are discussed in the subsection below.
Result of ARIMA Model for ADANI POWER Price Prediction
The result of the predicted values of ARIMA (2,1,1) considered the best model for ADANI POWER.
Figure 6 gives graphical illustration of the level accuracy of the predicted price against actual stock
price to see the performance of the ARIMA model selected. From the graph, is obvious that the
performance is satisfactory.

Figure:6 Actual vs predicted price


Figure:7 Statistical data of the remaining 30% of data

V. CONCLUSION

This paper extensively details the process of constructing an ARIMA model for predicting stock
prices. The experimental outcomes derived from the optimal ARIMA model underscore the capability
of ARIMA models to provide satisfactory short-term stock price predictions. Such findings have the
potential to assist investors in making profitable decisions in the stock market. Based on the results
obtained, it is evident that ARIMA models can reasonably compete with emerging forecasting
techniques in the realm of short-term predictions.

You might also like