=Paper=
{{Paper
|id=Vol-3335/DLQ_short1
|storemode=property
|title=Foreign Exchange Rates Prediction For Time-series
Data Using Advanced Q-sensing Model
|pdfUrl=https://ceur-ws.org/Vol-3335/DLQ_short1.pdf
|volume=Vol-3335
|authors=T. Soni Madhulatha,Md. Atheeq Sultan Ghori,Ritu Tanwar,Orchid Chetia Phukan,Ghanapriya Singh,Sanju Tiwari
}}
==Foreign Exchange Rates Prediction For Time-series
Data Using Advanced Q-sensing Model==
, Foreign Exchange Rates Prediction for Time-series Data using Advanced Q-sensing Model⋆ T. Soni Madhulatha1,2,∗,† , Md. Atheeq Sultan Ghori2,† 1 Department of Computer Science Telangana Social Welfare Residential Degree College for Women, Telangana, India 2 Department of Computer Science and Engineering,Telangana University, Telangana, India Abstract Financial market is affected by non-linearity with severe market fluctuations. The foreign exchange (forex) is a superior financial market that involves risks as well as profits for the investors. There are several models developed in literature to forecast the forex rates but none of the models considered the major influential factors involved in the market. Deep learning-based advanced Q-sensing (AQS) prediction model used to accurately predict the future forex rates by considering different market factors. Initially, the multivariate time-series data are gathered and pre-processed to treat the missing and null values. Then, the data are provided to the AQS model for predictions where, the reinforcement learning (RL) strategy is utilized to take optimal decisions. The overall simulations illustrated the effectiveness and efficiency of the proposed method and the average accuracy of the model in predicting the forex rates is 94.36 Keywords Foreign exchange rates prediction„ time-series data, reinforcement learning, Q-learning, deep learning, deep sensing, and multi-directional recurrent neural network 1. Introduction Foreign exchange (forex) market is known to be the world’s biggest currency exchange market accounting for over 5.1 trillion volume trade/day [1]. Forecasting, the forex rates is one of the hot topics in recent times but, due to the high fluctuations in the currency rates, it is very complex to obtain accurate prediction results [2]. To make trading and investment decisions, the government and companies evaluate the currency rates of one country with respect to other one. Accurate prediction of forex rates is helpful for the investors and traders to achieve high KGSWC-2022: Second International Workshop on Deep Learning for Question Answering, November 21-23, 2022, Universidad Camilo José Cela, Madrid, Spain ⋆ You can use this document as the template for preparing your publication. We recommend using the latest version of the ceurart style. ∗ Corresponding author. † These authors contributed equally. Envelope-Open latha.gannarapu@gmail.com (T. S. Madhulatha) GLOBE https://tswrdc-adilabad/ (T. S. Madhulatha) Orcid 0000-0002-0877-7063 (T. S. Madhulatha); 0000-0001-7116-9338 (Md. A. S. Ghori) © 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org) returns with reduced risk factors [3, 4]. Since the market is influenced by the political and economic factors, the data are collected as time-series to understand the impacts in currency rates. Therefore, constructing a model that can effectively handle the irregular data to accurately predict the forex rates is a challenging task [5]. The dynamic changes in the market provide information about the past and future events and a prediction model is capable of identifying these events based on time series [6]. There are different models in literature that are formulated for forex rates prediction. Diverse steps are taken by the research community to construct accurate models to deal with the financial time-series data[7, 8]. These models can be either statistical or soft computing-based where, the soft computing models are more accurate and effective in prediction [9]. The popular statistical models in literature for financial time-series prediction include autoregressive moving average (ARMA) [10], autoregressive integrated moving average (ARIMA) [11] etc. These models use the past events extracted from the time-series data to predict the future events. The soft computing-based techniques are more effective in predicting the forex rates as these techniques are stable and can handle any type of non-linear data. The common soft computing techniques in literature include fuzzy set theory [12] artificial neural network (ANN)[13, 14, 15], support vector machine (SVM) [16, 17, 18] etc. These models take appropriate decisions on the exchange rates by considering the influential factors to maximize the returns. In case of soft computing techniques, the neural network models provide higher performance rates compared to other techniques [19]. Due to this reason, researchers formulated various hybrid models by integrating neural network architectures with another neural network [20], statistical model like ARIMA [21], optimization algorithms [22] etc. The hybrid models are observed to provide higher performance rates than the non-hybrid models. Hybridization of deep learning models for prediction handles the non-linear data without losing its stability in processing diverse large datasets. 2. Proposed methodology Prediction of forex rates is a challenging task as there are periodic market fluctuations that affects the forex rates. This induces changes in the currency rates while making investment leading to loss for any one party involved in the investment plan. To deal with the market fluctuations, prediction of forex rates based on the historical multivariate time-series data is important. An efficient framework to predict the forex rates for different countries based on Indian rupees (INR) is proposed in this paper that considers several influential parameters of the exchange rate. The proposed work includes two main phases such as pre-processing and prediction. Initially, the time-series datasets collected for simulations are pre-processed to remove the null values. This reduces the computational complexity of the prediction process. After this step, the data values are provided to the prediction model for training. The proposed model is developed to forecast the exchange rates of United States dollar (USD), British pound sterling (GBP), euro (EUR), Emirati dirham (AED) and Japanese yen (JPY). Apart from these exchange rates, the proposed approach also considers several influential parameters that affect the exchange rates such as BOP, inflation rate, gold price, crude oil price and GDP. To efficiently predict the Figure 1: The proposed AQS architecture for forex rate prediction exchange rates, this approach introduces a hybrid approach known as advanced Q-sensing (AQS) that is robust on the time-series data. This model is not affected with the market fluctuations and can provide reliable prediction results on the considered time-series data. 2.1. Data pre-processing Data pre-processing is a process of evaluating the dataset and extracting the missing or inaccu- rate data to improve the quality of data for prediction. The time-series datasets considered in this work are evaluated manually to detect the null values. The steps of pre-processing include the following: • Evaluating the dataset for null values • Removal of unnecessary columns The time-series datasets included null values in certain columns and these are manually detected and removed. Since the required columns in the datasets are filled with values, the null values are directly discarded. Similarly, the columns that are unnecessary are also evaluated and discarded. 2.2. Deep-Q network Generally, the values of state and action obtained by the RL agent after analyzing the environ- ment are updated in a Q-table to find the mappings between the states and actions.When the Q-values are initialized to zero, the probability for the agent to choose random actions for the state is high. Random mapping of action values may result in decreased reward value and this problem worsens with time. Also, the problem to be solved by the proposed approach depends on the time-series data where there is a higher probability of choosing random actions for the input states. To restrict the imperfections of updating a Q-table, deep Q-learning has been introduced where the Q-table is replaced by a neural network for accurate mapping. The neural network used in place of Q-table known as the deep-Q network (DQN) learns the weight values that can approximate the Q-function. After the training phase, the neural network gets of the environment as an input and selects with highest Q-value. In the training process, the neural network learns the optimal weight values that can ultimately predict the highest Q-values for the input states. The process is repeated in an iterative manner where the network predicts the best actions for all the input states until the target function is approximated for the target state. Moreover, the DQN is capable of learning from the experience gained from the older states. This property makes the proposed approach efficient as the future forex rates prediction can be improved by determining the previous rates predicted.Thus, the DQN can be prepared for training with the time-series data by minimizing the mean squared error (MSE) in the bellman equation. This loss value is reduced in the proposed model using the back-propagation algorithm that optimally chooses the weight value for prediction. 2.2.1. Proposed AQS model for forex rate prediction In the proposed approach, the Q-learning is combined with the DQN for predicting the future forex rates of different countries with respect to INR. The influential factors such as gold rate, crude oil rate, inflation rate, BOP and GDP are also considered to view the fluctuations in the currency rates. The proposed prediction model introduces a deep sensing network in place of DQN to make predictions on the Q-values. Initially, a forecasting environment is built with the feature combinations and certain thresh- olds that results in future forex rates. Every combination of the feature comprises the samples with their labels. Sequential actions are performed by the agent by maximizing the reward to determine the forex rates. The agent achieves a positive reward when the predicted value is close to the target otherwise, the reward is negative. Since the forex rate prediction is a complex task with a requirement of a huge amount of samples for prediction, the DQN concept is utilized in this paper. The multi-directional recurrent neural network (M-RNN) model is utilized in this work to predict the future forex rates based on different parameters. The proposed model is named as advanced Q-sensing (AQS) model which is actually built with M-RNN over the DQN framework. The M-RNN model is effective in making accurate observations of the environment. Also, the training of this model is efficient as this model makes predictions based on the cost metrics (i.e. penalty issued for incorrect predictions). The M-RNN model predicts the Q-values through training with input states where the objective of training is to maximize the rewards and to minimize the cost function. The main advantage of M-RNN is that the model ensures that there are no missing observations that requires prediction of Q-values. For prediction of Q-values using the M-RNN model, we train four blocks in the training stage such as interpolation, imputation, prediction and error estimation blocks. The traditional M-RNN model discussed in uses an additional block known as adaptive sampling block for multiple presentations. In this work, we discard this block to reduce the computational time of the training phase. Moreover, the q-value prediction requires no sampling as the missing measurements are already treated and there can be no loss of information. The interpolation and imputation blocks focuses on reducing the loss function defined while dealing with the missing measurements. • Interpolation block This block gets the feature combinations as the input and constructs an interpolation function . While training a network for prediction, there is a possibility that some of the data are missed leading to error in prediction. Thus, the interpolation block considers only the samples within a particular feature combination at a time. The basic units of this block is the bi-directional recurrent neural network (Bi-RNN) with a gated recurrent unit (GRU). A slight modification in the inputs to the hidden units of forward (lagged) and backward (advanced) layers is done in Bi-RNN for proper training of time-series data. • Imputation block This block constructs an imputation function and it considers only the feature combination at a particular time-step whereas, the feature combinations at the other time-steps are not taken into account. The basic units of this block are the fully connected (FC) layers that are independent of the time-steps. The model uses several FC layers in this block with linear activations. The stacked unit of Bi-RNN and FC is known as M-RNN • Prediction block The prediction process is carried out in this block where the feature samples are recon- structed and appropriate labels are predicted to determine the Q-values. A mask vector is used in this block as the input along with the data to ensure that the required sample to be labelled is available or not. Initially, the M-RNN model is pre-trained and then the DQN model is trained with the state and action spaces in the environment. The action space selection is enumerated based on a greedy policy where defines the probability of selecting the appropriate action. The action value with the highest Q-value is selected by the probability The weights in the M-RNN model are iteratively updated using the back-propagation algorithm. 3. Results and discussion The proposed AQS model for forex rate prediction has been tested using different datasets to prove its excellence in accurately identifying the exchange rates. The datasets are initially pre-processed through manual evaluation by checking each of its rows and columns.Then the pre-processed datasets are provided to the proposed AQS model for prediction. The proposed model has been evaluated under five different foreign currencies (USD, GBP, AED, EUR and JPY) with respect to INR. Apart from this, the major influential factors considered are gold rate, crude oil price, GDP, BOP and inflation rate. Four major inflation rates such as transport, food, health and education are taken to estimate the forex rates. The proposed model has been evaluated in terms of performance metrics, model performance and time complexity on all the datasets. Table 1 Performance measures of the proposed AQS model on different datasets Dataset Precision Recall F-measure Accuracy USDINR 89.54 89.51 89.52 89.53 GBPINR 91.21 91.06 91.11 91.13 EURINR 97.02 96.95 96.98 96.98 AEDINR 94.20 94.10 94.13 94.14 JPYINR 90.81 90.73 90.76 90.78 From Table 1 it is clear that the proposed model provided stable results on all the datasets. The maximum accuracy rate reached by the AQS model is on the EUR/INR dataset with the accuracy value of 96.98. This explains that the model is capable of accurately determining the exchange rate of EUR/INR and is able to deal with the market fluctuations. The minimum accuracy of the model is attained for the USD/INR dataset with an overall accuracy value of 89.53. The overall performance results suggest that the proposed AQS model is suitable for predicting the forex rates of different countries by considering most of the influential parameters. Figure 2: Performance comparison of the proposed and existing models The performance comparison of the proposed and existing models are graphically depicted in Figure 2. The values of accuracy, precision, recall and f-measure are taken on average. From the graph, it is clear that the proposed model secured the highest performance values compared to the other models. The average accuracy scored by the proposed model is 94.36 whereas, the compared AlexNet, ResNet, LSTM, M-RNN and GRU models scored 88.76, 84.02, 78.93, 84.38 and 77.98 respectively. The actual vs. prediction plot obtained from all the prediction models on the USD/INR dataset for 100 weeks is depicted in Figure 3. From the figure, it is clear that the proposed model provided better prediction results than the other models compared with it. For all the weeks, the AQS model outperformed the other models and provided better prediction results. Thus, Table 2 Comparison of MAE for the proposed and existing models on different datasets Dataset GRU LSTM AlexNet ResNet M- AQS RNN USD/INR 0.426 0.326 0.455 0.573 0.320 0.105 GBP/INR 0.554 0.538 0.649 5.075 1.075 0.089 EUR/INR 0.739 0.679 0.890 4.478 0.943 0.030 AED/INR 0.409 0.409 0.432 1.796 0.199 0.059 JPY/INR 0.608 0.492 0.685 0.020 0.018 0.092 Gold rate 5.788 0.832 7.119 1.528 0.072 0.101 Crude-oil price 0.427 0.373 0.489 2.803 1.333 0.089 GDP 1.914 1.512 1.794 1.552 0.512 0.094 BOP 0.769 0.785 0.772 1.645 0.739 0.067 Transport(Inflation) 0.617 0.453 0.685 0.206 0.031 0.069 Food(Inflation) 1.224 1.251 1.353 0.187 0.025 0.103 Education(Inflation) 0.682 0.465 0.822 0.561 0.034 0.069 Health (Inflation) 0.632 0.566 0.681 0.416 0.140 0.064 the AQS model is capable of accurately predicting the exchange rates of USD/INR under several market factors. Figure 3: Actual vs. prediction comparison for the USD/INR dataset 4. Conclusion In this paper, a novel deep-learning-based prediction model is introduced to accurately predict the future forex rates with the consideration of major influential factors. The proposed model combined Q-learning with the M-RNN sensing network to attain higher results in prediction. Multiple currency rates along with the influential parameters are considered for predictions. The proposed model has been trained and tested with five currency rates such as USD/INR, GBP/INR, EUR/INR, AED/INR and JPY/INR and with certain market factors such as gold rate, crude oil price, inflation, BOP and GDP.The evaluations of the model has been extended in terms of different metrics to identify the suitability of the model in predicting the market fluctuations and future exchange rates. The deep sensing capability of the proposed AQS model helped it to gather more features to provide reliable results. The overall accuracy rate of prediction has been improved and the processing time of the model has been reduced. The proposed model outperformed the existing learning models in predicting the weekly forex rates of different currencies. References [1] M. Islam, E. Hossain, A. Rahman, M. S. Hossain, K. Andersson, et al., A review on recent advancements in forex currency prediction, Algorithms 13 (2020) 186. [2] S. Ahmed, S.-U. Hassan, N. R. Aljohani, R. Nawaz, Flf-lstm: A novel prediction system using forex loss function, Applied Soft Computing 97 (2020) 106780. [3] R. Dash, Performance analysis of a higher order neural network with an improved shuffled frog leaping algorithm for currency exchange rate prediction, Applied Soft Computing 67 (2018) 215–231. [4] Y. C. Shiao, G. Chakraborty, S. F. Chen, L. H. Li, R. C. Chen, Modeling and prediction of time-series-a case study with forex data, in: 2019 IEEE 10th international conference on awareness science and technology (ICAST), IEEE, 2019, pp. 1–5. [5] M. Rout, K. M. Koudjonou, An evolutionary algorithm based hybrid parallel framework for asia foreign exchange rate prediction, in: Nature inspired computing for data science, Springer, 2020, pp. 279–295. [6] Z. Zeng, M. Khushi, Wavelet denoising and attention-based rnn-arima model to predict forex price, in: 2020 International joint conference on neural networks (IJCNN), IEEE, 2020, pp. 1–7. [7] R. Dash, Performance analysis of an evolutionary recurrent legendre polynomial neural network in application to forex prediction, Journal of King Saud University-Computer and Information Sciences 32 (2020) 1000–1011. [8] L. Munkhdalai, T. Munkhdalai, K. H. Park, H. G. Lee, M. Li, K. H. Ryu, Mixture of activation functions with extended min-max normalization for forex market prediction, IEEE Access 7 (2019) 183680–183691. [9] Z. Hu, Y. Zhao, M. Khushi, A survey of forex and stock price prediction using deep learning, Applied System Innovation 4 (2021) 9. [10] A. Babu, S. Reddy, Exchange rate forecasting using arima, Neural Network and Fuzzy Neuron, Journal of Stock & Forex Trading 4 (2015) 01–05. [11] W. Wang, A big data framework for stock price forecasting using fuzzy time series, Multimedia Tools and Applications 77 (2018) 10123–10134. [12] M. M. Panda, S. N. Panda, P. K. Pattnaik, Exchange rate prediction using ann and deep learning methodologies: A systematic review, in: 2020 Indo–Taiwan 2nd International Conference on Computing, Analytics and Networks (Indo-Taiwan ICAN), IEEE, 2020, pp. 86–90. [13] D. Gaurav, F. O. Rodriguez, S. Tiwari, M. Jabbar, Review of machine learning approach for drug development process, in: Deep Learning in Biomedical and Health Informatics, CRC Press, 2021, pp. 53–77. [14] S. Tiwari, O. Dogan, M. Jabbar, S. K. Shandilya, F. Ortiz-Rodriguez, S. Bajpai, S. Banerjee, Applications of machine learning approaches to combat covid-19: A survey, Lessons from COVID-19 (2022) 263–287. [15] R. K. Nayak, D. Mishra, A. K. Rath, An optimized svm-k-nn currency exchange forecast- ing model for indian currency market, Neural Computing and Applications 31 (2019) 2995–3021. [16] M. Reza, G. Hossain, A. Goyal, S. Tiwari, A. Tripathi, A. Bhan, P. Dash, et al., Automatic diabetes and liver disease diagnosis and prediction through svm and knn algorithms, in: Emerging Technologies in Data Mining and Information Security, Springer, 2021, pp. 589–599. [17] L. Ni, Y. Li, X. Wang, J. Zhang, J. Yu, C. Qi, Forecasting of forex time series data based on deep learning, Procedia computer science 147 (2019) 647–652. [18] S. R. Pandey, D. Hicks, A. Goyal, D. Gaurav, S. M. Tiwari, Mobile notification system for blood pressure and heartbeat anomaly detection, Journal of Web Engineering (2020) 747–774. [19] M. A. Hossain, R. Karim, R. Thulasiram, N. D. Bruce, Y. Wang, Hybrid deep learning model for stock price prediction, in: 2018 ieee symposium series on computational intelligence (ssci), IEEE, 2018, pp. 1837–1844. [20] P. Escudero, W. Alcocer, J. Paredes, Recurrent neural networks and arima models for euro/dollar exchange rate forecasting, Applied Sciences 11 (2021) 5658. [21] Z. Alameer, M. Abd Elaziz, A. A. Ewees, H. Ye, Z. Jianhua, Forecasting gold price fluctuations using improved multilayer perceptron neural network and whale optimization algorithm, Resources Policy 61 (2019) 250–260. [22] J. An, M. Dorofeev, Short-term foreign exchange forecasting: decision making based on expert polls (2020).