Analysis of Stock Return in Nairobi Securities Exchange Using Autoregressive Integrated Moving Average Model

Nairobi Securities Exchange exhibited erratic performance ten years after the 2007 post-election violence. Investors, listed firms and the government had hard time in making investment decisions and policies given the volatility of Nairobi Securities Exchange during this period. This trend worsen in 2011 and 2015 when the burse experienced bear run leading to a loss of investors wealth in terms of market capitalization. The Nairobi Securities Exchange 20 Share Index recorded high of 5,346 points during the first quarter of the year but dipped to 4,040 points in December 2015, representing 2.0 percent compared to December 2014. With observed volatility witnessed during the study period, analysis of stock return in Nairobi Securities Exchange using autoregressive integrated moving Average model is essential. The model output using ARIMA (p, d, q) will be used useful to managers, investors, investment analysts and policy makers. Using Autocorrelation functions and Partial Autocorrelation functions, the appropriate ARIMA (p, d q) model identified to be suitable for forecasting stock return is ARIMA (1, 1, 1) this is because the autocorrelation function drops sharply after p lags meaning the AR term exists and was be included.

the prediction. In conclusion, ARIMA model (1,1,0) resulted as the best model. Her study revealed that despite the exclusion of explanatory variables, there was evidence of substantial inflation inertia; this is also evidenced by the hypothesis that if the level of inflation is determined by inertia, then the parameters on lagged inflation should sum to unity. Finally, parameters of the selected lagged parsimonious model in her study sum approximately in unity. The study did not use only ARIMA (p, d, q) models but instead included VAR models. The study did not adopt the ten year study period as seen in the present study but instead used eight years study period. They did not fit the model with ARIMA (1, 1, 1) but instead fitted the model as ARIMA (0, 1, 1). He did not use quarterly data but instead used monthly data to fit the model. The nature of models is not known assuming the reviewed study could adopt the same methodology used in the present study.
In United States of America, Jarrett (1989) studied forecasting monthly earnings per share; the study was a time series. First, he computed the Autocorrelation Function (ACF) and Partial Autocorrelation Functions; the functions indicated a slow decline to about lag 6 confirming that the model is AR. To determine the appropriate number of AR parameters, to estimate Partial Autocorrelation Function (PACF) is drawn and obtained. The Partial Autocorrelation Function contained a large value at lag 1 (approximately, 0.8) which is above 95% significant limit. The number of AR parameters to be estimated was 1, although AR (2) could also still be appropriate. In conclusion, the analysis of data indicated that ARIMA modeling and time series decomposition produced useful results. In examining the final estimates of the AR (2) model, the AR (2) parameter yielded a t value of 0.86 corresponding to a p-value of 0.391. A second round of ARIMA modeling without the AR (2) parameter estimate would yield better results with only the constant and AR(1) parameter included in the forecasting model. Jarrett (1989) however did not reveal the study period and she did the study in the United States hence predicting earnings per share in Kenya may reveal different results.
Murrithi et al., (2014) did a study titled analysis of the fluctuation of Gross Domestic Product in Kenya using Autoregressive Integrated Moving Average ARIMA (p,d,q). Using the famous Box-Jenkins (1976) methodology, to determine the most efficient and adequate model for analyzing the Kenyan GDP. The methodology involves stages of identification, estimation, diagnostic, checking forecasting of a univariate time series. Their study used an exploratory research design and a sample of 51 observations was used. The annual data was obtained from the World Bank National Accounts Data. They noted in their study that the Kenyan GDP has been fluctuating in the past years. They used statistical methods to analyze, explain and present the time series data of Kenya's GDP growth from 1960-2011. Comparing with other models, they asserted that ARIMA (2,1,2) was selected as the final model for forecasting the Kenya's GDP growth for 2012-2030. All the model assumptions were satisfied (randomness, independent and normality of the residuals). In conclusion, the study found out that Kenya's GDP will continue to rise if other factors remain constants. The study however did not model Gross Domestic Product using quarterly data, they did not use ten years to model Gross Domestic Product but instead used 51 years to model Gross Domestic product and they did not fit ARIMA (1,1, 1) but instead fitted ARIMA (2, 1, 2).
In India, Shankar & Abhishek (2019) did a study on predictive efficiency of ARIMA (p, d, q) and ANN models; analysis of Nifty Fifty in Indian Stock market. They applied simultaneous use of AAE , RMSE, MAPE and MSPE statistical tools. They predicted the accuracy of the two models. The results indicated that ARIMA (2,1,2) and ANN (4-0-1) with both train functions GDX and BFG were the best predictors with ANN dominating over ARIMA (p, d, q) model in the final outcome. In conclusion, neural network had better predictive capability in case of long span of time and non linear volatile series like Indian Stock Market Index. Even though neural networks had advantage over ARIMA (p, d, q) models, they are still capable to provide a right and validated direction for the investors to make better decisions. This study did not use annual or quarterly data; instead they used daily data for a period of ten years. The study did also not focus solely on ARIMA (p, d, q) models but instead focused on comparing ARIMA (p, d, q) with neural networks. Furthermore, the study was not done in Kenya; instead the study was done in India. The methodological differences and the study area could lead to mixed results.
Reddy (2019), Githingi (2014), Jarrett (1989) and Murrithi et al., (2014), Shankar & Abhishek (2019) are in agreement that modeling ARIMA (p, d, q) time series model for purposes of forecasting is essential for decision making. For instance Reddy (2019) asserted that stock market is volatile and that prediction of its movement is more useful to the stock traders to design their trading strategies. However these studies used different study periods and data points in their time series analysis. Some studies used daily data, some used monthly data; some studies used weekly data while others used annual data. None of the studies reviewed used quarterly data for ten years time series period. Furthermore, the studies were done mostly in developed countries and they used different variables for purposes of modeling; this may halt fitting models and subsequent forecasting given lack of uniformity in regulations, general economic environment and efficiency in securities exchange systems. Lastly, the studies used different research philosophies and designs.

Stationarity Test
Data was transformed to stationary by differencing their natural logarithms (Granger & Newbold, 1974, Gujarati, 2006. Most researchers employ the first difference approach, mainly as a result of Nelson and Plossers' (1982) work which they argued that many macroeconomic time series use difference stationarity and not trend stationary. Granger and Newbold (1974) refer to results obtained from regressions that contain non-stationary data as spurious regression results which are empirical results with high-R squared estimates and very low Durbin-Watson statistics, which can be regarded as excellent results but are of no use (Gujarati, 2006).
The difference of the natural logarithm of NSE-20 share index is stationary as shown in figure 1, the difference of the natural logarithm is stationary around 0 and with increased variance over time and a constant mean.

Autocorrelation
Many parametric statistical procedures assume that the errors of the models used in the analysis are independent of one another, that is, the errors are not correlated. When this assumption is not met in the context of time-series research designs, the errors are said to be auto correlated or dependent. Because time-series designs involve the collection of data from a single participant at many points in time rather than from many participants at one point in time, the assumption of independent errors inherent in many parametric statistical analyses may not be met. When this occurs, the outcome of these analyses and the conclusions drawn from them are likely to be misleading unless some corrective action is taken (Bradley & Sean, 2006).    Table 1 used time series data for a single variable to ascertain autocorrelation. ARIMA (1, p, d) model includes one predictor, the observation immediately preceding the current value and an ARIMA (2, d, q) model includes two predictors, the first and the second preceding observations. Given that the data became stationary after the first differencing, I(d) was also 1; this is consistent with observations by jebb et al., (2015) who asserted that the order of differencing rarely needs to be greater than two in order for the data to be stationary and that in practice, the choice comes down to whether the series is transformed into either its first or second differences, the optimal choice should be the order of differencing that results in the lowest series variance and does not result in an increase in variance that characterizes over differencing. As seen in figure 6, the PACF is none zero and it is gradually decaying. ARIMA (p, d, q) model was used to identify the appropriate model that could be used for forecasting stock return in Nairobi Securities exchange, Upon assessing the series and transformation of the data to attain stationarity, ARIMA (1, 1, 1) was identified as the appropriate model that could be used for forecasting. AR (p) with p= 1, I(d) with d=1 and MA (p) with p=1 was adopted. According to reviewed studies, to asses if there are International Journal of African and Asian Studies www.iiste.org ISSN 2409-6938 An International Peer-reviewed Journal Vol.71, 2021 42 AR (p) terms, we observe the autocorrelation function, if it drops sharply after p lags, the AR term exists and should be included. The I(d) term exists when the series is differentiated to attain stationarity; this is referred to as data transformation. Traditionally, the I(d) will always not exceed two lags or t-2. The MA (p) term was identified by use of partial autocorrelation which related the series at time t with previous random shocks which always interact with complexity (white noise). Just like the AR (p) term, when the partial autocorrelation function gradually decays as it approach zero, then MA (p) terms exists. Alternatively, when there is a sharp drop of partial autocorrelation function after p lags then MA term exists.