Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

Times Series Modeling of Monthly Share


Prices of Nigerian Stock Market
Chukwudi Anderson Ugomma Vitus Chinonyerem Onyeze
1
Department of Statistics, Imo State University, Owerri, Nigeria.

Abstract
This study aimed to develop suitable Keywords: Share Prices, ARIMA Models,
ARIMA model which can be used to Stationarity, Stock Market
forecast series. The study collected
secondary data from 1.0 Introduction
http://ng.investing.com/equities/dangcem on A Stock market, also referred to as a stock
monthly share prices of Dangote cement for exchange, is an avenue to trade securities,
the period of ten (10) years (2013 – 2022) such as bonds and shares. Stock market
covering a total of 120 data points. We use began as physical location where financial
Augmented Dickey Fuller test for unit root traders gather to and shares. It functions as a
on the data as to assess for stationarity of the crucial function in the economy by enabling
data. The data series of the variables were investors to raise resources and companies
stationary at the 1st differencing at to expand their operation using funding from
significance level of 0.05. Consequently, the market. It is also one of the mainly
several ARIMA(p,q,d) models were applied crucial avenues of financial system as it
to the series as to select the ARIMA (p, d, q) offers companies an entrance to assets by
that best fits the data series using the Mean permitting the shareholders to buy shares of
Squared Error (MSE) and the result revealed ownership in companies. Through buying
that ARIMA(3,1,3) model best fitted the shares, shareholders have piece of rights in
data with minimum MSE. Furthermore, the the company and they have potentials to
model adequacy of ARIMA(3,1,3) was make gains in their assets based on the
evaluated using the Ljung-Box Q Statistic company's future performance. However,
test on residuals, partial autocorrelation millions are to be gained by buying and
function (PACF) and autocorrelation selling shares for profit, but not every
function (ACF) of the residuals as well. The investor would be successful in gaining
Ljung-Box Q Statistic test on residuals from profit on their investment or asset. This
ARIMA (3,1,3) at different lags showed the happens as a result of stock price swings.
residual values were not significantly Stock market is basically a free-economy
different from zero. Therefore, the residuals market where companies can have access to
are white noise. The spikes of PACF and capital by giving part rights or ownership to
ACF were within the 5% significance limit interested shareholders who are essentially
showing equally that the residuals are white outsiders. This is valuable for both
noise. Therefore, we forecasted the monthly shareholder and underlying companies. For
share prices of Dangote cement with shareholders, the stock market gives an
ARIMA(3, 1, 3) indicated an upward exceptional prospect to be part of an
movement in the monthly share prices of established or already running business and
Dangote cement, hence, the share prices of to garner any of their resulting rewards
Dangote cement will increase in the long- without the high risk of investing in a new
run. and unproven business, which has to

IJMSRT23JUL047 www.ijmsrt.co 19
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

compete with the associated start-up costs, the model was projected a good model for
overheads and other running costs and the stock market predictions.
management. For the underlying companies, With the fast growing number of researches
the stock market gives them the access for a on the prediction of share prices, it has
suitable source of capital to fund their became more obvious in different literatures
growth or expansion of activities. Given that that no single model or method was suitable
the prices of any stock are time dependent, to use in all types of situation, see for
therefore, studying the share prices involves example, Chatfield, (1988) and Zhang,
the study of time series data, which are, for (2003); rather, opined that it was more
quite a few purposes, such as, forecasting suitable to combine different individual
the future based on knowledge of the past, models for better results, also, see for
understanding of the phenomenon. example ; Uri,( 1977), Jenkins,(1982) and
Predicting future prices of a time series data Etuk, et al. (2012). Other current
plays a significant role in nearly every field researchers that used a variety of models to
including sciences, Engineering, Finance, predict share prices include; Cao, et al.
Business Intelligence, Economics, (2010); Chen and Ge (2019); Fischers, et al.
Meteorology, Telecommunication and (2002); Teng, et al. (2022) ; Kim, et al ,
others. As the share prices of any stock is (2018); Feng, et al. (2019), Chen, et al.
time dependent, hence, the study of share (2021) and Based on the brief literature
prices involves also the study of time series reviewed, we would fit a suitable time series
data. Over the years, numerous researchers model to share prices of Dangote Cement
have applied different time series models in and also applied the Box and Jekins method
order to predict the shares of different stock to analyze and predict the future value of
markets, see for example; Mohamed and share prices of Dangote Cement PlC.
Senthamaria, (2017) used the Box and
Jenkins approach to estimate and predict the 2.0 Materials and Methods
upcoming days of Nifty 50 stock market 2.1 Data Description
prices. From the results, the uncertain The data used in this study was a monthly
ARIMA model with the lowest normalize data on the share prices of Dangote Cement,
BIC was used to find ARIMA (0,1,1) as an over a period of ten years (January 2013 to
adequate model and it was observed that the December, 2022); obtained from
influence of R-Square value was (94%) high http://ng.investing.com/equities/dangcem,Th
and the Mean Absolute Percentage Error e method of data collection for this study
(MAPE) was very small which made the was therefore, of secondary type.
prediction accuracy more appropriate for the
Nifty 50 closing stock price. It fulfilled that 2.2 METHOD OF DATA ANALYSIS
closing stock price of Nifty 50 taken in the The Box-Jenkins methodology for
present study showed slow decreasing Autoregressive Integrated Moving Averages
fluctuation trend for upcoming trading days. (ARIMA) models was adopted for this
Ariyo, et al (2014) in their study predicted study. This Time series model was used to
New York Stock exchange using the explain the series and make forecasts.
ARIMA model, and the result showed that However, we made use of MINITAB
the ARIMA model had a dynamic statistical packages for the data analysis.
predictability for short-term forecasting. See
also, Banerjee,(2014); Devi, et al (2013) 2.2.1 BOX-JENKINS METHODOLOGY
applied ARIMA Model in their study and Box-Jenkins method is known to be a
systematic method which helps in

IJMSRT23JUL047 www.ijmsrt.co 20
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

identifying, fitting, checking by the estimated by the use Maximum Likelihood


application of ARIMA time series models. Techniques, as in Box and Jenkins (1976).
The method is appropriate for time series of (iii) There would be a diagnostic check for
medium to long length observation; say, at the fitted model as to check for inadequacies
least 50 observations. by considering the autocorrelations of the
The Box-Jenkins method can also be residual series (error values).
referred to as an iterative function of the
following three steps: 2.2.2 TEST FOR STATIONARITY
(i) By the use of time series plots of the
this paper, we would employ the use of
observed data may show the presence of
serial correlation (autocorrelation), partial Augmented Dickey-Fuller Unit Root Test to
autocorrelations, and other information as to test for stationarity of the data series.
enable the selection of class of simple
ARIMA models. This would amount to
estimating suitable values for p, d and q. 2.2.3 AUGMENTED DICKEY-FULLER
(ii) The values of the parameters   and UNIT ROOT TEST (ADF)
  of the selected model would be This would be used to test whether there is a
presence of unit root in a time series sample.
The hypothesis testing used in this study is as follows;
H0: There is presence of unit root for the series (non-stationary)
H1: No presence of unit root for the series. (Stationarity)

2.2.4 ARIMA MODEL


The null hypothesis of non stationarity In time series analysis, an Autoregressive
would be rejected provided the P-value is Integrated Moving Average (ARIMA)
less than 0.05, (i.e. P-value<0.05), model is an overview of an Autoregressive
otherwise, we do not reject the null Moving Average (ARMA) model. These
models would be fitted to time series data as
hypothesis. to understand the data very well and also to
Note: if there exists any unit root, the data forecast future points in the series.
could be differenced to remove the unit root The Auto-Regressive (AR) part of the model
has its own origin in the theory that
from the data, if such data is differenced
individual values of time series can be
once and there is no unit root, then it explained by linear models based on prior
becomes an ARIMA model of order one observations. The general formula for
ARIMA (1) and If twice it becomes ARIMA explaining AR p models (Auto-Regressive
(2), and subsequently. Models) is given by

X t   i X t1 , t  1, 2,..., p
t 1 (1)
where,  is the pth autoregressive parameter
Xt is the actually observed value at a time, The order of the model is determined by p.
t. The thought that lead to Moving Average
Models (MA models) is because that the

IJMSRT23JUL047 www.ijmsrt.co 21
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

time series data could be expressed as being estimation Xt and the actually observed
dependent on the prior estimation errors. value X t is denoted by  t.
Past estimation or predicting errors were
taken into account when evaluating the next The general description of MAq  models is
time series data. The disparity between the given by:
q
X t   i  t 1 t  1,2,..., q
t 1 (2)
where, When AR model and MA models are
Xt is the actual observed data at a time, t. combined the ARMA models would be
obtained.
 is the qth moving average parameter
Generally, predicting or forecasting with an
 t is the difference between the estimated ARIMA (p,q) model is described as,
Xt and the actually observed value Xt
p q

X t    i X t 1    i  t 1
t1 t1 (3)
Therefore, ARIMA models are sometimes be useful to some cases where data show a
confirmation of non-stationarity, where the first differencing step (equivalent to the integrated
area of the model) would be used to reduce the non-stationarity of the data series.

Non-seasonal ARIMA models usually denoted ARIMA (p,d,q), where the parameters of p,d and
q are positive integers; hence, P represents the order of the autoregressive model where d is
referred to as the amount of differencing, and q stand for the order of the moving average model
Suppose Xt is a non–stationary data, the plan is to build an ARIMA model on the series Yt ,
defined as the result of the operation of differencing the series d times

Generally, d 1: Yt  d X t
(4)
2.2.5 The ARIMA (p,q,d) forecasting (ii) Lags of the forecast errors are known as
Model: moving average terms.
A random variable Xt is said to be a (iii) A time series that desires to be
stationary time series if its statistical differenced to be made stationary is said to
properties remain constant over time. be an integrated version of a stationary
(i) Lags of the stationary series in the series.
forecasting equation are known as The forecasting equation is constructed as
autoregressive terms. follows:
First, let X denote the d th difference of Y,
which means:

If d  0 : Xt  Yt
(5)
If d  1: Xt  Yt  Yt 1 (6)
If d  1: X t  Yt  Yt1  Yt1  Yt2   Yt  2Yt1  Yt2 (7)
Note that the second difference of Y
(d=2 case) does not necessarily the

IJMSRT23JUL047 www.ijmsrt.co 22
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

mean the difference from 2 years ago. In terms of X, the general forecasting
Rather, it’s the first-difference-of-the- equation is:
first difference.
X t  c  1 Xt 1 ...  p Xt  p  t 1t 1 ... q t q
(8)

where; The maximum combination of p and q for


c is the constant term the modeling of the data shall be p = q =5.
 is the kth autoregressive parameter
θ is the jth moving average parameter 3.6 AUTOCORRELATION FUNCTION
p is the order of the autoregressive (AR) (ACF) AND PARTIAL
fragment AUTOCORRELATION
q is theorder of the moving average (MA) FUNCTION (PACF)
fragment and Autocorrelation function (ACF) at lag k is
dis the degree of first differencing involved. the correlation between series values that are
k interval apart and it is given as;
rK
k  (9)
r0
where From the plot in Fig 1, we observed a
rK is the covariance at lag k and r0 is the lot of price fluctuations in Dangote
variance. Cement Company as one of enlisted
companies in Nigerian Stock market.
Partial autocorrelation function (PACF) at
lag k is known as the correlation between The plots portrays that share prices
data series that are k intervals apart, were not steady during the period under
accounting for the values of the intervals study, therefore, advising the
between. shareholders to mindful of their
investment with this company and to
3.0 Results and Discussions study carefully the pattern of price
3.1.1 The Time Series plot of Dangote swings before investing.
Cement Share Prices from 2012 to 2022

300
STOCK PRICE OF DANGOTE CEMENT

250

200

150

2013 2014 2015 2016 2017 2018 2019 2020 2021 2022
year

Fig. 1 Time plot of share prices of Dangote cement

IJMSRT23JUL047 www.ijmsrt.co 23
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

3.1.2 The Augmented Dickey-Fuller unit root/Stationary test


Table 1: Output of Stationarity Test
Coefficients
Estimate Std Error T-value Pr(>/t/)
z.lag.1 -0.02627 0.02580 -1.0182 0.310701
z.diff.la -0.30919 0.08761 -3.529 0.000599 ***

From Table 1, we observed that the P-value 3.2.1 The Time Series of Differenced Data
(0.310701>0.05), we do not reject the null of Dangote Cement Share Prices
hypothesis and, hence, we conclude that from 2012 to 2022
there is presence of unit root in the series. The plots in Fig 2 which used the
This means that Dangote share prices for the differenced data also showed up and down
period under study does prove stationarity. movements of the share prices of Dangote
Therefore, we differenced the data in order Cement Company. The plots revealed that
to check for its stationarity. share prices in this company were not also
3.2 The Augmented Dickey-Fuller unit steady even when the data were differenced.
root test of the differenced data.

Time Series Plot of Differenced data


50

25
Differenced data

-25

-50
2013 2014 2015 2016 2017 2018 2019 2020 2021 2022
year

Fig. 2 Time Series plot of the differenced data of share prices of Dangote cement

Table 2: Output of Stationarity Test for Differenced Data


Coefficients
Estimate Std Error T-value Pr(>/t/)
z.lag.1 -1.99723 0.12861 -15.529 < 2e-16 ***
Z.diff.1a 0.51420 0.07852 6.548 1.7e-09 ***
From the output in Table 2, we conclude that stationarity is confirmed
observed that P-value (0.000)<0.05, we from the differenced data.
therefore, reject the null hypothesis and 3.3 The ARIMA Models

IJMSRT23JUL047 www.ijmsrt.co 24
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

Table 3 The output Final Estimates of Parameters of ARIMA(1,1,0) model


Type
coefficient SE Coeff T-value P-value
AR.1 -0.0513 0.0923 -0.56 0.580
Constant 1.069 1.546 0.69 0.491
Differencing: 1 regular difference
Number of observations: Original series 120, after differencing 119
Residuals: SS = 33272.4 (backforecasts excluded)
MS = 284.4, DF = 117
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag 12 24 36 48
Chi-Square 4.8 12.3 25.0 36.9
DF 10 22 34 46
P-Value 0.906 0.951 0.868 0.827

The ARIMA (1,1,0) parameter, AR(1) P-values, indicating that the residuals
has a P-value of 0.580 which indicates were not correlated, but other models
that it is not significant. Though, the shall be fitted so as to compare the MSE
Ljung-Box statistics gives insignificant for the best model.

PACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the partial autocorrelations)

1.0
0.8
0.6
Partial Autocorrelation

0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 3(a) : PACF of Residual for ARIMA (1,1,0)

ACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the autocorrelations)

1.0
0.8
0.6
0.4
Autocorrelation

0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 3(b): ACF of Residual for ARIMA(1,1,0)

IJMSRT23JUL047 www.ijmsrt.co 25
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

The PACF and ACF in Figures 3(a) and 3(b) result of random events. Hence, the
respectively of the residuals confirm the ARIMA (1,1,0) model is not a good fit and
explanation made above. From the plots we so, we cannot make forecasts using this
still observed some spikes in the ACF and model, hence, another mode.
PACF that do not disappeared rapidly as a

Table 4 The output Final Estimates of Parameters of ARIMA(1,1,1) model


Type
coefficient SE Coeff T-value P-value
AR.1 -0.1450 1.8273 -0.08 0.937
MA. 1 -0.0938 1.8380 -0.05 0.959
Constant 1.166 1.698 0.69 0.494
Differencing: 1 regular difference
Number of observations: Original series 120, after differencing 119
Residuals: SS = 33271.1 (backforecasts excluded)
MS = 286.8, DF = 116
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag 12 24 36 48
Chi-Square 4.8 12.3 25.0 36.9
DF 9 21 33 45
P-Value 0.851 0.931 0.839 0.798

The output showed that ARIMA (1,1,1) Though, the Ljung-Box statistics gave non-
parameters (AR(1), MA(1) ) have P-values significant P-values, showing that the
> 0.05, meaning that they are not significant. residuals appeared to be uncorrelated.
However, other models would be check
.
PACF of Residuals for STOCK PRICE OF DANGOTE CEMENT
(with 5% significance limits for the partial autocorrelations)

1.0
0.8
0.6
Partial Autocorrelation

0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 4(a) PACF of Residual for ARIMA (1,1,1)

IJMSRT23JUL047 www.ijmsrt.co 26
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

ACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the autocorrelations)

1.0
0.8
0.6
0.4

Autocorrelation
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 4(b) ACF of Residual for ARIMA (1,1,1)

The plots PACF and ACF in Figures 4(a) down rapidly as a result of random events.
and 4(b) of the residuals confirmed the The ARIMA (1,1,1) model is not a good fit,
interpretation made above. There are still so ,we cannot make forecasts using this
spikes in the ACF and PACF that did not die model, hence other model would be
checked.
Table 5 The output Final Estimates of Parameters of ARIMA (2,1,1) model
Type
coefficient SE Coeff T-value P-value
AR.1 0.1224 8.4735 0.01 0.989
AR.2 0.0198 0.4261 0.05 0.963
MA. 1 0.1731 8.4747 0.02 0.984
Constant 0.876 1.290 0.68 0.498
Differencing: 1 regular difference
Number of observations: Original series 120, after differencing 119
Residuals: SS = 33268.5 (backforecasts excluded)
MS = 289.3 DF = 115
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag 12 24 36 48
Chi-Square 4.8 12.2 24.9 36.8
DF 8 20 32 44
P-Value 0.777 0.908 0.808 0.771

The ARIMA (2,1,1) parameters (AR(1), significant P-values which revealed that the
AR(2), AM(1)) had P-values > 0.05 which residuals appeared to be uncorrelated.
indicated that they are not significant. Hence, we check other models.
However the Ljung-Box statistics give non-

IJMSRT23JUL047 www.ijmsrt.co 27
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

PACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the partial autocorrelations)

1.0
0.8
0.6

Partial Autocorrelation
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 5(a) PACF of Residual for ARIMA (2,1,1)

ACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the autocorrelations)

1.0
0.8
0.6

0.4
Autocorrelation

0.2
0.0
-0.2
-0.4
-0.6

-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 5(b) ACF of Residual for ARIMA (2,1,1)

The PACF and ACF in figures 5(a) and 5(b) spikes in the PACF and ACF that did not
respectively of the residuals confirmed the disappeared quickly as an effect of random
explanation made above. There are still events.

Table 5 The output Final Estimates of Parameters of ARIMA (2,1,2) Model


Type
coefficient SE Coeff T-value P-value
AR.1 0.7107 0.1552 4.58 0.000
AR.2 0.1835 0.1495 1.23 0.222
MA.1 0.7841 0.1454 5.39 0.000
MA.2 0.1863 0.1099 1.70 0.093
Constant 0.0747 0.1608 0.46 0.643
Differencing: 1 regular difference
Number of observations: Original series 120, after differencing 119
Residuals: SS = 32648.1 (backforecasts excluded)
MS = 286.4 DF = 114
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag 12 24 36 48
Chi-Square 5.5 13.9 28.3 40.7
DF 7 19 31 43
P-value 0.597 0.789 0.608 0.570

IJMSRT23JUL047 www.ijmsrt.co 28
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

The ARIMA (2,1,2) parameters (AR(2), indicating that the residuals appeared to be
AM(2)) had P-values > 0.05, indicates that uncorrelated. However, we shall check other
they are not significant. However the Ljung- models.
Box statistics give non-significant P-values

PACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the partial autocorrelations)

1.0
0.8
0.6
Partial Autocorrelation

0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig.6(a) PACF of Residual for ARIMA (2,1,2)

ACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the autocorrelations)

1.0
0.8
0.6
0.4
Autocorrelation

0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig.6(b) ACF of Residual for ARIMA (2,1,2)

The PACF and ACF of the residuals support disappeared quickly as an effect of random
the interpretation made above. There are still events.
spikes in the PACF and ACF that did not

Table 6 The output Final Estimates of Parameters of ARIMA (3,1,2) model


Type
coefficient SE Coeff T-value P-value
AR.1 0.0972 0.1100 0.88 0.379
AR.2 -0.8285 0.0826 -10.03 0.000
AR.3 0.0168 0.1004 0.17 0.867
MA. 1 0.1434 0.0661 2.17 0.032
MA.2 -0.9526 0.0529 -18.00 0.000
Constant 1.832 2.709 0.68 0.500

IJMSRT23JUL047 www.ijmsrt.co 29
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

Differencing: 1 regular difference


Number of observations: Original series 120, after differencing 119
Residuals: SS = 31526.3 (backforecasts excluded)
MS = 279.0 DF = 113
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag 12 24 36 48
Chi-Square 3.9 9.5 19.4 29.9
DF 6 18 30 42
P-value 0.690 0.948 0.932 0.919
Since the ARIMA (3,1,2) parameters give non-significant p-values, indicating that
(AR(1), AR(3), MA(1)) had P- the residuals appeared to be uncorrelated.
values>0.05which indicates that they are not However, we check other models
significant. Though the Ljung-Box statistics
.
PACF of Residuals for STOCK PRICE OF DANGOTE CEMENT
(with 5% significance limits for the partial autocorrelations)

1.0
0.8
0.6
Partial Autocorrelation

0.4
0.2
0.0
-0.2
-0.4
-0.6

-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig.7(a) PACF of Residual for ARIMA (3,1,2)

ACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the autocorrelations)

1.0
0.8
0.6
0.4
Autocorrelation

0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 7(b) ACF of Residual for ARIMA (3,1,2)

The PACF and ACF of the residuals model appears not to fit well so we
confirmed the above interpretation. There cannot make forecasts using this model.
still exits spikes in the ACF and PACF We therefore, try a different model.
that did not die down rapidly as a result
of random events. The ARIMA(3,1,2)

IJMSRT23JUL047 www.ijmsrt.co 30
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

Table 7 The output Final Estimates of Parameters of ARIMA (3,1,3)Model


Type
coefficient SE Coeff T-value P-value
AR.1 1.0122 0.0923 10.96 0.000
AR.2 -0.9052 0.1213 -7.46 0.000
AR.3 0.7349 0.1163 6.32 0.000
MA. 1 1.1287 0.0670 16.86 0.000
MA.2 -1.0990 0.0728 -15.10 0.000
MA.3 0.9326 0.0816 11.44 0.000
Constant 0.1127 0.1144 0.99 0.327
Differencing: 1 regular difference
Number of observations: Original series 120, after differencing 119
Residuals: SS = 30583.5 (backforecasts excluded)
MS = 273.1 DF = 112
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag 12 24 36 48
Chi-Square 4.0 10.7 23.2 33.9
DF 5 17 29 41
P-Value 0.555 0.870 0.769 0.777

The ARIMA(3,1,3) parameters such as P-values, showing that the residuals


AR(1), AR(2), AR(3), MA(1), MA(2) and appeared to be uncorrelated. This means
MA(3) have P-values of 0.000 which that the model is adequate. However, we
indicated that they are significant. The compare its MSE with that of the other
Ljung-Box statistics give non-significant models
.
PACF of Residuals for STOCK PRICE OF DANGOTE CEMENT
(with 5% significance limits for the partial autocorrelations)

1.0
0.8
0.6
Partial Autocorrelation

0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig.8(a) PACF of Residual for ARIMA (3,1,3)

IJMSRT23JUL047 www.ijmsrt.co 31
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

ACF of Residuals for STOCK PRICE OF DANGOTE CEMENT


(with 5% significance limits for the autocorrelations)

1.0
0.8
0.6
0.4

Autocorrelation
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Lag

Fig. 8(b) ACF of Residual for ARIMA (3,1,3)Model

The ACF and PACF and ACF of the appears to fit well so we shall make
residuals confirmed the explanation made forecasts using this model if its MSE is
above. The ARIMA (3,1,3) model the least when compared to the MSE of
ARIMA models .

Table 8 COMPARISONS OF THE ARIMA MODELS

MODELS MSE
ARIMA(1,1,0) 284.4
ARIMA(1,1,1) 286.8
ARIMA(2,1,1) 289.3
ARIMA(2,1,2) 286.4
ARIMA(3,1,2) 279.0
ARIMA(3,1,3) 273.1

From Table 8, we observed that the MSE most adequate among the models;
of the ARIMA (3,1,3) model proved to therefore, we make A-3 year forecast
have the smallest value which showed using the model.
that ARIMA (3,1,3) model remains the
The forecasting model is
Xt  0.111.01Xt1  0.91Xt2  0.73Xt3  t 1.13 t 1 1.10 t 2  0.92 t 3 .

Table 9A 3- YEAR FORECAST USING ARIMA (3,1,3)


Year Month Forecast 95% Limits
Value Lower Upper Actual
2023 JANUARY 266.13 233.74 298.53
2023 FEBUARY 268.64 225.41 311.87
2023 MARCH 263.10 209.86 316.35
2023 APRIL 259.12 197.72 320.52
2023 MAY 262.05 195.72 328.37
2023 JUNE 264.67 194.86 334.47
2023 JULY 261.85 188.35 335.35
2023 AUGUST 258.89 181.79 335.99

IJMSRT23JUL047 www.ijmsrt.co 32
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

2023 SEPTEMBER 260.48 180.86 340.11


2023 OCTOBER 262.82 181.35 344.29
2023 NOVEMBER 261.68 178.29 345.06
2023 DECEMBER 259.69 174.34 345.04
2024 JANUARY 260.54 173.66 347.43
2024 FEBUARY 262.48 174.43 350.53
2024 MARCH 262.32 173.12 351.52
2024 APRIL 261.14 170.73 351.56
2024 MAY 261.64 170.19 353.08
2024 JUNE 263.19 170.93 355.45
2024 JULY 263.57 170.53 356.61
2024 AUGUST 263.02 169.15 356.88
2024 SEPTEMBER 263.37 168.76 357.99
2024 OCTOBER 264.62 169.39 359.86
2024 NOVEMBER 265.27 169.45 361.09
2024 DECEMBER 265.18 168.74 361.61
2025 JANUARY 265.52 168.51 362.53
2025 FEBUARY 266.54 169.03 364.06
2025 MARCH 267.31 169.32 365.30
2025 APRIL 267.53 169.05 366.01
2025 MAY 267.92 168.96 366.87
2025 JUNE 268.79 169.41 368.18
2025 JULY 269.60 169.80 369.39
2025 AUGUST 270.02 169.81 370.23
2025 SEPTEMBER 270.47 169.85 371.09
2025 OCTOBER 271.25 170.25 372.25
2025 NOVEMBER 272.06 170.69 373.42
2025 DECEMBER 272.61 170.88 374.34

Time Series Plot of FORECAST


274

272

270

268
FORECAST

266

264

262

260

2023 2024 2025


year

Fig. 9 Time plot of A-3 year forecasts of ARIMA (3,1,3)

From the plot in , it is observed that the 4.0 CONCLUSION


stock prices will drop between February and This study was aimed at developing a
April, 2023 fluctuate up and down between suitable ARIMA models which can be used
May and December 2023 before taking a to fit a most appropriate subsets to
gradual increase into 2025. statistically forecast the share prices of

IJMSRT23JUL047 www.ijmsrt.co 33
m
Volume1, Issue1, July2023 International Journal of Modern Science and Research Technology

Dangote cement. ARIMA (3, 1, 3) model 6. Chen, S. and Ge, L.(2019): Exploring the
was adopted as the best fited model to the attention mechanism in LSTM-based Hong
data because it has the least MSE and all its Kong stock price movement prediction.
parameter were significant and the Ljung- Quant. Financ.19,1507-1515.
box gave non-significant P-value. Also the 7. Devi, B. U., Sundar, D and Alli, P.
PACF and ACF have spikes that were all (2013). An Effective Time Series Analysis
within the bounds and died down to zero. for Stock Trend Prediction Using ARIMA
Therefore, we conclude that ARIMA (3, 1, Model for Nifty Midcap-50.International
3) was adequate, and most preferred model Journal of Data Min. Knowl. Manag.
that could be fitted into the data. In Process 3 (1), 65
furtherance, result from a-3 year forecast 8. Etuk, E. H., Uchendu, B. and Udo, E. O.
with ARIMA (3, 1, 3) showed that there was (2012): Box-Jenkins Modelling of Nigerian
an upward movement in the monthly share Stock Prices Data. Greener Journal of
prices of Dangote Cement but the share Science, Engineering and Technological
prices will increase in the long-run. Research, 2(2), 032-038
9. Feng, F.; He, X.; Wang, X.; Luo, C.; Liu,
REFERENCES Y. and Chua, T.S.(2019):Temporal
1. Mohamed,A.BandSenthamaria,K.K: Relational Ranking for Stock Prediction.
(2017). Forecasting National Stock price ACM Trans. Inf. Syst. (TOIS), 37, 1-
using ARIMA model. Global and 30.
Stochastic Analysis.4.77- 10. Fischer S, Hallschmid M, Elsner, AL
81.https:\\www.researchgate.net/publicatio and Born J. Sleep (2002): Forms Memory
n/317223337_forecasting_national_stock_pr for Finger Skills. Proceeding of the
ice_using_arima_model Academy of Sciences, 99(18):11987-11991.
2. Ariyo, A., A., Adewumi, A.O., and Ayo, 11. Jenkins, G. M. (1982): Some Practical
C. Aspects of Forecasting in Organizations.
K. (2014). “Stock Price Prediction Using Journal of forecast. 1 (1), 3-21.
the ARIMA Model,” in Proceeding of the doi:10.1002/for.39800101003
2014 UKSim-AMSS 16thInternational 12. Kim, H.Y and Won, C.H. (2018):
Conference on Computer Modelling and Forecasting the volatility of stock price
Simulation, 106-112. Index; A hybrid Model Integrating LSTM
doi:10.1109/uksim.2014.67 with multiple GARCH-type models. Expert
3. Banerjee, D. (2014). Forecasting of Indian Syst. Appl.103, 25-37.
Stock Market using Time Series ARIMA 13. Teng, X.; Zhang, X. and Luo, Z.
model in proceeding of the 2014 2nd (2022):Multi-Scale Local cues and
International Conference on Business and Hierarchical Attention-based LSTM for
Information Management (ICBIM), 131-134 Stock Price Trend Prediction.
4. Cao, J. and Li, J. (2019): Financial Time Neurocomputing 505, 92-100
Series Forecasting Model Based on 14. Uri, N. D. (1977).Forecasting: A Hybrid
CEEMDAN and LSTM. Phys. Sta. Mech. Approach. Omega 5(4), 463-472. doi:10
Its Appl. 2019, 519, 227-139 1016/0305-0483(77)90008-1
5. Chatfield, C. (1988). What is the ‘best’ 15. Zhang, G. P. (2003). Time Series
Method of Forecasting? Journal of Applied Forecasting Using a Hybrid ARIMA and
Statistics 15 (1), 19-38. Neural Network model, Neurocomputing 50,
doi:10.1080/02664768800000003 159-175.doi:10.1016/S0925-2312(01)
00702-0

IJMSRT23JUL047 www.ijmsrt.co 34
m

You might also like