**3. Methodology**

The methodology section contains the basic four subsections. The first subsection describes the data that were used to build the models. Then, each of the subsections describes general theories and procedures to build the models and then how the models were fitted for a particular dataset. The overall performance of each of the models was checked by the analysis of the residuals and four different error measures, namely the absolute percentage error (APE), the average absolute error (AAE), the average relative percentage error (ARPE), and the root-mean-square error (RMSE) (Nguyet Nguyen and Wakefield 2018). The formula to calculate these errors are as follows:

$$\begin{aligned}APE &= \frac{1}{r} \sum\_{i=1}^{N} \frac{r\_i - r\_i}{N}, \\ AEE &= \sum\_{i=1}^{N} \frac{r\_i - r\_i}{N}, \\ ARPE &= \frac{1}{N} \sum\_{i=1}^{N} \frac{r\_i - r\_i}{N}, \\ RMSE &= \sqrt{\frac{1}{N} \sum\_{i=1}^{N} \frac{r\_i - r\_i}{N}}. \end{aligned} \tag{1}$$

*3.1. Data*

S & P 500 daily stock for the period 1 January 2015 to 31 December 2019 was used in this research. We used the quantmod package (Ryan et al. 2020) in statistical software R, version 1.2.1335 to collect the data directly from *Yahoo Finance*. Initially, the dataset contains six variables, namely daily *Open*, *High*, *Low*, *Close*, *Volume*, and *Adjusted Close* price. Addition to the six variables, we created two more variables, i.e., *Average* and *Return*. The *Average* variable is the average of daily *Open, High, Low,* and *Close* price. All the predictive models were built to predict the *Adjusted Close* price for the next day on the basis of the present day's predictor variables. There were 63 trading days per quarter in 2019. All the models were used to predict the next-day stock price for the last quarter of 2019. A total of 63 predictions were made.

### *3.2. Autoregressive Integrated Moving Average Process*
