Random Forest Based Feature Selection of Macroeconomic Variables for Stock Market Prediction

A firm’s equity price on the stock-market is reported to be closely related to the Macroeconomic Variable (MVs) of the country in which the firm trades. For this reason, researchers, market traders, financial analysts and forecasters to examine the association between MVs and stock-price have carried out numerous studies, using time-series statistical analysis methods like Autoregressive Integrated Moving Average (ARIMA), Autoregressive Moving Average (ARMA) and Generalised Autoregressive Conditional Heteroscedasticity (GARCH). However, these techniques are reported to suffer from limited predictive power and restrictive assumptions. Besides, in pursuit of ways to remedy these paucities and limitations within these techniques, some researchers have examined uncountable machine learning techniques for measuring the stock-markets trends and making trading decisions using macroeconomic variables. On the other hand, a higher percentage of these studies paid attention to the stock index prediction and neglected the diversity of MVs that influence different sector indices. In addressing the issues above, this study seeks to examine the degree of significance between different sectors stock-price and MVs and predict a 30-day head stock-price using Random Forest (RF) with an improve leave-one-out cross-validation tactic and Long Short-Term Memory Recurrent Neural Network (LSTMRNN). An empirical analysis of the proposed model over the Ghana Stock Exchange (GSE) exhibits high prediction accuracy and better mean absolute error compared with other time-series techniques. It can, therefore, be inferred from the fallouts that the proposed stock-market prediction with MVs, provides an efficient approach to automatic identification and extraction of MVs that affect diverse sector stock and offer an accurate prediction of a stock's future price.


Introduction
In every country, the financial markets play an essential role in the economy, in areas such as allocation, re-allocation, mobilisation, and pricing of capital resources to several stages of monetary intermediation (Asekome and Agbonkhese, 2015;Dosdoğru et al., 2018). However, Macroeconomic Variables (MVs) such as the inflation rate and Gross Domestic Product (GDP) are reported to determine a country's growth (Ratti and Vespignani, 2015;. Thus, the instability in a country's inflation rate or prices leads to the poor performance of the overall economy of a country (Siok et al., 2015).
As the market value of a company is believed to depend on a company's current economic status and imminent perspectives, the value of firms listed on the stock-market of any given country is believed to hinge on the overall economic status quo and imminent perspectives in the country (Peiró, 2015). With this, one can infer that the stock-prices are associated with economic changes happing or anticipated to happen within a country.
The remaining sections of this paper are structured as follows. Section 2 covers a brief description of machine learning, its application in a real-world situation, a review and comparison of stock-market prediction with macroeconomic variables in literature, and th anticipated contribution of the current study. Section 3 discusses the methods and material employed in the study. Section 4 covers the empirical results and discussion. Lastly, Section 5 presents the conclusion and direction for future studies.

Literature Review
This section presents a brief understanding of machine learning, its application in the real world. A short discussion on macroeconomic variables and the stock market price movement and a summary of related works.

Machine Learning (ML)
ML is the practice where, a computer software or robot is said to study from knowledge (K) relating to some group of tasks (T) and evaluation metric (E p ), if E p in task (T) improves with K. Thus making machines behave like humans . ML have been applied in numerous sectors to improve productivity, profit, and efficiency. These sectors includes, healthcare (Choudhury, 2019;Choudhury and Eksioglu, 2019) for disease diagnosis, in education for predicting the academic performance of students (Devasia et al., 2016;Nti and Quarcoo, 2019), in the energy industry for predicting electrical energy demand by consumers  and in agriculture for predicting crop yields (Akshatha and Shreedhara, 2018;Crane-Droesch, 2018).

Economic Variables and Stock Market
Experimental evidence appears to support the view that global stock-markets have usually evolved in close association with local financial-prudence (Peiró, 2015). Therefore, the vicissitudes in macroeconomic variables can have a profound influence on the stock market. This impact of MVs on the economy and the stock market has resulted in many studies from researchers of all occupations, and this section discusses a few of them.
Using autoregressive distributed lag or ARDL model, the changes in global oil-price was found to have a direct effect on domestic inflation in low oil reliance nations and indirectly affecting the domestic inflation in high oil reliance nations (Siok et al., 2015). The joint effect of Gross Domestic Product (GDP), Capacity Utilisation (CAU), an Exchange Rate (EXR), Money Supply (M2) and Inflation (INF) on All Share Index (ASI) in Nigeria was examined by (Asekome and Agbonkhese, 2015). Their results revealed that GDP and INF had a significant association with ASI. On the other hand, their study was silent on the various sectors in which these indicators performed significantly. The relationship between oil price and China's stock market was also carried out by (Wei and Guo, 2017). The study concluded that the price of oil affects the price of a stock, without explicitly indicating which sector of the Chinese economy is affected by the oil price.
The study by (Jareño and Negrut, 2016) in the United States using Pearson correlation shows a statistically significant relationship between GPD, the industrial production index, the unemployment rate, long-term interest rates, and stock return. A significant relationship between the MVs and stock returns in Kenya, Uganda, and Tanzania was also identified by (Laichena and Obwogi, 2015). In Nigeria (Asekome and Agbonkhese, 2015) discovered a significant relationship between GDP and money supply stock returns and insignificant relationship between exchange rate, capacity utilisation, and stock returns using Ordinary Least Squares technique.
The study by (Mutuku and Ng'eny, 2015) revealed a negative relationship between inflation rate and equity movement in Kenyan using Vector Autoregressive (VAR) and Vector Error Correction (VECM). A study, conducted in 2015 in Indian, Bangladesh, Pakistan, and Sri Lanka using VAR and Principal Components Analysis (PCA) revealed that economic factors could not explain stock returns in India. However, economic activity directly explains stock returns of Bangladesh and indirectly explains stock returns of Pakistan and Sri Lanka (Khan et al., 2015).
Several studies globally have also examined the extent to which MVs affect the stock-market and concluded that there is an association between stockprice movement and MVs. These studies, however, did not say which sectors' stock is affected by which MVs.
In Ghana, some researchers' attempted to examine the association between MVs and stock-price on the Ghana Stock Exchange (GSE). Using the Autoregressive Distributed Lag Model (ARDL) and error correction parameterisation techniques, a significant relationship between MVs (exchange-rate, inflation-rate, and interestrate) and stock returns in Ghana was discovered by (Kwofie and Ansah, 2018). A contrary short-run, decisive long-term, and unidirectional causality from inflation to stocks return in Ghana using VECM were revealed by (Issahaku et al., 2013).
A unidirectional causality running from inflation to stock returns in Ghana was also revealed by (Frimpong, 2011). The weak-form efficacy of listed companies on the GSE was analysed by (Ayentimi et al., 2013). The correlation between stock-price and inflation rate using Pearson correlations and linear regression was carried out by (Gyan, 2015). The effect of Liquidity growth and the interest rate on stock-price was examined in (Boachie et al., 2016).
The correlation between exchange-rate and stockprice was evaluated using multiple causality tests and Bayesian Quantile Regression (QR) by (Gideon et al., 2015) whose outcome confirms a positive relationship between exchange-rate and stock-price. The linkage between economic growth and stock-market performance was carried out in (Manu, 2017), which confirms that the increase in the economy of a nation is evident in her stock-market prices. In fact, (Lahmiri, 2011) argues that MVs are better predictors of stock price movement than technical indicators.
Though several studies on MVs and the stock market both locally and globally concluded that MVs are associated either positively or negatively with stockmarket movement, a high percentage of these studies did not explicitly revealed the actual sector stocks where these MVs were directly or indirectly associated.
On the other hand, a high percentage of these studies suffer from two teething troubles that are lack of direction of causative and multicollinearity problem among predictors. Most of these earlier studies were undertaken using a multivariate analysis approach, which lumped up macroeconomic variables such as exchange rate, interest rate, foreign direct investment, money supply, and inflation in one model. According to (Adusei, 2014) it leads to doubt on the acceptability of their outcomes and conclusions.
Secondly, most studies examining macroeconomic variables and stock-price movements were silent on how significant individual macroeconomic variables relate to stock-index from diverse sectors of the economy. Thus, generating an opening in the literature in that the MVs that possibly would affect stocks in the agriculture sector could diverge significantly from the MVs' swaying the banking or oil sector index.
Thirdly, a considerable number of these studies tried to measure the association between MVs and stock-price using time-series methodologies such as ARIMA, ARMA, and GARCH. These statistical techniques or methods are reported to have some defects, according to Weng (2017). They suffer from (a) limited predictive power and (b) restrictive assumptions (Weng, 2017).
Again Caiani et al. (2016) argue that despite the improvements introduced by some researchers to boost the realism of time-series models, their key drawbacks still emasculate their reliability (Caiani et al., 2016).
In addition, these statistical techniques are reported to submit themselves to the theory of linear variation of the stock-prices during a definite period of time and they usually do not support easy-automation process, as they require alteration and adaptation at every single stage, calling for certain uniformities and static nature of the target-data (Bisoi and Dash, 2014).
Furthermore, (Vaisla and Bhatt, 2010) argue that the predictive capability of traditional arithmetical or statistical models has been frequently below par and as these models become complicated, the estimation error escalates.
In pursuit of ways to overcome these deficiencies and limitation of time-series methodologies, numerous market traders, researchers, and analysts have examined countless intelligent-system and machine-learning techniques for measuring the stock-markets' predictions using macroeconomic variables. Some of these techniques used include Support Vector Machine (SVM), Artificial Neural Network (ANN), Probabilistic Neural Networks (PNN), Principal Component Analysis (PCA), Genetic Algorithms (GA), Autoencoders (AD) and decision trees (CART) (Tsai and Hsiao, 2010;Lahmiri, 2011;Ballings et al., 2015).
Nevertheless, almost all these studies paid attention to the stock index prediction and neglected the diversity of MVs that influence different sector indices.
Hence, this paper seeks to address the aforementioned issues by employing a random forest-based feature selection techniques enhanced with leave-one-out crossvalidation tactic and a Long Short-Term Memory Recurrent Neural Network (LSTMRNN) predictive model to: (i) investigate whether and by what means different macroeconomic variables' fluctuations affect the stockmarket liquidity in various areas of the Ghanaian economy. (ii) Predict a 30-day (monthly) stock price in different economic sectors based on macroeconomic variables and (iii) Evaluate proposed prediction model against ARFIMA time-series model. The current study contributes to the body of knowledge as follows: i.
A mongrelised machine-learning model of RF and RNN for effective prediction of stockmarket using macroeconomic variables ii.
A novel approach for eliminating the multicollinearity problem in stock-market prediction with MVs, through an improved leaveone-out cross-validation tactic to handpicked significant and key relevant macroeconomic predictors for a given stock index iii.
An increase to the scanty literature of the emerging stock market, to the measuring of association between macroeconomic variables and stock returns and iv.
A better explanation of which macroeconomic variables affects which sector stocks, to provide an investment risk indication to investors on the Ghana stock market

Materials and Methods
This section introduces the methods and techniques adopted for the development and modelling of the proposed feature selection approach for stock-market prediction based on macroeconomic variables. Figure 1 shows the study workflow diagram for predicting the stock market based on macroeconomic variables. The framework consists of 3 phases: Phase one, phase two, and phase three. In step 1, the empirical datasets Electronic copy available at: https://ssrn.com/abstract=3446053 are downloaded from different online resources. In stage 2, a random forest with an enhanced leave-one-out crossvalidation technique was introduced in selecting most significant-predictors. Phase 3 involves the application of the predictive model based on Long Short-Term Memory Recurrent Neural Network (LSTMRNN) over the most significant features from stage 2.

Dataset and Data-preparation
The study dataset was obtained from three sources. The historical stock prices were downloaded from the GSE official website from January 2002, through December 2018, which includes year high, year low, previous closing price, opening price, closing price, price-change, closing bid price and closing-offer. Stockdata in four economy sectors (Petroleum, Banking, Technology, Pharmaceuticals, and Telecommunication industries) were selected. The macroeconomic variables dataset was obtained from the Bank of Ghana (BoG) official site and https://knoema.com/atlas/Ghana/Povertyrate from January 2002 to December 2018. Table 1 (Appendix 1) shows the forty-two (42) initially selected macroeconomic indicators. These 42 features were selected based on their association with the stock market price movement, as reported in the literature, discussed under section 2 of this study.
Equation (3.1), (3.2) and (3.3) represent a matrix notation of our initial dataset of macroeconomic variables. Let A represent matrix, where each column represents each initially selected feature, which in the current study is fortytwo (42) and (n) be the total records (number of rows):

Data Preprocessing
The downloaded datasets were preprocessed for better and accurate prediction of the machine-learning algorithm. The data pre-processing includes (i) Data integration, (ii) data cleaning, and (iii) data transformation.

Data Cleaning
The complexity and stochastic nature of stock data make it always prone to noise, which might disturb the ML algorithm from studying the structure and trends in data. The Wavelet Transform (WT) as given in Equation (3.4) was applied to the obtained data to free it from noise and resolving data inconsistency. We transformed the data (X ω ), using WT, remove coefficients (a, b) with values more than full a Standard Deviation (STD). We then inverse the transformed coefficients to get new data, free from noise: Electronic copy available at: https://ssrn.com/abstract=3446053

Data Transformation
The clean dataset was normalised within the range of [0, 1], using Equation (3.5) to enhance the performance of the ML algorithm. Where: x ' = The new value obtained after normalisation x = The value to be normalised, x min and x max are the minimum and maximum value of the dataset

Dimensionality Reduction
The Dataset (DS) had forty-two (42) initially selected macroeconomic variable (K). DS was passed through feature selection techniques to reduce dimensionality. The aim was to find a subset (U) to maximise the performance criterion C. U = argmaxC(U), s.t|U| = m, m<<d, where d and m are the feature dimension of the original and selected, respectively. Random Forest (RF) algorithm with an improved leave-one-out cross-validation tactic was used to elite significant macroeconomic predictors.

Random Forest (RF)
RF combines the performance of several decision tree algorithms to predict the value of a variable (Wakefield, 2013;Rodriguez-Galiano et al., 2015). The RF builds several regression trees (N) and averages their results from a received input vector Dataset (DS) of unique features. The RF was applied to the Dataset (DS) to rank the features. The root Means Squared Error (RMSE) obtained by each tree is recorded. The process is repetitive after arbitrarily permuting the values apiece of the independent variables. The resulted difference in errors is average between the nonpermuted and permuted trees and then standardised by the Standard Deviation (STD) of their differences. The significant feature is calculated using Equation (3.6). Where, N represents the total number of a tree, the RMSE of the trees (θ) represented by e θk afore permuting (k), RMSE of trees (θ) after permutation of (k) is e θ,πk . While δ being the STD of the variances concerning e θk and e θ,πk . An independent variable that resulted in a lager GB is considered more important than the one that resulted in a lower GB. The following algorithm was used for the feature selection:

Recurrent Neural Network (RNN)
RNN is one of the classes of Artificial Neural Network (ANN). The RNN can be seen as a Feedforward Neural Network (FFNN) enhanced with feedback loops or backpropagation through time. In RNN an input data cycles via a loop and every decision by the RNN takes into accounts the current input and the knowledge it acquired from the inputs it encountered earlier (Appiah et al., 2019). The decision arrived by RNN at time-step (t-1) affects the decision; it will arrive a moment far-ahead at time step t. That is, the RNN has two input sources, the recent and the present, they amalgamate to estimate how they react to new data.
Basic RNN Algorithm 1. Data (X) is input into the RNN model 2. X is processed using the current context 3. After processing data is output, alongside a new context for the model 4. Repeat 1 to 3 until all data points are processed The simple RNN falls typically into the vanishing gradient and the exploding grading problem. To overcome this, the Long-Short-Term Memory (LSTM) RNN was adopted for the study. Figure 2 shows the network of the RNN enhanced with LSTM. The LSTM is an abstraction of computer memory that works as intended with the RNN; it aids to maintain, update, and regulate the state of the network model outside its normal execution flow. When an RNN is a train-employing backpropagation through time and time, it overcomes the vanishing gradient and the exploding grading problem. Three gates, namely keep, write, and read gates are associated with the RNN. The keep gate retains the data in the information cell, it receives the same input-data and stays as the network, and it then computes how much of the present data should be remembered.
The write gate is accountable for inputting new data into the network, receiving the same input-data and stay at the network; it also receives the RNN output-data from the most current time set, and it uses the input-data to decide how much of the output should be written into the cell. The read gate sends data from the LSTM back into the RNN while the information cell is responsible for holding the data.

RNN is One of the classes of Artificial Neural Net
The choice of optimiser for an LSTM model has a significant effect on how fast the algorithm converges to the minimum value and the ideal of uncertainty to prevent getting trapped in a local minimum and not getting to the global minimum. The Adam (Adaptive Moment Estimation) optimiser was adopted for model optimisation. The adopted optimiser put-together the advantages of two other optimists, namely RMSprop and ADAgrad. The ADAgrad optimiser fundamentally adopts different Studying Rate (SR) for every single parameter and each time-step. The ADAgrad apportions more significant studying rates to irregular parameter while a lesser studying rate is apportioned to recurrent parameters. In an attempt to prevent overfitting of the proposed model during training, the Tikhonov regularisation proposed by (Golub et al., 1999) was adopted and implemented for the study.

Evaluation Metrics
The predictive power of the proposed model was determined using well-known performance metrics in literature which includes (i) Mean Accuracy Error (MAE), as given in Equation (3.7), measures the average size of the errors in a set of predictions, without making an allowance for their direction. It is the average over the test sample of the absolute variances between (ˆi y ) and (y i ) observation where all individual differences have equal weight. (ii) Root Mean Square Error (RMSE). The RMSE is used for measuring model performance, calculating the difference between predicted (ˆi y ) and the actual (y i ) values as given in Equation 3.8. (iii) Relative Absolute Error (RAE) as given in Equation (3.9). (iv) The correlation coefficient (R) as given in Equation (3.10), is a performance index that measures the degree of associations between predicted values and actual values, its value ranges from 0 to 1 and the bigger the R is the better the model performance.

Experimental Results and Discussion
The empirical results of the proposed predictive model with RF and LSTMRNN and comparison with ARIMA model are discussed in this section. All experiments were carried out with R studio.

Essential Factors for Ghana Stock Major Sectors
Forty-two (42) features were selected initially, their significance concerning stock-prices in the petroleum, banking, technology, pharmaceuticals and telecommunication industries were measured and presented. The study revealed that the exchange rate and inflation rate were associated with the stock price movement. On the contrary, individual components of macroeconomic variables associated with different sectors of the economy differ. The following sections discuss in details. Figure 3 shows the ranking of the features as regards petroleum stock-prices. It was revealed that Net Foreign Assets, (i.e., DMBs Net Foreign Asset Monthly) under Monetary Survey recorded the highest importance factor. This result confirms (Asekome and Agbonkhese, 2015) outcome that a positively high association exists between stock-price and money supply. Nonetheless, this study has explicitly revealed which component of money supply relates well with the petroleum sector stock.

Significant Features on Telecommunication Sector Stock
The U.S Dollar was found to be most significant as compared to currencies like the Danish Kroner, Canadian Dollar, Swiss France, and Swedish Kroner in terms of the exchange rate and stock-price, confirming study (Kwofie and Ansah, 2018) that exchange rate associated with stock on the GSE. The results revealed that the U.S dollar is the most significant exchange rate factor as also argue by (Kwofie and Ansah, 2018). The significance ranking of exchange rate variable (U.S dollar) in the petroleum sector, reveals how the U. S dollar impacts petroleum commodity price locally and globally and this can be attributed to the benchmark pricing mechanism of the U.S dollar for most commodities.
The British Pound Sterling (PD) was found to be the thirteenth significant predictors of stocks in the petroleum sector. The study revealed that the Minimum Daily Wage (MDW) was a useful predictor of petroleum sector stocks as compared with the British Pound Sterling. The high positive association of MDW and petroleum stock movement reveals that as the MDW goes up the tendency of people demanding more petroleum products goes up, which in a way affects the prices of petroleum products.
Furthermore, the study revealed that the most significant inflation rate components (Food, Beverages (FB), Alcohol and Tobacco (AT)) were the ninth and eighteenth significant feature, respectively, in the petroleum sector. The results disagree with the outcomes of (Kwofie and Ansah, 2018) that inflation rate is of higher significance compared with the exchange rate. Figure 4 shows the importance features ranking over banking sector stock-prices. The Year-on-Year (YNY) is the higher essential macroeconomic factor in the bank sector sock, followed by the Danish Kroner (DK), Minimum Daily Wages (DMW), the Swedish Kroner (SK) and U.S dollar, as shown in Fig. 4. The study revealed that stock from the banking sectors is highly associated with change rate. This outcome disagrees with (Gyan, 2015) and agrees with (Gideon et al., 2015) that the link between stock in the banking sectors and exchange rate follows the international trade. The results revealed that despite the higher rate of the U.S dollar to the Ghana Cedis (GH¢) as compared with the Danish Kroner and Swedish Kroner, the movement of the stock price in the banking sector is higher associated with Danish Kroner and Swedish Kroner than the U.S dollar. Figure 5 shows the importance of features ranking over the stock price movement in the telecommunication industries. The study reveals that Housing and Utilities (HU) and Savings and Time Deposits (STD) were the highest predictor of the stock price in the telecom industry, followed by transport and communications TC. Again, Foreign Currency Deposits (FCD) was the fifth feature of significance.

Significant Features on Technology Sector Stock
The study further revealed that an exchange rate component Norwegian Kroner (NK) was more of significance in the telecommunication sector stocks than the U.S Dollar (USD). The inflation rate on Clothing and Footwear (CF) was of more significance than the USD.    Figure 6 shows the ranking of the essential features of stock price movement from the technology industries. The results revealed that Total Government Liabilities (TL) were the most significant feature, followed by Savings and Time Deposits (STD), Daily Minimum Wages (DMW), Currency Outside the Bank (COB) and Treasury bill rate for 91 days. The results imply that as the inflow of foreign currency changes, the stock-prices in the technology sectors also changes. It was observed that the top five feature that affects stock price in the technology sector are managed locally. The outcome reveals that the daily minimum wages are a good indicator of variation in stock price movement in the technology industries. Thus, the technological industries do well as more people patronise their services, and people can patronise these services if they earn a higher income.

Essential Factors for Ghana Stock Major Sectors
The essential features of the pharmaceutical industry are as shown in Fig. 7 DMBS  USD  DK  CD  SW  SK  MDW  STD  FB  NK  YNY  NZD  PD  MCHE  CPS  TC  OIN  AT  FCD  CMP  UR  M  CRD  HG  CF  HU  CGR  NFPI  CB  AA  REECS  DD  AD  TT  T91D  RM  COB  TL  GD  BOGNFAM  MS   6   4   2   0   Importance   YNY  DK  MDW  DMBS  SK  USD  AD  SW  CGR  STD  UR  DD  NK  NZD  PD  FCD  TL  CD  JY  OIN  CPS  AA  REECS  NFPI  FB  CF  M  AT  TT  T91D  TC  CB  MCHE  HG  HU  RM  COB  BOGNFAM  GD  CMP  CDR  MC   HU  STD  TC  CB  FCD  NFPI  REECS  NK  CF  HG  USD  TL  FB  CPS  AT  PD  DD  CD  NZD  COB  RM  SK  MDW  AD  MCHE  DMBS  T91D  TT  SW  JY  DK  GD  CMP  CGR  AA  OIN  BOGNFAM  CDR  UR  YNY  MC   8   6   4 2

Importance
Electronic copy available at: https://ssrn.com/abstract=3446053 and New Zealand Dollar) were the top seven (7) most significant features respectively. The results come the reports that most pharmaceutical products are imported into the country and when the exchange rate changes stock within the sector changes. The results reveal a negative correlation between Claims on Government (CGR), Year on Year (YNY), Currency/Deposit Ratio (CDR) and stock price from the pharmaceutical sectors. Again, the results revealed that there is no correction between pharmaceutical sectors stock and government Treasury bill rate (T91D and Japanese Yen (JY), as shown in Fig. 7. Figure 8 shows the top 20 most significant macroeconomic features that are associated with the stock market movement in banking, petroleum, pharmaceutical, telecom, and technology sectors of Ghana's economy.

Essential Factors for Ghana Major Indices
The results reveal that out of the top twenty (20) selected feature from 42 initial feature in each sector understudied in this study, only two (2) features British Pound Sterling (PD) and the Canadian Dollar (CD) representing 10% are associated with stock price movement in all studied sectors of Ghana's economy. While MVs (MDW, SK, SW, STD, and NZD) affects four sectors stock price movement out of the five studies sectors stocks, represent 25% of the top 20 significant features from all sectors stock movement. Again, MVs features (DK, USD, NK, FCD, and MCHE) were found to be associated with at most three of studied sectors in this study.
The study reveals that the exchange rate is the most significant features the predicts the movement of the stock on the GSE, confirming (Mireku et al., 2013;Asekome and Agbonkhese, 2015;Gideon, Maurice, and Magnus, 2015;Siok et al., 2015) results. On the other hand, these factors were not the most significant in all economic sectors in the current study.
Even though the US Dollar and the Danish Kroner recorded high significance in petroleum, pharmaceuticals and banking industries; the British Pound Sterling is of more effects on the movement of the stock price in all sectors as compared with the USD and DK.
It was also revealed that the Minimum Daily Wages (MDW) were of significant in four sectors as compared with the U.S dollar this implies that for every thousand stock on the GSE, the MDW is a good predictor of eight hundred of these listed stock movement than the USD. Furthermore, it was revealed that the MDW was a common feature in the telecom and technology industry.     A a : ARIMA model; L b : LSTMRNN proposed model

Predicting the GSE
The twenty (20) top features of each sector were selected from the feature importance ranking, given a new subset data (DS new ) for each selector economic sector for our prediction experiment. Every DS new was then partitioned into three datasets, training Dataset (DS Train ) which constitute 75% of DS new , 20% was for testing (DS Test ), and the remaining 5% was for validation. The DS Train of each sector was fed separately into the LSTM RNN to train the network, and the pattern learned from the model was used on DS Test to predict a 30-day stock price and compared with ARIMA timeseries model on the same dataset based on the selected error metrics. The outcomes are as shown in Table 2. The results, as shown in Table 2, point out the superiority of the proposed (LSTMRNN) model over the ARIMA model in predicting the stock-market price using macroeconomic variables. About R, MAE, RMSE, RAE, and RRSE, the LSTMRNN outperformed the ARIMA model comparing its error performance metric values to that of the ARIMA. They are respectively smaller in all sector stock compared with that of the ARIMA model. The outcomes imply that the proposed model achieved a smaller variance in individual errors.
Subsequently, the proposed (LSTMRNN) model predicted approximately 89.57% accuracy side-byside 62.34% for the ARIMA. These results confirmed the critiques of (Vaisla and Bhatt, 2010;Bisoi and Dash, 2014;Caiani et al., 2016;Weng, 2017) on time series model for stock-market predictions explained in section 2 of this study.
A decreased in simulation run time and increased in success rate was observed, when the RF algorithm was applied to selected features with the highest importance rate, which enhanced the efficiency of the (LSTMRNN) model. Errors in prediction decreased by 7.1%. Applying all 42, initially selected MVs caused a decrease in success. All the same, quantitatively, not much prediction accuracy was realised with a very small sub-dataset. Finally, the results revealed that macroeconomic factors are good predictors of stock-market volatility.

Conclusion and Recommendations for Future Works
Several previous studies aimed at finding the relationship between stock market volatility and MVs. Contrariwise, most of these studies have relied on a timeseries model, which are reported to have some deficiencies in stock prediction. Works that applied computational intelligence and machine learning techniques for predicting the stock market using macroeconomic variables also did focus on predicting the stock-price movement, ignoring the relationship among the macroeconomic variables and sector stocks.
The current study was aimed at identifying the degree of association between MVs and stock price movement in the various economic areas such as banking, pharmaceuticals, telecommunication, technology, and petroleum on the GSE. The results revealed that exchange rate components Pound Sterling (PD) and the Canadian Dollar (CD) were the most MVs features that YNY  DK  MDW  DMBS  SK  USD  AD  SW  CGR  STD  UR  DD  NK  NZD  PD  FCD  TL  CD  JY  OIN  FB  MCHE  CPS  TC  AT  CMP  AA  M  RM  COB  T91D  HG  CF  BOGNFAM  TT  HU  NFPI  REECS  FCD  CM   35  30  25  20  15  10  5  0 Banking Petroleum Pharmaceuticals Technology Telecom affect all four studied sectors stock price movement in the GSE. The Net-Foreign-Assets under monitory survey was highly related to stock prices within the petroleum sector as against exchange rate (US dollar and Canadian dollar) which was found to be higher associated with stock-prices in the banking and pharmaceutical sectors. The daily minimum wage was found to be higher associated with stock from the technology. Unemployment Rate (UR) was found to be a significant factor associated with only banking sector stocks. These results confirm that fluctuations in macroeconomic variables influence the stock volatility on the GSE. On the other hand, the weights of the influence of each macroeconomic variable on the stock price movement from different sectors of the Ghanaian economy differ from one macroeconomic variable to the other.
The proposed hybrid predictive model of enhanced RF and LSTMRNN was benchmarked with the ARIMA model, in an experiment with the real-world stock market and macroeconomic variables dataset from the GSE and BoG. The low values of error metrics (R, MAE, RMSE, RAE, and RRSE) recorded by the proposed model as against the ARIMA, indicated better accuracy in prediction by the proposed model.
The reduction in computational time and a slight increase in accuracy after the application of the enhanced leave-one-out feature selection algorithm clearly shows how vital feature selection is in machine learning.
Notwithstanding the degree of association revealed in the current study between MVs and stock-market volatility, the effect of socioeconomic and behavioural economics theory of finance as argued in (Chen et al., 2014) cannot be overlooked. Hence, future studies should include other factors such as social media sentiment and web financial news to examine a great feature-pool to the treasure trove. To determine if the prediction accuracy upsurges by picking more features as input to a predictive model.