“Forecasting stock returns on the Amman Stock Exchange: Do neural networks outperform linear regressions?”

ARTICLE INFO Abdel Razzaq Al Rababa’a, Zaid Saidat and Raed Hendawi (2021). Forecasting stock returns on the Amman Stock Exchange: Do neural networks outperform linear regressions?. Investment Management and Financial Innovations, 18(4), 280-296. doi:10.21511/imfi.18(4).2021.24 DOI http://dx.doi.org/10.21511/imfi.18(4).2021.24 RELEASED ON Wednesday, 01 December 2021 RECEIVED ON Friday, 24 September 2021 ACCEPTED ON Tuesday, 09 November 2021


INTRODUCTION
The most recent report by Morgan Stanley Capital International (MSCI) classified the Jordanian stock market as a frontier market along with the Bahraini and Omani markets from the Middle East.
The Amman Stock Exchange (hereafter ASE) is one of the fast-growing and frontiers markets in the Middle East 1 . Specifically, the value of shares purchased by non-Jordanians in June 2021 became equal to JD 19.4 million compared to the value of JD 5.1 million being reported a year later (ASE, 2021). This sharp increase in the number of foreign ownership in the market requires careful consideration for the non-linear models. That is, doing so can maximize the profit out of trading in the market. However, the ASE overall index witnessed sharp declines in recent years following the global financial crisis and the amendments made to the Jordanian tax law in 2018. Consequently, in recent years the Jordanian government starts using more comprehensive policies in the capital market to improve the private sector. These policies also aim to change the regulations of the capital market and make them more consistent with international standards (Al-Shiab, 2006; ASE, 2020). These policies, in turn, are expected to enhance the investment in the ASE.
Nevertheless, predicting stock performance represents one of the main challenges for people interested in investing in the stock markets. This issue even arises in the ASE as one of the most liquid and volatile markets in the Arabian region. That is, the stock market has features such as discontinuity and volatile multi-faceted elements because many elements have influence, such as general economic attitudes, political activities, and assumptions of the brokers (Hadavandi et al., 2010). Observing the excess volatility in the ASE, the ability to make quick decisions is necessary for success, and it is very important that transactions take place in the smallest investment horizon (Barakat et al., 2016). Moreover, the importance of making the more accurate prediction in the stock market stems from the fact that the stock market itself is the source of economic activities, which can be a highly advantageous place for investors with possibilities to grow their capital and wealth.
On the one hand, several stock traders and economic analysts have studied historical patterns of financial time series data and suggested different methods for forecasting stock performance. Examples of these methods include linear regressions. Yet, these approaches suffer from several problems including the common home bias (Siemsen et al., 2010). On the other hand, machine learning models, such as Artificial Neural Networks (ANNs) are generally considered black-box statistical models whose specifications are automatically derived from the way that computation is executed by the brain. However, their elements allow them to be appropriate for any dataset at hand. That is, ANNs can generate the forecasts out of any kind of data while depending on a number of hidden layers and not allowing for direct intervention by the final user. Thereby, this results in more accuracy in making predictions for the future and allows for the non-linearity pattern to be investigated between a set of variables. Additionally, it was argued that the ANNs can deal with the outliers in the dataset coinciding with the demonetization events and the COVID-19 pandemic (Chandrika & Srinivasan, 2021) So far, research concerning the prediction of the ASE returns has been limited to using traditional linear models (Al-Shiab, 2006). Other studies also employ qualitative data to demonstrate the applicability of the ANNs in forecasting the prices in the ASE (Hammad et al., 2007). However, such a comparison between the predictability of the basic linear models and non-linear ANNs in the Jordanian stock market is still required. Doing that is expected to benefit the investors in the ASE since it provides them with more information on the accuracy of prediction.

LITERATURE REVIEW
Artificial Neural Network (ANN) is one of the most commonly used methods in forecasting. Empirically, several studies have been conducted to examine the predictability of the NNs model against other traditional linear approaches in stock markets. Among these, for instance, Donaldson and Kamstra (1996) demonstrated the superiority of the ANNs over the traditional linear models in forecasting volatility in four developed stock markets. Similarly, Qi and Maddala (1999) found that the NN method outperforms linear forecasts and naive model forecasts. However, they prove that when considering the transaction costs, it is only the case that the switching portfolio constructed based on the linear forecasts outperforms the NN model. This finding is further enhanced by Qi (1999) since it was found that the forecast of ANN is not stable over time. Using data for thirty-three emerging markets over the sample period from 1992 to 1997, Harvey et al. (2000) found that neural networks outperform the linear regression model and the buy-and-hold strategy.
In forecasting all the shares return in the FT all share index and the Dow Jones Industrial Average, Kanas (2001) found that the ANNs are more accurate than the linear regression in the forecasting exercise. Chen et al. (2003) found that ANN provides more accurate forecasts for the Taiwan stock market relative to the Kalman filter and random walk approaches. Cao et al. (2005) found that the univariate and multivariate NNs are better compared to the Fama and French's models in forecasting the Shanghai stock market. Their finding is, however, found to differ across the firms in the sample.
In another study, Pérez-Rodríguez et al. (2005) found that that ANNs perform better in forecasting than the random walk model. However, this evidence is found to be weak and to exist when the linear AR and the smooth transition autoregressive models are used later on for some forecast horizons. A study by Dropsy (1996) found the surprising result that the superiority of the ANNs is not significant relative to the other linear models. Furthermore, Desai and Bharati (1998)  They finally found that the predictability tends to vary over the tick horizon and not to be ideal for one property in all the forecasting scenarios. Using data from the Indian stock market, Sahoo and Mohanty (2020) proved that the hybrid models incorporating the ANN provide better forecasting performance than the individual neural network. More recently, Katris and Kavussanos (2021) found that ANN, along with other machine learning models, clearly provides comparable performance relative to a set of models belonging to the autoregressive moving average modeling approach.
To sum up, reviewing the related literature provides mixed results regarding the predictability of the ANNs. That is, the superiority of the ANNs over other linear models depends on the market itself, the ANN specification, and the competing models. More specifically, studies conducted in the ASE are very few and provide contradictory findings (Al-Zubi et al., 2010).

AIMS
The objectives of this paper are as follows. First, it compares the predictability of different specifications of the ANNs and the linear regression models in a growing Arabian market, namely the ASE. Second, it examines whether incorporating more variables in the linear regressions improves the forecasting performance of these models. Lastly, it evaluates the predictability over an extended sample period to cover the impact of the COVID-19 pandemic.

Research hypotheses
The mixed evidence in literature triggers the need for examining the following hypotheses: H1: ANNs models provide more accurate forecasts for the stock returns in the ASE than the linear regressions.
H2: The dynamic neural network provides more accurate predictions than the static neural network.
H3: Incorporating more predictors in the regression helps in improving the prediction by the linear regressions.
H4: The predictability of the dynamic NN tends to diminish during the COVID-19 period.

Baseline linear regression models
The main estimation approach in this study assumes that selected economic variables convey important information for the stock returns. To examine this further, five main linear regression models have been estimated as follows:

Artificial neural networks
The neural networks are employed to forecast the stock market returns. The ANN is mainly used for discharging forecasting following initial training using a feed-ahead approach from each neural level to the other one. After that, the outcome associated with the output level is in contrast with its corresponding labeled values. In the next step, the model components can be adjusted based on the comparison between the output results and their target counterparts. Following this stage, better performance for the ANN can be attained 2 . For further detail, the network structure is given in 2 The description of the ANN is made short and one can refer to Mackay (1996) to know the main components of the ANN. 3 For a detailed description of the training algorithm, see Schalkoff (1997). Figure 1 3 . The nodes of the input layer are set to the predictors, and the output layer produces the projected return series. To speed up the exercise process, this study employs a random search approach. This method is an improvement on the grid search technique as it optimizes the parameters within a shorter time.

Static backpropagation in the ANN
Backpropagation (BP) is a special category of the ANN that employs interrelated layers and hidden parts. The approach aims to reduce the degree of the non-linear complexity in the system by allowing for a certain number of hidden layers existing in the system. Besides, the BP approach utilizes the deepest descent learning method to ensure the simplicity of uncovering the relationship between the input and output variables in the system.
On the other hand, the ANN requires the employment of two unobserved layers when the data at hand is not reliable enough for validating the stage. A level filter is essential for the input data  mains difficult to understand the reasons behind generating specific outputs from the system.

Dynamic LSTM
LSTM network is a specific form of neural network that helps in understanding historical data and sequential information problems and thereby avoid some of the limitations of traditional ANNs that tend to form long-term interlinkages, as shown in Figure 2. The network design inserts LSTM layer after the sequence input layer, followed by a fully linked layer, a softmax layer, and an arrangement output layer, in order to predict specific tags (Mao et al., 2021).
The purpose of the LSTM layer is to keep the release of the network at a specific time step, which can be transported with minor modifications, but which can be influenced by new data. Furthermore, the Tanh activation function exerts a non-linear activation transformation on the information within the ANN structure 4 .

Forecasting evaluation
To assess the forecast, the most common statistical measures were used, namely the root mean square error (RMSE) and the mean absolute error (MAE), such as: where τ is the number of observations in the outof-sample period, t ret is the actual return and t ret ∧ is the forecasted return series from the corresponding model. The RMSE assigns more weight to large forecast errors against small forecast er- 4 The function considers any real value as input and outputs values in the range from -1 to 1. 5 A set of regressions was also performed with the separate predictors' group being inserted one-by-one into each regression. That, however, produced qualitatively and quantitatively similar findings to those reported here.
rors, while the MAE is more robust to the possible existence of noisy return observations. Following the logic in the forecasting literature, the full sample was divided into 30% (70%) in (out of) sample where the later period has been considered for the prediction exercise. Henceforth, the forecasting period spans from June 2017 to the end of the sample period.
The main concern was to examine whether any of the NNs either with static or dynamic specifications can beat the benchmark linear regressions models. For the latter, Model 6 was specifically considered since it incorporates all the predictors in the study at one time 5 .

DATA
This paper used monthly closing prices for the ASE whole market index as well as economic datasets for the period from January 2011 to February 2020. The decision for starting and end dates is restricted by the availability of the economic data in the Central Bank of Jordan. However, the closing price series is available for a longer period. To begin, the stock price series was retrieved from the ASE's website and converted to returns by applying the usual log difference approach (i.e. Ret = Log (diff (price)) at any time period. The same was done to the economic series excluding the interest rate data, where the corresponding data are left as they are without transformation.  Table 2 describes the main statistics in the variables of the study. Overall, these preliminary results indicate that the mean is mostly negative for stock market variables while it tends to be positive and even higher when either the money and banking or the public finance variables are considered. Furthermore, performing the Jacque-Bera test confirms the rejection of the normality assumption in all variables except those belonging to the trade balance and internal and external public debt. The correlation coefficient values between the stock returns and the predictors are reported in Table 3. There is evidence of a significant correlation between the stock market variables and return. The same is also true when the WIR, MB2, and MB9 are considered. Loans to the mining industry MB9 20 Loans to the industrial sector MB10 21 Loans for the free trade purposes MB11 22 Loans to the construction sector MB12 23 Loans to the transportation services MB13 24 Loans to hotels and hospitality industry MB14 25 Loans to the public utility MB15 26 Loans for the financial service MB16 27 Loans for other activities MB17 28 Direct Credit facilities granted by banks MB18 29 Direct Credit facilities for buying stocks only MB19 Panel E: Trade balance variables 30 Exports of goods and services EXP 31 Imports of goods and services IMP Note: The economic data is collected from the Central Bank of Jordan.    (Campbell et al., 1993). This observation holds when other specifications have been estimated in the subsequent analyses, indicating that the trading volume remains a valid predictor for the current stock mar-ket return. That is, its impact cannot be encompassed by any other predictor. Theoretically, the importance of trading in formulating the returns in ASE can also support the argument of Karpoff (1986) that investors in the market might tend to trade even in the absence of new information. In other words, it might be the case that the speculative desires for the investors in ASE are that they trigger the need for trading regardless of the size of information being available in the market. This, in turn, can motive investors to buy more stocks and subsequently increase prices

Baseline analysis
Adding the interest rate variables to Model 2 provides new results. Specifically, WIR conveys significant information for explaining the stock market returns. This evidence tends to exist at the 1% significance level. The related coefficient value is positive indicating that higher interest rates on loans maximize the stock market returns. This, however, contradicts the previous findings of Alam and Uddin (2009) who found evidence for the negative relationship between the changes in the stock market prices and interest rates in a sample of developing and developed countries. This contrarian finding can be attributed to the prevailing trading behavior in ASE, where margin trading does fully exist. To say it differently, investors in the market rely more on their savings before starting their investment in the market. With the increase in the proportion of foreign investment in the market, investors use their own cash, which is accumulated before investing in the Jordanian market. This makes the variations in the local interest rates less important to the existing investors in the market. Considering the interest rate variables again reveals that the INTER negatively though only economically explains the stock market return. This new result holds in all models again. This finding proves the opposite relationship between the overnight cost of borrowing between banks and stock market returns.
On the other hand, adding the public finance variables uncovers cross-sectional differences in the results between the four PF variables. Using any of the models again (from Model 3 to 6) shows a negative simultaneous relationship between the tax expenses (PF1) and stock market returns. This observation means more taxes induce less trading and stock market returns accordingly. Overall, es-timating Model 4 with the PF variables reduces the Adj. R² to 0.1094 relative to the highest previous level of 0.1550 when Model 2 is considered.
Turning the attention to Model 5 reveals a different story. The overall explanation of the model has been sharply reduced and the Adj. R² reached the lowest value of 0.0435. It can also be observed that, regardless of the large number of variables being used at this stage, only loans to the mining industry measured by MB9 significantly explain the current returns. This evidence is, however, very small at a 10% significance level. Henceforth, estimating Model 5 proves the importance of looking at the number of loans at the disaggregated level rather than the total loan amount being given in a specific year.
Lastly, controlling for the series correlation in stock market returns results in the highest Adj. R² relative to the counterpart estimates in all the previous models. After estimating the model, the significance of the MB9 has disappeared. Conversely, more direct credit facilities for buying stocks appear now to positively and significantly drive stock market returns at the 1% significance level.
Overall, the results in Table 4 indicate that trading volume and WIR explains the stock market return in ASE more than any variables. To emphasize, adding more variables does not make a big difference in the overall performance of the baseline model. Therefore, the paper concerns whether the degree of linearity in the estimation itself plays a major role in the forecasting stage. Doing that should help investors in the ASE to get an accurate forecast and formulate their trading strategies accordingly to maximize the capital gain out of their investments. Thus, the paper reports the results and offers a comparison between the performance of the baseline models and the ANN models in an out-of-sample (forecasting) exercise. Table 5 reports the estimates from the out-ofsample analysis. For one step-ahead both the RMSE and MAE forecasting assessment criteria select the static NN against the other competing models. According to these metrics, the model produces the lowest forecasting error values of 0.0012 and 0.0005 respectively. However, LSTM appears to yield the largest RMSE relative to other models. On the contrary, this model along with specifications 3 and 4 produces the lowest errors according to the MAE approach.

Forecast performance
Overall, the model that incorporates more predictors does not seem to provide more accurate forecasts relative to its counterparts. In other words, it is the non-linearity that matters the most in providing the most accurate prediction for the Jordanian stock market return. This result holds at the selected forecasting horizon of one month to coincide with the frequency of the monthly predictors being used in the analysis. Adopting the non-linear static NN approach will then help the short-term investors in ASE in getting precise forecasts while trading in the market.
Generally, the superiority of the static NN over the other benchmark models is in line with the previous finding in the forecasting literature, for example, include Pérez-Rodríguez et al. (2005) and Katris and Kavussanos (2021). Yet, the evidence from this study is generated in an emerging and fast-growing Arab market. It is also reached after using comprehensive predictors in the estimation process. Lastly, the performance of various specifications of the NN was examined.  Overall, the empirical results confirm the acceptance of the first hypothesis while rejecting the second and the third hypotheses. Note: Numbers in brackets are the t-statistics. *** and * denote the statistical significance at 1% and 10%, respectively.