An Intelligent Event-Sentiment-Based Daily Foreign Exchange Rate Forecasting System

Financial time series analysis is an important research area that can predict various economic indicators such as the foreign currency exchange rate. In this paper, a deep-learning-based model is proposed to forecast the foreign exchange rate. Since the currency market is volatile and susceptible to ongoing social and political events, the proposed model incorporates event sentiments to accurately predict the exchange rate. Moreover, as the currency market is heavily dependent upon highly volatile factors such as gold and crude oil prices, we considered these sensitive factors for exchange rate forecasting. The validity of the model is tested over three currency exchange rates, which are Pak Rupee to US dollar (PKR/USD), British pound sterling to US dollar (GBP/USD), and Hong Kong Dollar to US dollar (HKD/USD). The study also shows the importance of incorporating investor sentiment of local and foreign macro-level events for accurate forecasting of the exchange rate. We processed approximately 5.9 million tweets to extract major events’ sentiment. The results show that this deep-learning-based model is a better predictor of foreign currency exchange rate in comparison with statistical techniques normally employed for prediction. The results present evidence that the exchange rate of all the three countries is more exposed to events happening in the US.


Introduction
The foreign exchange rate remains one of the important economic indicators for any country. Any investment decision by multinational corporations or governments is based on the exchange rates. Therefore, foreign exchange prediction is an important factor for investors and businesses. However, foreign exchange forecasting is a very difficult task due to the nonlinear and volatile nature of this problem. This notion is largely supported due to the research work published in [1,2]. In fact, the papers [1,2] advocate that the forecast can only be predicted through the simple random walk.
Technically the currency exchange rate data are time series data, which are affected by various socioeconomic and political factors. This makes it very difficult to predict the exchange rate. At the same time, accurate currency forecasting has important economic benefits and, thus, it is the focus of active economic research for many decades [3]. Normally, financial analysis is categorized into fundamental and technical analysis, where the former deals with macroeconomic issues and the later with historical data for prediction. Stock prices can be overestimated or underestimated when models

•
Since time series models such as Auto regressive conditional heteroscedasticity (ARCH) and GARCH do not yield significant prediction results, we use a deep learning approach that also deals with nonlinear patterns of time series datasets. • The exchange rate is considered as a highly volatile variable and can be affected by any information floated in the market such as social media sentiments based on events at the macro level, therefore, we also consider investor sentiment while making exchange rate predictions which is a significant contribution to the existing body of knowledge.

•
We consider three different economies namely, Hong Kong (emerging), Pakistan (developing), and UK (developed) that belong to different regions which exhibit specific characteristics. Such a dataset has remained unexplored in the existing literature.
The rest of the paper is organized as follows: Section 2 explains the related work, Section 3 presents the methodology, and Section 4 explains the results followed by the conclusion.

Related Work
The exchange rate predicting techniques can be categorized in three different classes that is time series models, econometric approach, and the last one is machine-learning methods which include artificial neural network (ANN) and deep-learning-based methods.

Econometric Approach
These models are based on the underlying economic conditions to predict the exchange rate. In comparison with technical analysis, this econometric model ignores the financier's psychosomatic biases and also assumes that economic fundamentals determine prolonged trends. This econometric model can be further categorized into two different categories. Under the first category of the econometric model, the Mundell-Fleming Model [14], Dornbusch [15] proposed an asset market technique for the exchange rate. The second category of the econometric model emphasizes the effect of the current rate of exchange on the probable future path of the currency supplies and of influences that affect money demands [16]. These econometric models are extensively utilized by numerous central bankers all over the world. Though, empirical research specifies that their effectiveness is still dubious when forecasting the short-term exchange rate [17]. The research by Meese and Rogoff [2] is still a standard in contradiction of all econometric rate-of-exchange predicting frameworks. Meese and Rogoff demonstrated that structural frameworks fail to outperform the random walk in out-of-sample forecast. For the short-term exchange rate prediction, they concluded that the inefficiency of econometric models is still extensively acknowledged.

Time Series Models
The ARIMA model, i.e., autoregressive integrated moving average, and ETS, i.e., exponential smoothing, are commonly utilized to forecast the exchange rate. The ARIMA models are generally used in the context of the encompassing autoregressive model and moving average model as special cases. By differencing transformation, if needed, ARIMA can deal with non-stationary data. The other time series ETS models can handle trends and seasonality due to their non-stationary nature.
Although the time series models cannot be exactly utilized for classification, researchers utilized ARIMA and ETS as baseline models just for demonstration because these models give acceptable point approximations for the forex rate. Bo et al. [18] proposed a time series model that gives very good results.

Artificial Neural Network
ANN was not widely used for currency exchange forecasting mainly because the subject was related to economics and majority of economists are not well versed with the working of ANNs. Another reason is the popularity of statistical models for currency exchange forecast. However, over the years, ANN has shown its strength in solving nonlinear problems. The strength of ANN lies in its ability to learn from the data. It does not suffer from noisy and inconsistent data and, thus, is an excellent tool to be used for nonlinear problems. An important feature of ANNs is that they are numeric in nature [19], which makes them an ideal candidate to be used for currency exchange forecast and other financial related matters where we are dealing with numbers. Moreover, ANN accepts input data in the numeric form directly for data mining.
One example of the use of ANN for economic matters is the intelligent trading tool described in [20], which shows that with a more complex ANN the resulting system becomes more specialized, which results in increased profits on the training sets. However, in the real-world scenario the less specialized and less complex ones, i.e., the generalized ones, provided better results and more profit. Another example of the use of ANN for economic issues is discussed in [21]. The study in [21] compares the performance of an ANN with other time-series-based techniques. A quadratic neural network (QNN) created for the prediction of financial time series data from the Gabor-Kolmogorov polynomial function is described in [22]. The QNN evaluates the data collected on a day-to-day basis of a certain stock and it calculates a hypothetical price series of the stock.
The use of ANN for financial forecasting is advocated in [23,24], where ANN is applied to an economic time series. A similar kind of study was carried out for the stock market in [25], and in [26] the ANN is applied to predict currency exchange. Another study was carried out in [27] to determine the Brazilian currency exchange rate with the US dollar and it showed the strength of ANN over other linear models. A similar kind of study was carried out to predict the exchange rate of the Turkish lira with the euro and the US dollar [28], which showed high accuracy in comparison to other models. Another study in [29] predicted the euro to US dollar exchange rate by using a multilevel perceptron (MLP), a specialized ANN, applied to one-day-ahead forecasting of the currency exchange rate collected from European Central Bank (ECB) time series data. The study showed that MLP outperformed other techniques for the said problem. A similar kind of study was carried out in [30], which predicted the exchange rate of the Indian rupee to the US dollar. It created a knowledge guided neural network with integrated features of least mean square as an input. A study of prediction of the Australian dollar against the currency of six other currencies was carried out in [31]. Historical data from over 500 weeks were fed to the ANN and a prediction accuracy of about 87% was recorded. A general regression NN is proposed in [32], which predicts the currency exchange rate on a month-by-month basis.
Dunis [33] utilized an ANN and compared it with three different models including an autoregressive model, moving average technical frameworks, and at the end a logistic regressive model. The artificial neural network outperformed all the standard models. Thinyane and Millin [20] discovered that the greater the performance on the training dataset, the more complex the ANN. Although these models lead to unsatisfactorily high generality errors and are predisposed to overfitting on out-of-sample forecasts. To resolve the outdated artificial neural network model's limitation, Nag and Mitra [34] proposed an alternative method utilizing artificial neural network and genetic algorithms for constructing predicting models for the rate of exchange. They concluded that in comparison with traditional and statistical time series models, ANN gave considerably better results. Galeshchuk [7] showed that the practical use of the single hidden layer of MLP can give high-enough accuracy for the point estimates for the exchange rates, with 60% accuracy attained for the direction of alteration by applying these predictions. For making cost-effective trading schemes, this renders the technique less valuable as a bias. Therefore, this inspires us to examine the proficiency of the deep learning networks to predict the direction of alteration in the forex rate.

Deep Neural Network
Deep learning approaches stimulate the researchers over the last decade, this method, initially presented by Hinton [35,36], has exposed a robust and efficient machine-learning (ML) approach in multiple domains, including facial recognition [37,38], speech recognition [39], and NLP, i.e., natural language processing [40]. Deep learning networks are also effective for forecasting-related issues for sequential data [41,42]. In the current research, these deep learning networks have been utilized for financial prediction [43][44][45] and attained 63%-73% accuracy in forecasting the direction of alteration in trade. For forecasting-related issues, restricted Boltzmann machines and different autoencoders have been effectively utilized for the unsupervised removal of abstract input features [46,47]. In financial forecasting, the method was also shown to be very effective [43]. The techniques for pretraining deep neural networks with the SAE and stacked Boltzmann are briefly described in [43,[48][49][50][51]. Current improvements in CNN i.e., convolutional neural network, make it more appealing for classification and forecasting-related issues [52] centered on time series data. CNNs are great for financial forecasting because of two main causes: Firstly, noise filters and dimensionality reduction approaches help to select crafted input features. Secondly, the local association amongst successive observations can be suppressed to lessen the number of parameters to be considered in the network by linking just a small number of end-to-end inputs to each hidden layer's unit. The units in the convolutional neural network get input from the small adjoining subsections of space in the input, known as the respective field, that covers the whole input feature's set. This lets units act as local kernels and exploit correlation amongst adjoining inputs.

Proposed Methodology
The proposed methodology is explained in Figure 1. The proposed system is based on a deep learning model that incorporates the sentiment of major local and global events. The sentiment analysis is carried out by calculating the percentage of positive and negative tweets rather than only considering the overall impact. This way, neutral tweets are neglected, and the sentiment is presented in a much better way. The details of deep learning architecture are presented below.

Input Layer/First Layer
This layer has the initial dataset, for this study, to predict stock data without the sentiment analysis, our input parameters were crude oil price, gold price index, and foreign exchange rate. Whereas when we study this stock prediction with respect to sentiment analysis, our input layer's parameters were augmented by one, i.e., sentiment value.

Convolutional Layers
In the framework of CNN, the core building layers are the convolutional layers, for extreme computational work is done by these convolutional layers. These layers execute all the convolutional operations on data from the input layer and forward that response to the next layers in the architecture. The convolutional layer's parameters have learnable kernels also known as 'filters', having a slight respective area, but spread over the input data. In the forward pass of layers, every kernel convolved through the input and producing a 1D activation map of that kernel.

Pooling Layers
In between the convo layers, there are pooling layers. To reduce the computational cost for the next convo layers these layers were utilized. They operate independent of the depth of the output of the convo layers, which is the input for this pooling layer. We utilized a pooling layer with a filter size of two. This pooling layer reduced the computational cost of the input. The proposed system is based on a deep learning model that incorporates the sentiment of major local and global events. The sentiment analysis is carried out by calculating the percentage of positive and negative tweets rather than only considering the overall impact. This way, neutral tweets are neglected, and the sentiment is presented in a much better way. The details of deep learning architecture are presented below.

Input Layer/First Layer
This layer has the initial dataset, for this study, to predict stock data without the sentiment analysis, our input parameters were crude oil price, gold price index, and foreign exchange rate. Whereas when we study this stock prediction with respect to sentiment analysis, our input layer's parameters were augmented by one, i.e., sentiment value.

Convolutional Layers
In the framework of CNN, the core building layers are the convolutional layers, for extreme computational work is done by these convolutional layers. These layers execute all the convolutional operations on data from the input layer and forward that response to the next layers in the architecture. The convolutional layer's parameters have learnable kernels also known as 'filters', having a slight respective area, but spread over the input data. In the forward pass of layers, every kernel convolved through the input and producing a 1D activation map of that kernel.

Pooling Layers
In between the convo layers, there are pooling layers. To reduce the computational cost for the next convo layers these layers were utilized. They operate independent of the depth of the output of the convo layers, which is the input for this pooling layer. We utilized a pooling layer with a filter size of two. This pooling layer reduced the computational cost of the input.

Rectified Linear Unit Layer
This layer is vital in CNN architecture, based on the non-saturation 'activation function'. Without affecting the fields of the convo layers, it increases the decision function's nonlinear properties by removing the negative values from the activation map and converting them to zero.

Fully Connected Layers
Lastly, the high-level reasoning in CNN was done via fully connected layers after numerous convolutional and the pooling layers. The neurons of these layers have connections to all the activation in the previous layers. In our CNN model, we had five convolutional layers having almost the same kernel size, the first convolutional layer had 96 kernels with size 1. The convolutional output was received through a pooling layer of size 2 where it was normalized and sent into the second convolutional layer as i/p and filtered with same kernel size. Similarly, the convolutional output from the second layer was reduced through the pooling layer of size 2 × 1 and connected to the kernel size 1 in the third convolutional layer. The third and fourth convolutional layers comprised 384 kernels whereas the fifth convolutional layer had 256 kernels. A total of 4096 neurons were present in fully connected layers.

Network Training and Testing
The network contained convolutional layers, fully connected layers, and a softmax layer. We passed 70% of the data to the network with some training options for training the network. These training options mainly contained batch-size, validation frequency, and learning rate. The algorithm appraised the weights and bias parameters by minimizing the loss function. To assess the training procedure's performance, we passed the remaining 30% of the data as testing data to this trained network. Figure 2 shows the proposed convolutional neural network architecture.

Rectified Linear Unit Layer
This layer is vital in CNN architecture, based on the non-saturation 'activation function'. Without affecting the fields of the convo layers, it increases the decision function's nonlinear properties by removing the negative values from the activation map and converting them to zero.

Fully Connected Layers
Lastly, the high-level reasoning in CNN was done via fully connected layers after numerous convolutional and the pooling layers. The neurons of these layers have connections to all the activation in the previous layers. In our CNN model, we had five convolutional layers having almost the same kernel size, the first convolutional layer had 96 kernels with size 1. The convolutional output was received through a pooling layer of size 2 where it was normalized and sent into the second convolutional layer as i/p and filtered with same kernel size. Similarly, the convolutional output from the second layer was reduced through the pooling layer of size 2 × 1 and connected to the kernel size 1 in the third convolutional layer. The third and fourth convolutional layers comprised 384 kernels whereas the fifth convolutional layer had 256 kernels. A total of 4096 neurons were present in fully connected layers.

Network Training and Testing
The network contained convolutional layers, fully connected layers, and a softmax layer. We passed 70% of the data to the network with some training options for training the network. These training options mainly contained batch-size, validation frequency, and learning rate. The algorithm appraised the weights and bias parameters by minimizing the loss function. To assess the training procedure's performance, we passed the remaining 30% of the data as testing data to this trained network. Figure 2 shows the proposed convolutional neural network architecture.

Dataset
We used the daily data of exchange rate ranging from early 2008 to late 2018. We also considered crude oil prices and gold price index as explanatory factors in the model for prediction. Daily data of exogenous factors was used for all the countries. We used the same data series of explanatory variables for all the datasets. The variables/features in the dataset were crude oil price, gold price index, and foreign exchange rate. We also added sentiment analysis values along with the aforementioned features. The events were divided into global and local events for each country. The data were collected for each event on a different number of days. The sentiment was collected for each event for each date and the values were added with the dataset against the same date. Table 1 shows the detailed description of the datasets used in our study. The twitter dataset was used to calculate the sentiment of the events [53]. The details of the events are given in Table 2.

Dataset
We used the daily data of exchange rate ranging from early 2008 to late 2018. We also considered crude oil prices and gold price index as explanatory factors in the model for prediction. Daily data of exogenous factors was used for all the countries. We used the same data series of explanatory variables for all the datasets. The variables/features in the dataset were crude oil price, gold price index, and foreign exchange rate. We also added sentiment analysis values along with the aforementioned features. The events were divided into global and local events for each country. The data were collected for each event on a different number of days. The sentiment was collected for each event for each date and the values were added with the dataset against the same date. Table 1 shows the detailed description of the datasets used in our study. The twitter dataset was used to calculate the sentiment of the events [53]. The details of the events are given in Table 2.

Evaluation Metrics
There have been a lot of evaluation metrics used for foreign exchange prediction but mean absolute error (MAE) and root mean squared error (RMSE) are the most common metrics [54][55][56][57][58]. These metrics can be evaluated as explained below.

Root Mean Squared Error-RMSE
This performance evaluation metric shows the average magnitude of estimation error in predicted values. It can be calculated using the following equation:

Mean Absolute Error-MAE
This error shows the average estimated error without considering the directions of the predicted values. Each of the calculated differences has equal weight and it can be calculated as In the equations above, n represents the number of estimated values, forecast(t) and actual(t) represent the estimated value and the actual value with reference to time t, respectively. Table 3 shows the descriptive statistics of all the datasets. The mean value of the exchange rate was 7.769, 98.257, and 1.536 for Hong Kong, Pakistan, and the UK, respectively. Similarly, their standard deviation was 0.0261, 14.740, and 0.170. Since the Jarque Bera (JB) test statistic is significant, the distribution of all the variables is non-normal.

Unit Root Test
We tested the problem of stationarity by using the ADF unit root test. The augmented Dickey-Fuller test uses the following hypothesis. Table 4 shows the results of the ADF unit root test. We found all the data series to be stationary at first difference except gold price index, which was stationary at level.

Results without Event Sentiments
Here, the results without a sentiment for exchange rate prediction are presented using linear regression, support vector regression, and deep learning model. We considered the exchange rate of the UK, Hong Kong, and Pakistan in terms of US Dollars. Since the exchange rate is highly exposed to global volatile indicators such as crude oil prices and world gold price index, we used crude oil prices and world gold price index as explanatory variables in our models. Table 5 shows the results of exchange prediction for Hong Kong (HK), Pakistan, and the UK using linear regression, support vector regression, and deep learning approach. The forecasting parameters MAE (absolute error) and RMSE (root mean square error) for HK were 0.018 and 0.025 in the case of linear regression. Contrary to that, MAE and RMSE were minimum when a deep learning approach was considered for HK-MAE was 0.017 and RMSE was 0.024. The results of Pakistan and UK were more accurate in the case of support vector regression and deep learning models. Therefore, these models were more reliable for exchange rate prediction as compared to the linear regression model.

Results with Event Sentiments
In this section, we discuss the results of exchange rate prediction using linear regression, support vector regression, and deep learning model in the presence of sentiments. We used social media tweets against mega-events in order to calculate the sentiment. Table 6 presents the results of exchange prediction in the presence of sentiments of mega-events that are related to Hong Kong. We considered the 2014 Hong Kong protest as a local event to predict the Hong Kong exchange rate. The 2012 US election was used as a global event to incorporate sentiment for exchange rate prediction. Results of all the three models show that MAE and RMSE

Results with Event Sentiments
In this section, we discuss the results of exchange rate prediction using linear regression, support vector regression, and deep learning model in the presence of sentiments. We used social media tweets against mega-events in order to calculate the sentiment. Table 6 presents the results of exchange prediction in the presence of sentiments of mega-events that are related to Hong Kong. We considered the 2014 Hong Kong protest as a local event to predict the Hong Kong exchange rate. The 2012 US election was used as a global event to incorporate sentiment for exchange rate prediction. Results of all the three models show that MAE and RMSE were lower when sentiment was incorporated in the model. Since MAE and RMSE were lower compared to the results calculated without sentiment, as a whole, the accuracy of exchange rate prediction improved because of sentiment. However, the impact of the 2014 Hong Kong protest was higher than that of the 2012 US election. Therefore, it is evident that the exchange rate of Hong Kong is more exposed to the local event. When a comparison is made within the models then support vector regression is more accurate in the case of MAE for both the events. Furthermore, the deep learning model gives more reliable results of RMSE in the case of Hong Kong protest sentiment.  compared to the results calculated without sentiment, as a whole, the accuracy of exchange rate prediction improved because of sentiment. However, the impact of the 2014 Hong Kong protest was higher than that of the 2012 US election. Therefore, it is evident that the exchange rate of Hong Kong is more exposed to the local event. When a comparison is made within the models then support vector regression is more accurate in the case of MAE for both the events. Furthermore, the deep learning model gives more reliable results of RMSE in the case of Hong Kong protest sentiment.    Table 7 presents the results of exchange prediction in the presence of sentiments of mega-events that are related to Pakistan. We considered the 2016 Lahore blast as a local event to predict the Pakistan exchange rate. The 2012 US election was used as a global event to incorporate sentiment for exchange rate prediction. Results of all the three models show that MAE and RMSE were lower when sentiments of mega-events were incorporated in the model. Since MAE and RMSE were lower compared to the results calculated without sentiment, as a whole, the accuracy of exchange rate prediction improved because of sentiment. The results indicate that the deep learning model is more accurate as compared to linear regression and support vector regression when the sentiment of the 2012 US election is considered in the model. The MAE was 3.250, 3.127, and 2.613 for linear, support vector regression, and deep learning model, respectively. Similarly, the RMSE was 4.223, 4.590, and  Table 7 presents the results of exchange prediction in the presence of sentiments of mega-events that are related to Pakistan. We considered the 2016 Lahore blast as a local event to predict the Pakistan exchange rate. The 2012 US election was used as a global event to incorporate sentiment for exchange rate prediction. Results of all the three models show that MAE and RMSE were lower when sentiments of mega-events were incorporated in the model. Since MAE and RMSE were lower compared to the results calculated without sentiment, as a whole, the accuracy of exchange rate prediction improved because of sentiment. The results indicate that the deep learning model is more accurate as compared to linear regression and support vector regression when the sentiment of the 2012 US election is considered in the model. The MAE was 3.250, 3.127, and 2.613 for linear, support vector regression, and deep learning model, respectively. Similarly, the RMSE was 4.223, 4.590, and 3.534 for linear, support vector regression, and deep learning model, respectively. The impact of the 2016 Lahore blast was less significant than that of the 2012 US election. Therefore, it is evident that the exchange rate of Pakistan is more exposed to global events.  Figure 5 shows the graphical overview of the foreign exchange rate of Pakistan by incorporating the sentiments of the US election and the Lahore blast. The plot considers 50 forecasted and actual values of the foreign exchange rate of Pakistan with the sentiment of US election and Lahore blast from top to bottom. All the predicted series were calculated using linear regression, support vector regression, and deep learning model. Since the plotted values of deep learning forecasted points are close to the actual when the sentiment of US election was considered, it is evident that the exchange rate of Pakistan is more exposed to the events occurring in the US. However, in the case of the Lahore blast sentiment, support vector regression shows a better forecast pattern. 3.534 for linear, support vector regression, and deep learning model, respectively. The impact of the 2016 Lahore blast was less significant than that of the 2012 US election. Therefore, it is evident that the exchange rate of Pakistan is more exposed to global events.  Figure 5 shows the graphical overview of the foreign exchange rate of Pakistan by incorporating the sentiments of the US election and the Lahore blast. The plot considers 50 forecasted and actual values of the foreign exchange rate of Pakistan with the sentiment of US election and Lahore blast from top to bottom. All the predicted series were calculated using linear regression, support vector regression, and deep learning model. Since the plotted values of deep learning forecasted points are close to the actual when the sentiment of US election was considered, it is evident that the exchange rate of Pakistan is more exposed to the events occurring in the US. However, in the case of the Lahore blast sentiment, support vector regression shows a better forecast pattern.  Table 8 presents the results of exchange prediction in the presence of sentiments of mega-events that are related to the UK. We considered Brexit 2016 as a local event to predict the UK exchange rate. The 2012 US election was used as a global event to incorporate sentiment for exchange rate prediction. Results of all the three models show that MAE and RMSE were lower when sentiments of megaevents were incorporated in the model. Since MAE and RMSE were lower compared to the results calculated without sentiment, as a whole, the accuracy of exchange rate prediction improved because of sentiment. Figure 6 shows the graphical overview of the foreign exchange rate of the UK by incorporating the sentiments of the US election and Brexit. The plot considers 50 forecasted and actual values of the foreign exchange rate of the UK with the sentiment of the US election and Brexit from top to bottom. All the predicted series are calculated using linear regression, support vector regression, and deep learning model. Since the plotted values of support vector regression and deep learning forecasted points are close to the actual, in the case of the UK, the results of support vector and deep learning  Table 8 presents the results of exchange prediction in the presence of sentiments of mega-events that are related to the UK. We considered Brexit 2016 as a local event to predict the UK exchange rate. The 2012 US election was used as a global event to incorporate sentiment for exchange rate prediction. Results of all the three models show that MAE and RMSE were lower when sentiments of mega-events were incorporated in the model. Since MAE and RMSE were lower compared to the results calculated without sentiment, as a whole, the accuracy of exchange rate prediction improved because of sentiment. Figure 6 shows the graphical overview of the foreign exchange rate of the UK by incorporating the sentiments of the US election and Brexit. The plot considers 50 forecasted and actual values of the foreign exchange rate of the UK with the sentiment of the US election and Brexit from top to bottom. All the predicted series are calculated using linear regression, support vector regression, and deep learning model. Since the plotted values of support vector regression and deep learning forecasted points are close to the actual, in the case of the UK, the results of support vector and deep learning model are more accurate as compared to those of linear regression. However, the US election sentiment shows more significant improvement in forecasted plots as compared to Brexit. model are more accurate as compared to those of linear regression. However, the US election sentiment shows more significant improvement in forecasted plots as compared to Brexit.

Conclusions
Foreign currency exchange rate is an economic indicator that indirectly impacts even those businesses which are not directly involved with imports/exports of goods. Hence accurate prediction of the exchange rate is an issue related to a small business as well as the government of a country. The study is based on a dataset providing information about the exchange rate of currencies from April 2008 to January 2019. The paper proposes a deep-learning-based technique for the prediction of foreign currency exchange rate. We have calculated the sentiment of some major local and global events for Hong Kong, UK, and Pakistan. The sentiment analysis values are used as an input along with other parameters. The results show that the currency market is heavily dependent on sociopolitical issues and higher accuracy can only be achieved if these events, known sentiments in this study, are taken into consideration while predicting the exchange rate. The results obtained through the proposed methodology are compared with linear and support regression models, both well-known statistical techniques for the said problem. The results show that deep learning-based methods perform better than other methods. It has also been observed that the proposed model performed better with sentiment analysis. Moreover, events happening in the US have a significant impact on the currency exchange rate of Hong Kong, Pakistan, and the UK when social media sentiment is incorporated. The results of the prediction improved when sentiment was considered in the model, therefore these countries are said to be more exposed to mega-events happening across borders.

Conclusions
Foreign currency exchange rate is an economic indicator that indirectly impacts even those businesses which are not directly involved with imports/exports of goods. Hence accurate prediction of the exchange rate is an issue related to a small business as well as the government of a country. The study is based on a dataset providing information about the exchange rate of currencies from April 2008 to January 2019. The paper proposes a deep-learning-based technique for the prediction of foreign currency exchange rate. We have calculated the sentiment of some major local and global events for Hong Kong, UK, and Pakistan. The sentiment analysis values are used as an input along with other parameters. The results show that the currency market is heavily dependent on sociopolitical issues and higher accuracy can only be achieved if these events, known sentiments in this study, are taken into consideration while predicting the exchange rate. The results obtained through the proposed methodology are compared with linear and support regression models, both well-known statistical techniques for the said problem. The results show that deep learning-based methods perform better than other methods. It has also been observed that the proposed model performed better with sentiment analysis. Moreover, events happening in the US have a significant impact on the currency exchange rate of Hong Kong, Pakistan, and the UK when social media sentiment is incorporated. The results of the prediction improved when sentiment was considered in the model, therefore these countries are said to be more exposed to mega-events happening across borders.