Long Short-Term Memory Network for Predicting Exchange Rate of the Ghanaian Cedi

An accurate prediction of the Exchange Rate (ER) serves as the basis for effective financial management, monetary policies, and long-term strategic decision making worldwide. A stable and competitive ER enables economic diversification. Economists, researchers, and investors have conducted several studies to predict trends and facts that influence the ER’s rise or fall. This paper used the Long Short-Term Memory Networks (LSTM) framework to predict the weekly exchange rate of one Ghanaian Cedis (GH FinTech 2022, 1, Firstpage–Lastpage. https://doi.org/10.3390/xxxxx www.mdpi.com/journal/fintech Article Long Short-Term Memory Network for Predicting Exchange R te of the Ghanaian Cedi Adebayo Felix Adekoya, Isaac Kofi Nti * and Benjamin Asubam Weyori Depart ent of Computer Scie ce and Informatics, Univer ity of Energy and Natural Resources, Sun ni BS0000, G ana; adebayo. dekoya@uenr. du.gh (A.F.A.); benjamin.weyori@uenr.edu.gh (B.A.W.) * Correspondence: isaa .nti@uenr.edu.gh or ntious1@gmail.com; Tel.: +233-208-736-247 Abstract: An accurate pr diction of the Exc ange Rate (ER) serves as the basis for effective financial management, monetary policies, and long-term strategic decision making worldwide. A stable and competitive ER enable economic diversif cation. Economists, researchers, and investors have conducted several studies to predict trends and facts that influence th ER’s rise or fall. This paper used the Long Short-Ter Memory Networks (LSTM) framework to predict the weekly exchange rate of one Ghanaian e is ₵) to three different currencies (United States Dollar, British Pound, and Euro), using Google Trends and historical macroeconomic data. We fused past exchange rates, fundamental macroeconomic variables, commodity prices (cocoa, gold, and crude oil) and public search queries (Google Trends) as input parameters. An empirical analysis using publicly available ER data from the Bank of Ghana (BoG) from January 2004 to October 2019 showed satisfactory results. We observed that the proposed LSTM model outperformed the Support Vector Regressor (SVR) and Back-propagation Neural Network (BPNN) models in accuracy and closeness metrics. That is, our LSTM model obtained (MAE = 0.033, MSE = 0.0035, RMSE = 0.0551, R2 = 0.9983, RMSLE = 0.0129 and MAPE = 0.0121) compared with SVR (MAE = 0.05, MAE = 0.005, RMSE = 0.0683, R2 = 0.9973, RMSLE = 0.0191 and MAPE = 0.0241) and BPNN (MAE = 0.04, MAE = 0.0056, RMSE = 0.0688, R2 = 0.9974, RMSLE = 0.0172 and MAPE = 0.0168). Moreover, we observed a strong positive correction (0.98–0.99) between Google Trends on the currency of focus and its exchange rate to the Ghanaian cedis. The study results show the importance of incorporating public search queries from search engines to predict the ER accurately. An accurate pr diction of the Exc ange Rate (ER) serves as the basis for effective financial management, monetary policies, and long-term strategic decision making worldwide. A stable and competitive ER enable economic diversif cation. Economists, researchers, and investors have conducted several studies to predict trends and facts that influence th ER’s rise or fall. This paper used the Long Short-Ter Memory Networks (LSTM) framework to predict the weekly exchange rate of one Ghanaian e is ₵) to three different currencies (United States Dollar, British Pound, and Euro), using Google Trends and historical macroeconomic data. We fused past exchange rates, fundamental macroeconomic variables, commodity prices (cocoa, gold, and crude oil) and public search queries (Google Trends) as input parameters. An empirical analysis using publicly available ER data from the Bank of Ghana (BoG) from January 2004 to October 2019 showed satisfactory results. We observed that the proposed LSTM model outperformed the Support Vector Regressor (SVR) and Back-propagation Neural Network (BPNN) models in accuracy and closeness metrics. That is, our LSTM model obtained (MAE = 0.033, MSE = 0.0035, RMSE = 0.0551, R2 = 0.9983, RMSLE = 0.0129 and MAPE = 0.0121) compared with SVR (MAE = 0.05, MAE = 0.005, RMSE = 0.0683, R2 = 0.9973, RMSLE = 0.0191 and MAPE = 0.0241) and BPNN (MAE = 0.04, MAE = 0.0056, RMSE = 0.0688, R2 = 0.9974, RMSLE = 0.0172 and MAPE = 0.0168). Moreover, we observed a strong positive correction (0.98–0.99) between Google Trends on the currency of focus and its exchange rate to the Ghanaian cedis. The study results show the importance of incorporating public search queries from search engines to predict the ER accurately.


Introduction
The exchange rate is considered the relative price, indicating a lo in terms of another currency. One of the significant issues in the dis economy today is centred around the ER. Practically, every economy relies massively on the Foreign Exchange Rate (ER) to determine its m An upsurge in monetary policy uncertainty causes the depreciation against the local currency [2,3]. Therefore, understanding the relat and monetary policies uncertainty is a fundamental requirement fo propriate monetary policy [2,3]. In addition, the production rate of a rometer of its international attractiveness or competitiveness, port management are greatly influenced by ER [4][5][6][7][8]. Thus, volatility in the severe consequences on countries, investors, companies, policymak [9,10]. For example, variations in ER make returns on investment u affecting investment decisions. Therefore, there is a need for efficient tive models that can track the current dynamics of the ER and predict particularly in periods where the ER frequently fluctuates [4].

Introduction
The exchange rate is considered the relative price, indicating a local currency's value in terms of another currency. One of the significant issues in the discussion of the world economy today is centred around the ER. Practically, every economy in this 21st century relies massively on the Foreign Exchange Rate (ER) to determine its monetary policies [1]. An upsurge in monetary policy uncertainty causes the depreciation of foreign currencies against the local currency [2,3]. Therefore, understanding the relationship between ER and monetary policies uncertainty is a fundamental requirement for establishing an appropriate monetary policy [2,3]. In addition, the production rate of a country and the barometer of its international attractiveness or competitiveness, portfolio allocation, and management are greatly influenced by ER [4][5][6][7][8]. Thus, volatility in the ER has far-reaching severe consequences on countries, investors, companies, policymakers, and consumers [9,10]. For example, variations in ER make returns on investment undefined, negatively affecting investment decisions. Therefore, there is a need for efficient and reliable predictive models that can track the current dynamics of the ER and predict its future behaviour, particularly in periods where the ER frequently fluctuates [4].

Introduction
The exchange rate is considered the relative price, indicating a local currency's value in terms of another currency. One of the significant issues in the discussion of the world economy today is centred around the ER. Practically, every economy in this 21st century relies massively on the Foreign Exchange Rate (ER) to determine its monetary policies [1]. An upsurge in monetary policy uncertainty causes the depreciation of foreign currencies against the local currency [2,3]. Therefore, understanding the relationship between ER  ) to three different currencies (United States Dollar, British Pound, and Euro) based on features mentioned earlier. This paper adopted the LSTM because, according to Chen et al. [26], it can achieve better predictive performance than the autoregressive integrated moving average, support vector regression, and adaptive network fuzzy inference system [26]. Additionally, LSTM algorithms are reported to outperform state-of-the-art techniques regarding noise tolerance and accuracy for time-series classification [27].
Our study contributes to the literature by examining the uncertain relationships between Google Trends (public sentiments), macroeconomic variables (such as inflation rates, interest rates, unemployment rate, and composite consumer price) on one Ghanaian Cedis (GH Abstract: An accurate prediction of the Exchange Rate (ER) serves as the basis for effective financial management, monetary policies, and long-term strategic decision making worldwide. A stable and competitive ER enables economic diversification. Economists, researchers, and investors have conducted several studies to predict trends and facts that influence the ER's rise or fall. This paper used the Long Short-Term Memory Networks (LSTM) framework to predict the weekly exchange rate of one Ghanaian Cedis (GH₵) to three different currencies (United States Dollar, British Pound, and Euro), using Google Trends and historical macroeconomic data. We fused past exchange rates, fundamental macroeconomic variables, commodity prices (cocoa, gold, and crude oil) and public search queries (Google Trends) as input parameters. An empirical analysis using publicly available ER data from the Bank of Ghana (BoG) from January 2004 to October 2019 showed satisfactory results. We observed that the proposed LSTM model outperformed the Support Vector Regressor (SVR) and Back-propagation Neural Network (BPNN) models in accuracy and closeness metrics.  We seek to answer some questions concerning the dynamics of ER in Ghana, a developing economy. Again, what enrichment can be achieved in exchange rate predictability using information fusion from historical data and public search queries (Google Trends).
To the best of our knowledge, no previous study examined exchange rate dynamics in Ghana based on public search queries (Google Trends) and fundamental economic variables. This paper seeks to close this gap in the literature on the predictability of ER using information fusion from historical data (fundamental economic variables) and public search queries (Google Trends). Furthermore, we employ a more advanced soft-computing paradigm, deep learning technique, and Long Short-Term Memory networks (LSTM). As a result, we find answers to whether the ER fluctuation in Ghana depends on public search queries (Google Trends) or historical macroeconomic data.
Ghana was chosen as the case study of the current study because the Ghanaian Cedis (GH

Introduction
The exchange rate is considered the relative price, indicating a local currency's value in terms of another currency. One of the significant issues in the discussion of the world economy today is centred around the ER. Practically, every economy in this 21st century relies massively on the Foreign Exchange Rate (ER) to determine its monetary policies [1]. An upsurge in monetary policy uncertainty causes the depreciation of foreign currencies against the local currency [2,3]. Therefore, understanding the relationship between ER and monetary policies uncertainty is a fundamental requirement for establishing an appropriate monetary policy [2,3]. In addition, the production rate of a country and the barometer of its international attractiveness or competitiveness, portfolio allocation, and management are greatly influenced by ER [4][5][6][7][8]. Thus, volatility in the ER has far-reaching severe consequences on countries, investors, companies, policymakers, and consumers [9,10]. For example, variations in ER make returns on investment undefined, negatively affecting investment decisions. Therefore, there is a need for efficient and reliable predictive models that can track the current dynamics of the ER and predict its future behaviour, particularly in periods where the ER frequently fluctuates [4]. ) has been several times considered as one of the worst currencies in the world [10]. Again, the extraordinary degree of instability in the Ghana cedi exchange rate is another influential factor. Furthermore, the continual depreciation in the Ghanaian currency has resulted in losing confidence, which contributes to a great extent of dollarisation in the economy. Moreover, the literature shows that most Ghanaian entrepreneurs' significant concern is the ER's instability between the Ghanaian Cedis and the United States (US) dollar, impacting their business negatively [5,28].
Therefore, this paper addresses the relationship between fundamental macroeconomic variables, commodity prices (cocoa, gold, and crude oil), and public search queries (Google Trends) from a machine learning and data science perspective; on ER's characterisation and behavioural performance in Ghana. Thus, to the best of our knowledge, this work is the first attempt to address this issue from soft computing and machine learning paradigms based on public search queries, commodity prices, and fundamental economic variables to predict Ghana's exchange rate. It will, therefore, serve as a reference point for the comparison of future studies on predicting the exchange rate of the Ghanaian Cedis based on soft computing techniques. We hypothesise that: (i) Enhancement can be achieved in exchange rate predictability using information fusion from historical microeconomic data and public search queries (Google Trends). (ii) The long short-term memory offers a better prediction accuracy than the traditional statistical models.
The remaining sections of the current study are presented as follows. Section 2 presents a review of pertinent literature. In Section 3, we present details of the methods and techniques adopted for this study. Section 4 presents the results and discussion, and finally, in Section 5, we present the conclusion of this study.

Related Works
The act of predicting ER has been in existence for countless centuries, where diverse models yield different predicting results, either out-of-sample or in-sample [29]. However, the current financial chaos around the world establishes the ER's perfect information [1]. As a result, many studies have examined the causes and impact of ER fluctuations. Table 1 shows a summary of pertinent literature to this study. The review was categorised based on (i) the techniques adopted by a study, (ii) study origin, and (iii) accuracy and closeness metrics for evaluation.
Our partial search of the literature shows that several studies [5,9,10,12,22,28,30,31] have looked at the impact of essential macroeconomic variables such as current account balance, inflation, annual gross domestic product (GDP), growth rate, monetary policy-rate, quasi money supply per GDP, and the total external debt on the exchange rate of the local currency against foreign currencies. As seen in Table 1, a high percentage of these studies used conventional time series models. However, literature shows that these techniques suffer from two common defects (i) restrictive assumptions and (ii) limited predictive power. Notwithstanding the improvement made on these techniques by different researchers to boost their accuracy, their key drawbacks still undermine their reliability [16,32]. They also do not support the easy-automation process, as they require adjustment and adaptation at every stage, calling for certain standardisations and the static nature of the target data [14,33].
Other studies [12,16,24,31,[34][35][36][37] applied soft computing paradigms to examine the predictability of ER as a means of overcoming the deficiencies in the conventional time series models. However, they examined ER predictability based on other macroeconomic variables, leaving enough information hidden in public views.
Subsequently, the adopted models used in [12,38] are prone to long-term dependency problems because they do not have a memory block and cannot store their previous values in a sequence dataset [16]. Therefore, they struggle to learn fluctuating datasets, such as the exchange rate. Accordingly, any neural architecture with a memory to store previous data can handle long-term dependency problems and help diminish this error and improve prediction accuracy.

Materials and Methods
This section presents the methods and techniques adopted for data collection and modelling of the dataset. Figure 1 shows the workflow diagram, which provides the framework of the proposed ER prediction model. The framework has four phases, namely: (i) data download and integration, (ii) data pre-processing and partition, (iii) LSTM model, and (iv) model evaluation phase.

Introduction
The exchange rate is considered t in terms of another currency. One of economy today is centred around the relies massively on the Foreign Excha An upsurge in monetary policy uncer against the local currency [2,3]. Ther and monetary policies uncertainty is propriate monetary policy [2,3]. In ad rometer of its international attractive management are greatly influenced by severe consequences on countries, in [9,10]. For example, variations in ER affecting investment decisions. Theref tive models that can track the current d particularly in periods where the ER f   official website is used. We selected these three currencies for this study because, at the time of the study, they were the top daily interbank forex rates (https://societegenerale.com. gh/en/your-bank/foreign-exchange-rates/, https://www.bog.gov.gh/treasury-and-themarkets/daily-interbank-fx-rates/, accessed on 20 December 2019) in Ghana compared with other currencies. The ER dataset was approximately 4445 days, which included buying-price, selling-price, and mid-rate. We calculated the weekly ER return (ER d ) of the buying-price, using Equation (1) as defined by Owusu et al. [10], where ER d . is the weekly compounded return, (P d ). is the current buying price and (P d − 5) is the previous week buying price. Our weekly estimation excluded the weekends (Saturdays and Sundays). The (ER d ). labels are denoted by y = {y d }, where y d represents the ER return class on a date (d).
Google Trends Data (GTD): Google Trends is a service provided by Google that offers a time series index of the volume of Internet search queries on search phrases entered by its users into the Google search engine. The search index data are provided weekly and monthly; the index data provided is in the range of (0-100), where zero represents the lowest and 100 a maximum value for the search date. A total of 283 records was downloaded from Google Trends using the Pytrends API and Python. For this study, the geographical area of the trend was limited to Ghana. The dataset is from January 2004 to November 2019. Google Trends index is selected as one of our input features for this study because it has been proven to be a good predictor in financial analysis. For example, in exchange rate [22], sck market analysis [42][43][44][45] and exchange rate prediction [46,47]. The GT dataset is represented by a vector G ∈ L×B , where B = features of GTI {G ID, d, I}, GID = unique ID assigned to each GTI record, d = GTI date, I = quantitative value of GT.
Macroeconomic Data (MD): The literature [5,9,21,22] has shown that fluctuations in ER in the short or long run are deeply impacted by macroeconomic fundamentals such as inflation, price level, composite consumer price, and interest rates. The MD was downloaded from the official websites of the Bank of Ghana (BoG). A total of thirty-three (33) monthly macroeconomic variables were selected initially, and a detailed description is shown (Table A1 Appendix A). The MD is represented by a vector M data ∈ P×Q for each (M data ) its quantitative feature is represented by where where Q is the number of feature, x pQ = values on Q th feature, and P is the number of records. Next, we integrated the two datasets (GT). and (MD). using the date variable as the index with the Pandas library and Python to get our new dataset (DS). Let vector ϕ holds the final combination of the GT and MD defined vectors above. Finally, we apply a tactic to merge all features of GT and MD as a single vector, which is defined as is the combined dataset observed on the day (d + 1). The prediction was modelled mathematically as a function f (ϕ) → y t+d , i.e., the combined data is expressed as ϕ d ∈ M×N .

Data Pre-Processing and Partitioning
The accuracy of machine learning algorithms depends on data quality [21]. Hence, for better performance, we replaced all missing values in (DS) with an average value. Seasonality is relatively typical in economic time series, which may obscure the signal to be model, and in turn, may give a strong signal to the forecast model. Hence, we visualised the study data to identify patterns of seasonality and trend. We then adopted a differencing over rolling mean function in Pandas (https://pandas.pydata.org/ accessed on 9 September 2021) to treat identified seasonal components. The differencing was performed by subtracting the previous observation (x t−1 ) from the current observation (x). The clean data was then scaled in the range of [0,1], using Equation (2). Thus, we divide each value (x i ) in the dataset with the maximum value (x max ) in our dataset to get a new value (x newi ). We partitioned the clean dataset into two sets, 80% for training the model and 20% for testing the model, using the skirt-learn (https://scikit-learn.org/stable/ accessed on 9 September 2021) library and Python (https://www.python.org/ accessed on 9 September 2021).

Machine-Learning Model
There are numerous machine learning algorithms applicable to analysing financial data. However, the Long Short-Term Memory networks (LSTM) algorithm is adopted for this study. The choice to use LSTM was based on its competence to learn long-term dependencies, overcome the gradient vanishing problem, better predict the effect, learn past ER price data, and find out the relationship between time series [18,35,37,40]. The Long Short-Term Memory networks (LSTM) was introduced in 1997 by Hochreiter and Schmidhuber [48]. It came as a solution to the gradient vanishing problem faced by the Recurrent Neural Network (RNNs). Since then, it has received several advancements by different researchers [48]. LSTM has been applied in many areas to solve complex problems due to avoiding long-term dependency problems capabilities. Figure 2 shows a single LSTM block, having a memory cell represented as C t and three gates. Thus, forget the gate f t ∈ [0, 1], the input gate i t ∈ [0, 1],. and the output gate o t ∈ [0, 1]. The flow of information in the LSTM block passes through the write operation from the input gate, deleting at the forget gate, and reading from the cell's memory state by the output gate. The input gate selects information from the candidate memory cell (C t ) to update the cell state. With its output gate serving as a filter, the LSTM block selects only pertinent information at its output. Using a Sigmoid function (Equation (3)), the forget gate f t ∈ [0, 1] (as expressed in Equation (4)) chooses what information must be discarded from the state over the inputs Y t•1 and X t .
where (Y t−1 ) is the output from the preceding hidden layer and X t . which aids as the input from outside the network. The next step chooses which new information is to be stored in the cell state. Thus, a Sigmoid layer (i t ) (expressed by Equation (5)) outputs the updating value, and a hyperbolic tangent (tanh) layer (expressed by Equation (5)) creates a vector value a t (expressed in Equation (7)). Element-wise multiplication of these two layers was used while updating the cell state C t−1 and C t . This process is accomplished by adding the multiplication of the old state C t−1 and f t with i t ×č. The final phase is the output operation, where the filtering version of the cell stage represents the output. The first output gate chooses which value of the cell state reaches the output (expressed by Equation (8)).
The cell state is then passed through tanh layer (o t ) (expressed by Equation (9)) and multiply with the output gate's outcome to get the ultimate output (Y t ) (expressed by Equation (10)). For practical applications, an appropriate quantity of LSTM blocks is combined to form a layer.
Choosing the right optimiser is crucial for an LSTM model because it significantly affects the algorithm's convergence rate [21]. For this study, the Adam (Adaptive Moment Estimation) optimiser was adopted for model optimisation. The Adam was adopted because it combines the strength of two other optimisers, namely ADAgrad and RMSprop. Furthermore, Tikhonov regularisation was adopted to prevent the overfitting of our model during training [16]. Finally, the back-propagation training algorithm was employed to train our LSTM. The input data size and time steps impact the complexity and performance of the LSTM network.
Consequently, we designed each LSTM layer to accommodate 20 LSTM blocks, with each block linking to a timestep in the dataset to be supplied into the network. Table 2 shows the hyperparameters setting of our LSTM model for the current study. The Kares library and Python was used in the implementation of the LSTM.

Theoretical Background of Benchmark Models
This section gives a brief description of two machine-learning algorithms used as benchmark models for comparing the performance of our proposed deep LSTM model. Namely, Support Vector Regressor (SVR) and Back-propagation Neural Network (BPNN).

Support Vector Regressor
Cortes and Vapnik (1995) introduced the support vector regressor with a minor modification but used the same principles as the support vector classifier [49]. Thus, it can be effectively be applied in solving linear and nonlinear tasks when data points and their features are limited. A training dataset (D S ) with N data points is given, as defined in Equation (11). (11) where x i = input independent variable, y i = correspondent dependent output, and d = dimension of the input space. The application of the SVR gives a linear regression function as defined in Equation (12).
where f(x) = predicted values, β(x) = a linear function in terms of x, and W T = weight factor and b = bias parameter. BP (Back-Propagation) neural network (BPNN) algorithm is among the commonly and popularly used supervised techniques for optimising the training of feed-forward neural networks [50,51]. It was proposed Rumelhart, Hinton, and Williams in 1986 cited in [50], the BPNN learns by computing the errors of the NN output layer to discover the errors in its hidden layers; this makes the BPNN suitable in solving problems for which no association can be found amid the output and inputs. Thus, the BPNN has become the favourite technique for training a multilayer perceptron (MLP) [50][51][52].

Evaluation Metrics
Several statistical techniques are available for measuring the performance of machine learning models. However, for this study, we used two closeness metrics, namely: Root Mean Square Error (RMSE) (expressed by Equation (13)), Mean-Absolute-Error (MAE) (expressed by Equation (14)), Correlation Coefficient (R 2 ) (expressed by Equation (15)) Mean absolute percentage error (MAPE) (expressed by Equation (16)), Mean Square Error (MSE) (expressed by Equation (17)), and Root Mean Squared Log Error (RMSLE) (expressed by Equation (18)). These metrics directly explain measurement units, giving better goodness of fit and efficiency.
FinTech 2022, 1 y i are the average values of (t i ) and (y i ), respectively. (y i ) = the predicted value produced by the model, (t i ) = the actual value, and n is the total number of testing data.

Results and Discussions
We experimented with our proposed framework for ER prediction to evaluate its performance. All experiments were carried out on an HP laptop (Spectre x360) eight Generation Intel ® Core™ i7 processor 16.0 GB RAM. We present the experimental results and discussions in two parts; the visualisation and statistical analysis of study data are presented, followed by our exchange rate prediction outcome. Keywords: long-short-term-memory-networks; e

Introduction
The exchange rate is considered the rela in terms of another currency. One of the sig economy today is centred around the ER. Pr relies massively on the Foreign Exchange Ra An upsurge in monetary policy uncertainty

Introduction
The exchange rate is considered the relative price, indicating a local in terms of another currency. One of the significant issues in the discus economy today is centred around the ER. Practically, every economy in relies massively on the Foreign Exchange Rate (ER) to determine its mon

Introduction
The exchange rate is considered the relative p in terms of another currency. One of the significa economy today is centred around the ER. Practica against the USD, EUR, and GBP, which affirm literature [5,9,10,28,31,53].   Table 3. Descriptive statistics of study data. Figure 3. Visualisation of study datasets. Table 3 shows a statistical analysis of the study data. It was observed that from January 2004 to October 2019, the exchange rate of USD to GHS varied between GH₵ (0.8124 and 5.3399). While EUR to GHS was within GHS (1.2207-5.9845) and GBP to GHS was GHS (1.5353-6.9521). This result shows that, on average, there is a monthly rise of GH₵ 0.0254 in USD to GHS, GH₵ 0.02676 in EUR to GHS, and GH₵ 0.03043 in GBP to GHS exchange rates.   3 shows a statistical analysis of the study data. It was obs uary 2004 to October 2019, the exchange rate of USD to GHS varied b and 5.3399). While EUR to GHS was within GHS (1.2207-5.9845) an GHS (1.5353-6.9521). This result shows that, on average, there is a m 0.0254 in USD to GHS, GH₵ 0.02676 in EUR to GHS, and GH₵ 0.0 exchange rates.  Figure 3. Visualisation of study datasets. Table 3 shows a statistical analysis of t uary 2004 to October 2019, the exchange rate and 5.3399). While EUR to GHS was within GHS (1.5353-6.9521). This result shows tha 0.0254 in USD to GHS, GH₵ 0.02676 in EU exchange rates.

Introduction
The exchange rate is conside in terms of another currency. On economy today is centred aroun relies massively on the Foreign E An upsurge in monetary policy u against the local currency [2,3]. and monetary policies uncertain propriate monetary policy [2,3]. rometer of its international attra management are greatly influenc severe consequences on countri [9,10]. For example, variations in affecting investment decisions. T tive models that can track the cur Keywords: long-short-term-memory-networks; exchange rate; Ghanai

Introduction
The exchange rate is considered the relative price, indicatin in terms of another currency. One of the significant issues in th economy today is centred around the ER. Practically, every eco relies massively on the Foreign Exchange Rate (ER) to determin An upsurge in monetary policy uncertainty causes the deprecia against the local currency [2,3]. Therefore, understanding the and monetary policies uncertainty is a fundamental requireme propriate monetary policy [2,3]. In addition, the production rat rometer of its international attractiveness or competitiveness, management are greatly influenced by ER [4][5][6][7][8]. Thus, volatility severe consequences on countries, investors, companies, polic [9,10]. For example, variations in ER make returns on investm affecting investment decisions. Therefore, there is a need for eff Keywords: long-short-term-memory-networks; exchan

Introduction
The exchange rate is considered the relative in terms of another currency. One of the significa economy today is centred around the ER. Practic relies massively on the Foreign Exchange Rate (E An upsurge in monetary policy uncertainty caus against the local currency [2,3]. Therefore, unde and monetary policies uncertainty is a fundame propriate monetary policy [2,3]. In addition, the rometer of its international attractiveness or co management are greatly influenced by ER [4][5][6][7][8]. T severe consequences on countries, investors, co [9,10]. For example, variations in ER make retur affecting investment decisions. Therefore, there i

Introduction
The exchange rate is considered the relative price, indic in terms of another currency. One of the significant issues i economy today is centred around the ER. Practically, every relies massively on the Foreign Exchange Rate (ER) to determ An upsurge in monetary policy uncertainty causes the depr against the local currency [2,3]. Therefore, understanding and monetary policies uncertainty is a fundamental requir propriate monetary policy [2,3]. In addition, the production rometer of its international attractiveness or competitiven management are greatly influenced by ER [4][5][6][7][8]. Thus, volati severe consequences on countries, investors, companies, p [9,10]. For example, variations in ER make returns on inve affecting investment decisions. Therefore, there is a need fo tive models that can track the current dynamics of the ER an particularly in periods where the ER frequently fluctuates     Thus, the results obtained ( Figures 5-7) show that the exchange rate between the Ghanaian Cedis and GBP, USD, and EUR are not equally affected by the same macroeconomic variables. Additionally, the inflation rate affects the Ghanaian Cedis' exchange rate to EUR, GBP, and USD ( Figures 5 and 6); however, not as deep as reported in [28,53]. On the other hand, the study outcome affirms Adusei and Gyapong's [5] claims that the monetary survey has a positive relationship with the Ghanaian cedi USD exchange rate. Therefore, we group the remaining outcome of this paper into two sub-sections: prediction outcome with only Macroeconomic Dataset (MD) as input variables and combination of Google Trends Dataset (GTD) and MD as the input dataset.

Prediction with Macroeconomic Variables
We sought to examine the predictability of one Ghanaian cedi to three other foreign currencies based on the internal and external economic factors. Ten (10) top-most features out of the 33 macroeconomic variables were selected as input to our predictive model. Keywords: long-short-term-memory-networks

Introduction
The exchange rate is considered the re Abstract: An accurate prediction of the Exchange Rate (ER) serves as the basis for effective financial management, monetary policies, and long-term strategic decision making worldwide. A stable and competitive ER enables economic diversification. Economists, researchers, and investors have conducted several studies to predict trends and facts that influence the ER's rise or fall. This paper used the Long Short-Term Memory Networks (LSTM) framework to predict the weekly exchange rate of one Ghanaian Cedis (GH₵) to three different currencies (United States Dollar, British Pound, and Euro), using Google Trends and historical macroeconomic data. We fused past exchange rates, fundamental macroeconomic variables, commodity prices (cocoa, gold, and crude oil) and public search queries (Google Trends) as input parameters. An empirical analysis using publicly available ER data from the Bank of Ghana (BoG) from January 2004 to October 2019 showed satisfactory results. We observed that the proposed LSTM model outperformed the Support Vector Regressor (SVR) and Back-propagation Neural Network (BPNN) models in accuracy and closeness metrics. Abstract: An accurate prediction of the Exchange Rate (ER) serves as the basis for effective financia management, monetary policies, and long-term strategic decision making worldwide. A stable an competitive ER enables economic diversification. Economists, researchers, and investors have con ducted several studies to predict trends and facts that influence the ER's rise or fall. This paper used the Long Short-Term Memory Networks (LSTM) framework to predict the weekly exchange rate o one Ghanaian Cedis (GH₵) to three different currencies (United States Dollar, British Pound, and Euro), using Google Trends and historical macroeconomic data. We fused past exchange rates, fun damental macroeconomic variables, commodity prices (cocoa, gold, and crude oil) and publi search queries (Google Trends) as input parameters. An empirical analysis using publicly availabl ER data from the Bank of Ghana (BoG) from January 2004 to October 2019 showed satisfactory re sults. We observed that the proposed LSTM model outperformed the Support Vector Regresso The results show that the exchange rate between the Ghanaian cedi and the USD can be predicted with a modest accuracy rate. Hence, like other previous studies [5] and [10,28,31,53], the outcome of this study also affirms the association between exchange rate variations and fundamental macroeconomic factors.

Prediction with Macroeconomic Variables and Google Trend
The Google Trends index was integrated with ten (10) selected macroeconomic features to constitute the input dataset for better prediction accuracy. Figure 11 shows the prediction outcome (GHS to USD) with a macroeconomic variable and Google Trends as input dataset to a predictive model. The results show a close margin between the actual and predicted values for some instances and the reverse for others. However, as discussed in Section 4.1, the Google index was less than one (GT < 1) in some months, as observed in Figure 3a.
The consequence of these low index values was detected to impact the prediction outcome in January 2005, July 2007, April 2010, and November 2018 ( Figure 11). The results show that public queries made on the Google search engine on the USD against the GH

Introduction
The exchange rate is considered in terms of another currency. One of economy today is centred around th relies massively on the Foreign Exch An upsurge in monetary policy unce against the local currency [2,3]. The and monetary policies uncertainty i propriate monetary policy [2,3]. In a rometer of its international attractiv management are greatly influenced b severe consequences on countries, i [9,10]. For example, variations in ER affecting investment decisions. Ther tive models that can track the current particularly in periods where the ER are highly associated with the exchange rate. Furthermore, with the addition of the Google Trends data, we observed slight signs of improved performance in the model's performance ( Figure 11) compared with macroeconomic data only (Figure 8).

Introduction
The exchange rate is considered the relative price, indicating a local currency's value in terms of another currency. One of the significant issues in the discussion of the world economy today is centred around the ER. Practically, every economy in this 21st century relies massively on the Foreign Exchange Rate (ER) to determine its monetary policies [1]. An upsurge in monetary policy uncertainty causes the depreciation of foreign currencies against the local currency [2,3]. Therefore, understanding the relationship between ER and monetary policies uncertainty is a fundamental requirement for establishing an appropriate monetary policy [2,3]. In addition, the production rate of a country and the barometer of its international attractiveness or competitiveness, portfolio allocation, and management are greatly influenced by ER [4][5][6][7][8]. Thus, volatility in the ER has far-reaching severe consequences on countries, investors, companies, policymakers, and consumers [9,10]. For example, variations in ER make returns on investment undefined, negatively affecting investment decisions. Therefore, there is a need for efficient and reliable predictive models that can track the current dynamics of the ER and predict its future behaviour, particularly in periods where the ER frequently fluctuates [4].

Introduction
The exchange rate is considered the relative price, indicating a local currency's value in terms of another currency. One of the significant issues in the discussion of the world economy today is centred around the ER. Practically, every economy in this 21st century relies massively on the Foreign Exchange Rate (ER) to determine its monetary policies [1]. An upsurge in monetary policy uncertainty causes the depreciation of foreign currencies

Introduction
The exchange rate is considered the relative price, indicating a local currency's value in terms of another currency. One of the significant issues in the discussion of the world economy today is centred around the ER. Practically, every economy in this 21st century relies massively on the Foreign Exchange Rate (ER) to determine its monetary policies [1]. An upsurge in monetary policy uncertainty causes the depreciation of foreign currencies against the local currency [2,3]. Therefore, understanding the relationship between ER and monetary policies uncertainty is a fundamental requirement for establishing an appropriate monetary policy [2,3]. In addition, the production rate of a country and the barometer of its international attractiveness or competitiveness, portfolio allocation, and management are greatly influenced by ER [4][5][6][7][8]. Thus, volatility in the ER has far-reaching severe consequences on countries, investors, companies, policymakers, and consumers [9,10]. For example, variations in ER make returns on investment undefined, negatively affecting investment decisions. Therefore, there is a need for efficient and reliable predictive models that can track the current dynamics of the ER and predict its future behaviour, particularly in periods where the ER frequently fluctuates [4].     Keywords: long-short-term-memory-networks; e

Introduction
The exchange rate is considered the rela in terms of another currency. One of the sig economy today is centred around the ER. P relies massively on the Foreign Exchange Ra An upsurge in monetary policy uncertainty against the local currency [2,3]. Therefore, and monetary policies uncertainty is a fund propriate monetary policy [2,3]. In addition rometer of its international attractiveness o management are greatly influenced by ER [4 severe consequences on countries, investor [9,10]. For example, variations in ER make affecting investment decisions. Therefore, th tive models that can track the current dynam particularly in periods where the ER freque

Introduction
The exchange rate is considered the relative price, indicating a local currency's value in terms of another currency. One of the significant issues in the discussion of the world economy today is centred around the ER. Practically, every economy in this 21st century

Introduction
The exchange rate is considered the relative price, indicating a local cur in terms of another currency. One of the significant issues in the discussion economy today is centred around the ER. Practically, every economy in this relies massively on the Foreign Exchange Rate (ER) to determine its monetar An upsurge in monetary policy uncertainty causes the depreciation of forei against the local currency [2,3]. Therefore, understanding the relationship and monetary policies uncertainty is a fundamental requirement for establ propriate monetary policy [2,3]. In addition, the production rate of a countr rometer of its international attractiveness or competitiveness, portfolio al management are greatly influenced by ER [4][5][6][7][8]. Thus, volatility in the ER ha severe consequences on countries, investors, companies, policymakers, an [9,10]. For example, variations in ER make returns on investment undefine affecting investment decisions. Therefore, there is a need for efficient and re tive models that can track the current dynamics of the ER and predict its futu particularly in periods where the ER frequently fluctuates [4].   Moreover, the fluctuation nature of exchange rate data needs more time to comprehend patterns and update weights and adjust the model accordingly. The outcome shows that the LSTM can conveniently handle the variation in exchange rate data without difficulty because of its distinct features, gated input and output, and memory block. The outcome implies that context-aware selection of machine-learning algorithms is meaningful in picking the best algorithms.

Conclusions
The stability of a county's currency against other foreign currencies is believed to be a good indicator of a stable economy and effective monetary policies. Hence, predicting the future exchange rate and managing its stability are crucial factors for economic decision making. However, the exchange rate's stochastic nature makes it difficult to predict future variation, especially when its fluctuation rates are uncertain. Nevertheless, numerous studies have attempted to use several statistical techniques to predict one currency exchange rate against another. This study sought to predict a 30-day-ahead exchange rate of the Ghanaian cedi to three different currencies (i.e., USD, EUR, and GBP). However, unlike previous studies that employed only essential macroeconomic variables to predict the exchange rate, we used the combined effect of Google Trends and macroeconomic variables in predicting the exchange rate for examination based on the LSTM predictive framework. We experimented with the proposed framework dataset from January 2004 to October 2019 from the Bank of Ghana (BoG) and Google.
We observed a degree of association between macroeconomic variables such as inflation, monthly monetary survey, commodity prices, interest rates, and exchange rates from the experiment carried out. Therefore, we deduced that the stability of the inflation rate and interest rates does not wholly guarantee stability in exchange rates. Furthermore, the results show that the Google trend is associated with the Ghanaian Cedis' exchange rate fluctuation to some foreign currencies and can be effectively used to predict these exchange rates. Finally, the outcome shows that the LSTM can conveniently handle the variation in exchange rate data without any difficulty and offer lesser error in prediction than SVR and BPNN algorithms. The improvement in accuracy and decrement in error achieved with the combined dataset suggest that future financial analysis studies should explore additional information sources such as Google Trends, public sentiment, and financial news, to enhance prediction accuracy. Again, the performance of the LSTM creates the opening for examining the probability of accuracy enhancement by different deep learning neural network techniques such as stateful, Stateless, Deep Reinforcement Learning (DRL) in predicting exchange rate.

Data Availability Statement:
The data used is publicly available.

Acknowledgments:
We express our gratitude to everyone who contributed to the development of this paper.

Conflicts of Interest:
The authors declare no conflict of interest.