Next Article in Journal
Gender-Aware Framework in International Entrepreneurship: How Far Developed?—A Systematic Literature Review
Next Article in Special Issue
Impact of Trade Policy Uncertainty and Sustainable Development on Medical Innovation for Developed Countries: An Application of DID Approach
Previous Article in Journal
Spatial Distribution Characteristics of Traditional Villages and Influence Factors Thereof in Hilly and Gully Areas of Northern Shaanxi
Previous Article in Special Issue
The Impact of U.S. Trade Policy Uncertainty on the Trade Margins of China’s Export to the U.S.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Forex Investment Optimization Using Instantaneous Stochastic Gradient Ascent—Formulation of an Adaptive Machine Learning Approach

1
Department of Creative Technologies, Air University, Islamabad 44000, Pakistan
2
Department of Computer Science, Air University, Islamabad 44000, Pakistan
3
The National Centre for Genomics Technologies and Bioinformatics, King Abdulaziz City for Science and Technology, Riyadh 11442, Saudi Arabia
4
Faculty of Computer Science and Information Technology, Al Baha University, Al Baha 65779, Saudi Arabia
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Sustainability 2022, 14(22), 15328; https://doi.org/10.3390/su142215328
Submission received: 21 September 2022 / Revised: 5 November 2022 / Accepted: 7 November 2022 / Published: 18 November 2022
(This article belongs to the Special Issue Business, Innovation, and Economics Sustainability)

Abstract

:
In the current complex financial world, paper currencies are vulnerable and unsustainable due to many factors such as current account deficit, gold reserves, dollar reserves, political stability, security, the presence of war in the region, etc. The vulnerabilities not limited to the above, result in fluctuation and instability in the currency values. Considering the devaluation of some Asian countries such as Pakistan, Sri Lanka, Türkiye, and Ukraine, there is a current tendency of some countries to look beyond the SWIFT system. It is not feasible to have reserves in only one currency, and thus, forex markets are likely to have significant growth in their volumes. In this research, we consider this challenge to work on having sustainable forex reserves in multiple world currencies. This research is aimed to overcome their vulnerabilities and, instead, exploit their volatile nature to attain sustainability in forex reserves. In this regard, we work to formulate this problem and propose a forex investment strategy inspired by gradient ascent optimization, a robust iterative optimization algorithm. The dynamic nature of the forex market led us to the formulation and development of the instantaneous stochastic gradient ascent method. Contrary to the conventional gradient ascent optimization, which considers the whole population or its sample, the proposed instantaneous stochastic gradient ascent (ISGA) optimization considers only the next time instance to update the investment strategy. We employed the proposed forex investment strategy on forex data containing one-year multiple currencies’ values, and the results are quite profitable as compared to the conventional investment strategies.

1. Introduction

In this era of transition from paper currency to plastic and digital currencies, the nature of vulnerabilities has gained more complexity. Now, the world currencies are affected by factors not limited to supply and demand, current account deficit, gold reserves, dollar reserves, petroleum prices, political stability, security, and the presence of war in that country or even its neighborhood [1,2,3]. In this era of the global village, war even in one country creates economic ripples across the world. These factors result in fluctuation in world currencies and, thus, result in instability in their economies [4]. In particular, with the current tendency of looking beyond the existing SWIFT system, the mentioned risk of currency fluctuation is seemingly greater, and this is creating a more complicated environment for world economies, particularly in developing countries [5,6,7,8,9]. The forex markets (foreign currency exchange markets in which brokers exchange different currencies with a minor difference in the buying and selling rate are called the open forex market; this business activity is also conducted using banking channels, and this is called interbank forex) are are directly affected by such instabilities in local and international economies.
Because of the world’s shift to the global village, the volume of forex trading has increased exponentially in recent decades. According to the statistics, the global forex market in 2022 is expected to be about USD 2.409 quadrillion, i.e., approximately USD 6.6 trillion per day for trades in foreign exchange markets [10,11]. Such a huge market volume is directly at potential risk because of global instabilities, and if this market is unstable or unluckily crashed, this will have critical economic effects.
Currently, in forex markets, there is a trend of having a few renowned currencies in reserve for trading. It is noted that the risks of having reserves in a few currencies are more probable as compared to having reserves in all world currencies [12,13,14]. Unluckily, the latter choice is not feasible for trading, whereas the first choice has related risks. In this regard, having appropriate reserves in multiple currencies, although seeming simple, fortunately, has also the potential to take advantage of the dynamic nature of the global forex market. Although most of the world trade and forex market are dollar-dominant [14,15], the latest trend of countries trading in local currencies is creating the space to have reserves in multiple currencies, thus ensuring more independence in the currency values of other countries or their economies [16,17,18,19,20]. The same problem also exists for individual savings in international currencies. This significance creates the demand for such a study on having reserves in multiple currencies to minimize the related risks and, at the same time, to benefit from the dynamic nature of the forex market. In this research, we consider this challenge to work on the formulation of an automatic and adaptive forex investment strategy by taking advantage of gradient ascent maximization [21,22], applied to the formulated problem.

2. Related Work

In the forex exchange market, which is volatile and dynamic in nature [23,24], both conventional and machine learning methods are used to predict the value of financial time series. In the literature, there are both statistical and machine-learning-based approaches available in the domain of financial time series prediction [25].
From statistical techniques that consider forex data as time series, the employment of the autoregressive integrated moving average (ARIMA) model has gained significant attention from the research community [26]. Unluckily, the ARIMA requires stationary data, a property that the forex data may not necessarily have. In this regard, addressing the uncertainty related to the stochastic process to generate the time series, the combination of fuzzy time series with fuzzy ARIMA shows a better forecast than traditional models [27]. In addition to ARIMA and fuzzy ARIMA techniques, the autoregressive moving average (ARMA) [28] and particle-filter-based [29] forecasting are also good candidates among statistical techniques for predicting time series since they do not require stationary data necessarily.
Contrary to these conventional statistical forecasting methods, few researchers use machine learning techniques for financial time series prediction. Machine learning models have already shown promising results for various research domains [30,31]. Among machine learning techniques, there is related work from both domains of conventional and deep learning techniques [32,33]. From conventional machine learning techniques, Kim et al. [34] explored various support vector machines (SVMs) for financial time series forecasting. To maximize SVMs’ performance, Jaiwang et al. [35] worked on upgrading the SVM training model using computational intelligence and evolutionary-computing-based optimization techniques. In their model, forecasting the SVM together with genetic algorithm (GA) outperformed other optimization techniques.
Contrary to the conventional machine learning techniques, deep learning techniques have also gained attention in financial time series prediction [32,33]. Among these deep learning techniques, the employment of the multilayer perceptron (MLP), recurrent neural network (RNN), gated recurrent unit (GRU), and long short-term memory (LSTM) in time series forecasting is given in the literature [33]. The nature of MLP is basically nonlinear regression, which is unable to exploit the past and present data’s coexistence relationship [36]. Still, it has been successfully used by Jarusek et al. [37] to exploit Elliot wave patterns for forex rate prediction. Contrary to the conventional neural network, LSTM is capable of exploring and exploiting present and past data relationships, and thus, it outperforms the conventional neural network [36]. In addition to this, LSTM also solves the vanishing gradient problem, resulting in efficient training as compared to the conventional neural networks. Moreover, in this line of research, Saud et al. [38] explored the gated recurrent unit for optimizing the pricing in the Nepal stock exchange market, whereas its employment in the forex market is missing.
Unluckily, all these statistical, machine-learning-, and deep-learning-based classification techniques are static (one-time training) in their nature. Because of this static nature, these techniques are not capable of adaptive learning and, thereby, cannot accommodate the volatile and dynamic nature in the future. Secondly, the available techniques mostly focus on predicting or forecasting the next values, whereas exploiting the next values is not well addressed in the literature. Moreover, based on these forex market predictions, the formulation and development of an optimized investment strategy in this volatile and dynamic economic environment are also not well addressed in the available research. In this regard, we consider this challenge to work on minimizing the losses from the dynamic and volatile nature and, instead, exploit them to maximize sustainability using the stochastic gradient ascent method. This led us to the formulation and the development of a unique flavor of the gradient ascent method, i.e., the instantaneous stochastic gradient ascent method, which surprisingly outperforms conventional investment strategies.

3. The Proposed Methodology

Before presenting the formulation of the proposed methodology, were note that we considered the following assumptions for the formulation.

3.1. Assumptions

  • We considered five entities (n = 5) dollar (USD), Euro (EUR), Dirham (AED), rubble (RUB), and gold for the investment strategy;
  • We considered that the rates of these entities are updated once a day;
  • The rates of all entities were considered for an open market;
  • The rates of all entities were considered in Pakistani rupees (PKR);
  • Fractional buying and purchasing of entities are possible.
These assumptions were made by realizing the forex market trends of Asian countries, i.e., to have renowned currencies in their forex markets. Currently, we considered 5 currencies, and thus, a few renowned currencies may be missing in these 5 currencies, which can be added to the proposed model easily since its formulation is generic, i.e., n currencies. The second and third assumptions were made to standardize the time updating interval as interbank forex rates’ update per day in Pakistan. The fourth assumption was made just as an example: any host currency can be considered since the formulation of the proposed model is generic in this regard. The last assumption was made since the formulation of the proposed model may result in a recommendation to buy fractional (for example, 4.51) units of a currency. This assumption was made to simplify the formulation of the proposed model.

3.1.1. Problem Statement

Consider that, on the ith day, we have u i 1 , u i 2 , …, u i n units of n currencies worth x i 1 , x i 2 , …, x i n Pakistani rupees (PKR) according to the rates r i 1 , r i 2 , …, r i n , respectively. Considering the rate updates each day, how should we update the units of each currency to maximize their worth in PKR.

3.1.2. Problem Formulation

Consider n currencies to invest and the investment vector for the ith day is x i = [ x i 1 , x i 2 , , x i n ] T , where x i j is the investment allocated on the ith day for the jth currency. The total investment x i on the ith day is the Manhattan distance or l 1 -norm of the investment vector x i as follows:
x i = | x i | 1 = r = 1 n x i j
Consider on that ith day the rates for n currencies are r i 1 , r i 2 , …, r i n , and thus, the rate vector of this day is r i = [ r i 1 , r i 2 , , r i n ] T . Thus, the unit buying vector for the ith day can be computed from the point-by-point division of the investment vector by the rate vector, i.e., u i =   x i r i , as follows:
[ u i 1 , u i 2 , , u i n ] T = [ x i 1 r i 1 , x i 2 r i 2 , , x i n r i n ] T
The next day, the rate vector updates to r i + 1 = [ r ( i + 1 ) 1 , r ( i + 1 ) 2 , , r ( i + 1 ) n ] T , and thus, the investment vector of the next day will also update accordingly as follows:
x i + 1 = [ x i 1 r i 1 × r ( i + 1 ) 1 , x i 2 r i 2 × r ( i + 1 ) 2 , , x i n r i n × r ( i + 1 ) n ] T
For this updated investment vector, the total updated investment will be as follows:
x i + 1 = | x i + 1 | 1 = r = 1 n x ( i + 1 ) j

3.1.3. Profit Function

Use these total investments x i + 1 and x i of the ith and ( i + 1 ) th days, respectively. The profit f ( x i ) will be their difference, and thus, if the total investment of the next day is increased, then the profit will be positive, otherwise negative. The notation f ( x i ) is used to represent the earned profit depending on the investment of the previous day. The formulation of the profit function f ( x i ) is as follows:
f ( x i ) = x i + 1 x i = | x i + 1 | 1 | x i | 1 = j = 1 n x ( i + 1 ) j j = 1 n x i j = j = 1 n x i j r i j × r ( i + 1 ) j j = 1 n ( x i j r i j × r ( i + 1 ) j x i j ) = j = 1 n x i j ( r ( i + 1 ) j r i j 1 )

3.1.4. Optimization Problem

At this stage, we have a profit function f ( x i ) , which needs to be maximized with respect to the investment. For this purpose, the gradient ascent method was considered, which maximizes the function as follows:
x i + 1 = x i + η f ( x i )
where η is the learning rate and f ( x i ) is the gradient vector of the profit function on the ith day. Contrary to the contemporary batch gradient ascent, mini-batch gradient ascent, and stochastic gradient ascent methods, which compute the gradient of the profit function using all dataset points or its sample, the proposed formulation of the profit gradient in Equation (7) depends on instantaneous rate updates only. Depending on the stochastic nature of the forex market rate updates and the employment of only instantaneous rate updates, the proposed methodology is named instantaneous stochastic gradient ascent. Using this profit gradient, the concrete gradient ascent formulation for our problem to maximize the profit function for the dynamic forex market becomes as stated in Equations (8) and (9):
f ( x i ) = [ f x i 1 , f x i 2 , , f x i n ] = [ r ( i + 1 ) 1 r i 1 1 , r ( i + 1 ) 2 r i 2 1 , , r ( i + 1 ) n r i n 1 ] T
x ( i + 1 ) 1 x ( i + 1 ) 2 x ( i + 1 ) n = x i 1 x i 2 x i n + η r ( i + 1 ) 1 r i 1 1 r ( i + 1 ) 2 r i 2 1 r ( i + 1 ) n r i n 1 = x i 1 x i 2 x i n + η r ( i + 1 ) 1 r i 1 r i 1 r ( i + 1 ) 2 r i 2 r i 2 r ( i + 1 ) n r i n r i n
x i + 1 = x i + η ( r i + 1 r i ) r i
This formulation of instantaneous gradient ascent states that the update to the investment vector is directly proportional to the difference of the rate vectors of the consecutive days point-by-point divided by the last day’s rate vector. Thereby, as the rate vector is updated, the investment vector is to be updated accordingly for the optimized total investment. The flow diagram of the proposed algorithm is shown in Figure 1. The pseudocode to implement proposed instantaneous stochastic gradient ascent is mentioned in Algorithm 1.
Algorithm 1: Proposed Instantaneous Stochastic Gradient Ascent Pseudocode
Inputs  :
Initial investment vector x 1
Rate Vectors r 1 , r 2 , r 3 , r n
u 1 = x 1 r 1
Algorithm:
i = 1
while (rate is being updated)
| x i + 1 = x i + η ( r i + 1 r i ) r i i = i + 1 u i + 1 = x i + 1 r i + 1
end
Output  :
u i , x i

4. Experiment and Results

The experiment was initially conducted based on an equal amount (RS:200000/-) of investment for each entity, i.e., gold (XD) and four currencies, dollars (USD), Euros (EUR), Dirhams (AED), and Russian rubles (RUB), in the forex market based on the data of the whole year 2020. In our experiments, we selected the learning rate η = 1 . The rates of currencies were obtained from https://www.exchangerates.org.uk/ (access date 1 January 2020), whereas gold rates were obtained from https://www.gold.pk/. To compare with conventional banking sector investments, the KIBOR rates (standard banking investment profit controlled by the state bank of Pakistan) were obtained from https://www.khistocks.com/market-data/kibor-rates.html, as shown in Table 1. Additionally, the updated proposed investment and KIBOR investment are also shown in this table. We note that, although we performed experiments in the whole year 2020 with promising results, considering the limitation of space, the investment updates are reported up to 8th May 2020 only.
Initially, we allocated the investment equally among four different foreign currencies and gold (tola) on the first day. The total amount of investment was around ten-hundred-thousand Pak rupees. We equally distributed the investment of PRK 20,000 for each currency and gold. This is because there was no previous rate of currency and gold. On the next day, new rates of currencies and gold were updated, and the proposed instantaneous gradient ascent method starts to work. The dataset details of various currencies along with the updated proposed investment and updated KIBOR investment are given in Table 1.
Table 1 shows that the currency values fluctuate in Pakistani rupees. Figure 2 shows the graphical representation of these fluctuations. It can be seen that fluctuations belong to both upgrading and degrading of the currency values. The last two columns of Table 1 show how the proposed investment strategy and contemporary KIBOR-based banking investment update the invested amount. The comparison shows that the proposed instantaneous-stochastic-gradient-ascent-based investment outperforms all the conventional KIBOR-based investments. However, with its overall performance, there is a constraint associated with the proposed technique, which is observable in the abrupt downgrading in an entity’s value.
For example, in the month of January 2020, the amount of updated investment using the proposed instantaneous gradient ascent increased up to 3% due to minor changes in the rate of the currencies and gold rate, which are exploited well by the proposed methodology. However, at the end of January, there is a decline in the amount of investment because of the sudden reduction in the rate of gold. This sudden reduction was not exploited by the proposed methodology effectively and, thus, resulted in a loss. This shock was followed by stability and sustainability in the amount of investment till February. The result shows that there was an overall 11% increase in the amount of investment till April 2020 in addition to overcoming the loss of the sudden reduction of the gold rate. This shows the strength of our proposed method in that it works well and acquires profit in the forex market.
It was observed that the proposed investment strategy may have a constrained inefficacy when there is a sudden reduction in a value of a currency or the gold rate. This does not result in the crashing of forex reserves; instead, this inefficacy is constrained by the sustainable nature of the proposed methodology and, thus, results in minor losses in percentages, which are even recoverable in very few next investment updates in such a way that the overall invested amount is still outperforming as compared to the contemporary KIBOR investment (see Figure 3). These losses can be reduced by incorporating the appropriate forex forecasting using machine learning.
In this regard, the forecasting as reported by C. I. Lee et al. [39] and Y. L. Yong et al. [40] is considered as classification. For this, forecasting with a nominal accuracy of 75% was simulated for minimizing this constrained inefficacy in the proposed technique. For this, we considered profit as positive, whereas loss as negative classes. In this regard, if prediction is positive, the forecasting results in investing according to the formulated strategy in the forex market, whereas, if the prediction is negative, the forecasting results in a restraint in investing. Thereby, if the positive prediction is false (false positive), it will result in investment loss, whereas if the negative prediction is false (false negative), it will result in a restraint in investment with missing the chance to obtain the profit. Thus, false positives result in loss, whereas false negatives result in maintaining the investment amount; thus, false positive and false positive have unequal associated costs. In simulating the said nominally, 75% accurate forecasting can perform differently based on the proportion of false positives and false negatives. We considered the worst scenario, i.e., considering the maximum number of false positives as compared to false negatives from 25% false predictions. The performance was then compared with a combined support vector machine and genetic algorithm, random walk, buy and hold, sell and hold, and static genetic-algorithm-based benchmark forex investment strategies for the same time period (2 January 2015 to 2 March 2016) as reported by B. J. Almeida [41].
The results show the proposed instantaneous-stochastic-gradient-ascent-based forex investment when combined with a forecasting technique even with nominally accurate forecasting as shown in Table 2. For comparison, the return on investment (ROI), defined in Equation (10), was considered as employed by B. J. Almeida [41]. We note that, during the pandemic, the host currency (Pakistani rupee) remained relatively stable because of payment relaxation in loans from the World Bank, etc. [42,43], which played a role in the stabilization of the Pakistani economy, as acknowledged by the International Monitory Fund [44]. Since the proposed model exploits currency fluctuations, the performance is likely to be boosted for those years having more fluctuations as compared to the pandemic year of 2020.
R O I ( X ) = R e t u r n ( X ) I n v e s t m e n t ( X ) I n v e s t m e n t ( X )
In addition to the time slot, the proposed instantaneous stochastic gradient ascent (ISGA) investment combined with forecasting was also applied to the whole year of 2020, and the results were quite encouraging, as depicted in Figure 4.

5. Conclusions

This research addressed the fluctuating and dynamic time series problem of forex investment in which profitable strategies are critical for sustainable investment. Contrary to the conventional investment strategies, a machine-learning-based automated and adaptive strategy was formulated and implemented in this research. The proposed strategy recommends working in multiple renowned currencies considering the geo-economic situation. The formulation of the proposed methodology was motivated by the stochastic gradient ascent method such that it results in an automated and adaptive investment strategy based on the next time internal forex market situation. In addition to this, the formulation of the proposed instantaneous stochastic gradient ascent method is generic and, thus, can be applied to any base currency, as well as any number of currencies. To validate the formulation of the proposed ISGA method, it was applied to the interbank data of the forex market for the year 2020. The experiments showed that the proposed investment strategy resulted in increased investment sustainability. Unluckily, the proposed investment strategy may have an inefficacy when there is a sudden reduction in the value of a currency or gold rate. Fortunately, this inefficacy is constrained by the sustainable nature of the proposed investment since it considers multiple currencies. In this regard, a larger number of currencies is more probable in the increased sustainable forex investment. Although this constrained inefficacy is recoverable in the next few investment days, the employment of even a nominal forex forecast increases the investment sustainability effectively.

Author Contributions

Conceptualization, I.M. and A.S.; methodology, A.S. and A.I.; validation, R.B; formal analysis, I.M.; resources, A.A.(Abdulkareem Alzahrani); data curation, A.A. (Abdullah Almuhaimeed) and R.B.; visualization, A.A. (Abdullah Almuhaimeed); software, A.A. (Abdulkareem Alzahrani); writing—original draft preparation, A.S.; writing—review and editing, I.M.; supervision, A.A. (Abdullah Almuhaimeed); funding acquisition, A.I. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Chambers, J.; Yan, W.; Garhwal, A.; Kankanhalli, M. Currency security and forensics: A survey. Multimed. Tools Appl. 2015, 74, 4013–4043. [Google Scholar] [CrossRef] [Green Version]
  2. Fauzi, M.A.; Paiman, N.; Othman, Z. Bitcoin and cryptocurrency: Challenges, opportunities and future works. J. Asian Financ. Econ. Bus. 2020, 7, 695–704. [Google Scholar] [CrossRef]
  3. Vranken, H. Sustainability of bitcoin and blockchains. Curr. Opin. Environ. Sustain. 2017, 28, 1–9. [Google Scholar] [CrossRef] [Green Version]
  4. Schneider, G.; Troeger, V.E. War and the world economy: Stock market reactions to international conflicts. J. Confl. Resolut. 2006, 50, 623–645. [Google Scholar] [CrossRef]
  5. Mihajlovna, S.K. US-China Trade War: Possible Consequences for Russia and the World Economy; Saint Petersburg State University: St. Petersburg, Moscow, Russia, 2020. [Google Scholar]
  6. Hughes, D. The End of US Petrodollar Hegemony? In Proceedings of the BISA Annual Conference, Bath, UK, 12–15 June 2018. [Google Scholar]
  7. Taskinsoy, J. Diminishing American Power: The US-China Trade War, Sanctions, and Coronavirus. In Sanctions, and Coronavirus (August 20, 2020); Elsevier: Amsterdam, The Netherlands, 2020. [Google Scholar]
  8. Guo, D.; Zhou, P. The rise of a new anchor currency in RCEP? A tale of three currencies. Econ. Model. 2021, 104, 105647. [Google Scholar] [CrossRef]
  9. Lau, L.J. The China–US trade war and future economic relations. China World 2019, 2, 1950012. [Google Scholar] [CrossRef]
  10. Oosthoek, K. Flash crash for cash: Cyber threats in decentralized finance. arXiv 2021, arXiv:2106.10740. [Google Scholar]
  11. Grossbard, J. Justin Grossbard. 2022 Forex Statistics. Available online: https://www.compareforexbrokers.com/forex-trading/statistics/ (accessed on 25 May 2022).
  12. Bredin, D.; Hyde, S. FOREX Risk: Measurement and evaluation using value-at-risk. J. Bus. Financ. Account. 2004, 31, 1389–1417. [Google Scholar] [CrossRef]
  13. Dumas, B.; Solnik, B. The world price of foreign exchange risk. J. Financ. 1995, 50, 445–479. [Google Scholar] [CrossRef]
  14. Maggiori, M.; Neiman, B.; Schreger, J. The rise of the dollar and fall of the euro as international currencies. AEA Pap. Proc. 2019, 109, 521–526. [Google Scholar] [CrossRef] [Green Version]
  15. Siddiqui, K. The US Dollar and the World Economy; ZBW: Kiel, Germany, 2020. [Google Scholar]
  16. Menon, J. Dealing with multiple currencies: What options for the transitional economies of Southeast Asia? J. Asia Pac. Econ. 2008, 13, 131–146. [Google Scholar] [CrossRef]
  17. Craig, B.R.; Waller, C.J. Dual-currency economies as multiple-payment systems. Econ. Rev. 2000, 36, 2–13. [Google Scholar]
  18. Menon, J. Dealing with Dollarization: What Options for the Transitional Economies of Southeast Asia? Asian Development Bank: Mandaluyong, Philippines, 2007. [Google Scholar]
  19. Colacelli, M.; Blackburn, D.J. Secondary currency: An empirical analysis. J. Monet. Econ. 2009, 56, 295–308. [Google Scholar] [CrossRef]
  20. Voutilainen, M.; Turunen, R.; Ojala, J. Multi-currency regime and markets in early nineteenth-century Finland. Financ. Hist. Rev. 2020, 27, 115–138. [Google Scholar] [CrossRef]
  21. Haji, S.H.; Abdulazeez, A.M. Comparison of optimization techniques based on gradient descent algorithm: A review. PalArch’s J. Archaeol. Egypt/Egyptol. 2021, 18, 2715–2743. [Google Scholar]
  22. ter Ellen, S.; Verschoor, W.F.; Zwinkels, R.C. Dynamic expectation formation in the foreign exchange market. J. Int. Money Financ. 2013, 37, 75–97. [Google Scholar] [CrossRef]
  23. Netrapalli, P. Stochastic gradient descent and its variants in machine learning. J. Indian Inst. Sci. 2019, 99, 201–213. [Google Scholar] [CrossRef]
  24. Chen, Z. The impact of trade and financial expansion on volatility of real exchange rate. PLoS ONE 2022, 17, e0262230. [Google Scholar] [CrossRef]
  25. Sidehabi, S.W.; Tandungan, S. Statistical and machine learning approach in forex prediction based on empirical data. In Proceedings of the 2016 International Conference on Computational Intelligence and Cybernetics, Makassar, Indonesia, 22–24 November 2016; pp. 63–68. [Google Scholar]
  26. Mahalakshmi, G.; Sridevi, S.; Rajaram, S. A survey on forecasting of time series data. In Proceedings of the 2016 International Conference on Computing Technologies and Intelligent Data Engineering (ICCTIDE’16), Kovilpatti, India, 7–9 January 2016; pp. 1–8. [Google Scholar]
  27. Tseng, F.M.; Tzeng, G.H.; Yu, H.C.; Yuan, B.J. Fuzzy ARIMA model for forecasting the foreign exchange market. Fuzzy Sets Syst. 2001, 118, 9–19. [Google Scholar] [CrossRef]
  28. Rout, M.; Majhi, B.; Majhi, R.; Panda, G. Forecasting of currency exchange rates using an adaptive ARMA model with differential evolution based training. J. King Saud-Univ.-Comput. Inf. Sci. 2014, 26, 7–18. [Google Scholar] [CrossRef] [Green Version]
  29. Yura, Y.; Takayasu, H.; Nakamura, K.; Takayasu, M. Rapid detection of the switching point in a financial market structure using the particle filter. J. Stat. Comput. Simul. 2014, 84, 2073–2090. [Google Scholar] [CrossRef]
  30. Latif, J.; Xiao, C.; Tu, S.; Rehman, S.U.; Imran, A.; Bilal, A. Implementation and use of disease diagnosis systems for electronic medical records based on machine learning: A complete review. IEEE Access 2020, 8, 150489–150513. [Google Scholar] [CrossRef]
  31. Latif, J.; Xiao, C.; Imran, A.; Tu, S. Medical imaging using machine learning and deep learning algorithms: A review. In Proceedings of the 2019 2nd International Conference on Computing, Mathematics and Engineering Technologies (iCoMET), Sukkur, Pakistan, 30–31 January 2019; pp. 1–5. [Google Scholar]
  32. Sezer, O.B.; Gudelek, M.U.; Ozbayoglu, A.M. Financial time series forecasting with deep learning: A systematic literature review: 2005–2019. Appl. Soft Comput. 2020, 90, 106181. [Google Scholar] [CrossRef]
  33. Hu, Z.; Zhao, Y.; Khushi, M. A survey of forex and stock price prediction using deep learning. Appl. Syst. Innov. 2021, 4, 9. [Google Scholar] [CrossRef]
  34. Kim, K.J. Financial time series forecasting using support vector machines. Neurocomputing 2003, 55, 307–319. [Google Scholar] [CrossRef]
  35. Jaiwang, G.; Jeatrakul, P. Enhancing support vector machine model for stock trading using optimization techniques. In Proceedings of the 2018 International Conference on Digital Arts, Media and Technology (ICDAMT), Chiangrai, Thailand, 25–28 February 2018; pp. 23–28. [Google Scholar]
  36. Achkar, R.; Elias-Sleiman, F.; Ezzidine, H.; Haidar, N. Comparison of BPA-MLP and LSTM-RNN for stocks prediction. In Proceedings of the 2018 6th International Symposium on Computational and Business Intelligence (ISCBI), Basel, Switzerland, 27–29 August 2018; pp. 48–51. [Google Scholar]
  37. Jarusek, R.; Volna, E.; Kotyrba, M. FOREX rate prediction improved by Elliott waves patterns based on neural networks. Neural Netw. 2022, 145, 342–355. [Google Scholar] [CrossRef]
  38. Saud, A.S.; Shakya, S. Analysis of gradient descent optimization techniques with gated recurrent unit for stock price prediction: A case study on banking sector of Nepal stock exchange. J. Inst. Sci. Technol. 2019, 24, 17–21. [Google Scholar] [CrossRef] [Green Version]
  39. Lee, C.I.; Chang, C.H.; Hwang, F.N. Currency exchange rate prediction with long short-term memory networks based on attention and news sentiment analysis. In Proceedings of the 2019 International Conference on Technologies and Applications of Artificial Intelligence (TAAI), Beijing, China, 1–3 August 2019; pp. 1–6. [Google Scholar]
  40. Yong, Y.L.; Lee, Y.; Gu, X.; Angelov, P.P.; Ngo, D.C.L.; Shafipour, E. Foreign Currency Exchange Rate Prediction Using Neuro-fuzzy Systems. Available online: https://core.ac.uk/download/pdf/153320499.pdf (accessed on 1 May 2022).
  41. de Almeida, B.J.; Neves, R.F.; Horta, N. Combining Support Vector Machine with Genetic Algorithms to optimize investments in Forex markets with high leverage. Appl. Soft Comput. 2018, 64, 596–613. [Google Scholar] [CrossRef]
  42. Group, W.B. World Bank Fast-Tracks Support for COVID-19 (Coronavirus) Response to Pakistan; World Bank: Singapore, 2020. [Google Scholar]
  43. Bank, A.D. ADB $500 Million Loan to Help Protect Poor, Strengthen Pakistan’s COVID-19 Health and Economic Response; Asian Development Bank: Mandaluyong, Philippines, 2020. [Google Scholar]
  44. IMF Country Report no. 21/73 Pakistan—Ministry of Finance; IMF: Washington, DC, USA, 2021.
Figure 1. Flow diagram to implement the proposed algorithm.
Figure 1. Flow diagram to implement the proposed algorithm.
Sustainability 14 15328 g001
Figure 2. Graphical illustration of the currency rates and the comparison of the proposed investment strategy with the KIBOR-based contemporary banking investment. (a) Dollar conversion rate to PKR; (b) Euro conversion rate to PKR; (c) Dirham conversion rate to PKR; (d) ruble conversion rate to PKR; (e) gold conversion rate to PKR; (f) updated investment.
Figure 2. Graphical illustration of the currency rates and the comparison of the proposed investment strategy with the KIBOR-based contemporary banking investment. (a) Dollar conversion rate to PKR; (b) Euro conversion rate to PKR; (c) Dirham conversion rate to PKR; (d) ruble conversion rate to PKR; (e) gold conversion rate to PKR; (f) updated investment.
Sustainability 14 15328 g002
Figure 3. KIBOR rate of the year 2020.
Figure 3. KIBOR rate of the year 2020.
Sustainability 14 15328 g003
Figure 4. Updated investment for the whole year of 2020 using the proposed ISGA on 75% forecasting.
Figure 4. Updated investment for the whole year of 2020 using the proposed ISGA on 75% forecasting.
Sustainability 14 15328 g004
Table 1. Dataset of various currencies along with updated proposed investment and updated KIBOR investment.
Table 1. Dataset of various currencies along with updated proposed investment and updated KIBOR investment.
DateDollar (USD)Euro (EUR)Dirham (AED)Russian Ruble (RUB)Gold (Tola)Updated Proposed InvestmentUpdated KIBOR Investment
2 January 20154.88173.6442.172.5188,3001,000,000.001,000,273.97
3 January 20154.90172.6142.172.4989,650999,268.391,000,547.95
6 January 20154.96173.2442.192.4993,4001,030,970.061,000,821.92
7 January 20155.01173.3342.202.5192,1001,030,970.161,001,095.89
8 January 20155.08172.5942.222.5193,0001,030,970.031,001,369.86
9 January 20154.89172.2142.172.5390,5001,030,970.301,001,643.84
10 January 20154.83171.8142.152.5389,8001,030,970.671,001,917.81
13 January 20154.85172.2242.162.5489,0001,030,970.161,002,191.78
14 January 20154.85172.4242.162.5289,2001,030,969.901,002,465.75
15 January 20154.78172.2842.142.5289,0001,030,969.991,002,739.73
16 January 20154.66172.5642.112.5189,0001,030,969.711003,013.70
17 January 20154.57172.0342.082.5189,3001,030,970.071,003,287.67
20 January 20154.60171.3842.092.5189,8001,030,970.811,003,561.64
21 January 20154.61171.4442.092.5090,7001,030,970.651,003,835.62
22 January 20154.53171.2442.072.4990,3001,030,970.991,004,109.59
23 January 20154.61171.3642.092.5090,150995,083.481,004,383.56
24 January 20154.57170.7842.082.5090,300995,083.481,004,657.53
27 January 20154.57170.3542.082.4791400995,083.721,004,931.51
28 January 20154.57170.2942.082.4591,400995,083.781,005,205.48
29 January 20154.56170.0542.082.4790,900995,084.041,005,479.45
30 January 20154.47170.2242.052.4591,400995,083.821,005,753.42
31 January 20154.49170.2842.062.4491,500995,083.751,006,027.40
3 February 20154.51170.9442.072.4291,100995,083.041,006,301.37
4 February 20154.41170.7542.042.4490,700995,083.131,006,575.34
6 February 20154.49169.9142.062.4590,750995,083.621,006,849.32
7 February 20154.41169.2842.042.4390,250995,084.551,007,123.29
10 February 20154.43169.1042.042.4290,450995,084.911,007,397.26
11 February 20154.42168.5542.042.4190,700995,086.151,007,671.23
12 February 20154.36168.5942.032.4590,600995086.051,007,945.21
13 February 20154.38168.0442.032.4390,450995,087.551,008,219.18
14 February 20154.17167.2041.972.4290,750995,090.381,008,493.15
17 February 20154.28167.3842.002.4490,800995,089.611,008,767.12
18 February 20154.23167.0241.992.4291,150995,091.031,009,041.10
19 February 20154.26166.6442.002.4392,500995,092.671,009,315.07
20 February 20154.24166.6241.992.4294,300995,092.791,009,589.04
21 February 20154.20166.8141.982.4096,350995,091.911,009,863.01
24 February 20154.21167.0541.982.3796,3001033756.521,010,136.99
25 February 20154.26167.4942.002.36936501,033,756.511,010,410.96
26 February 20154.25168.0141.992.3594,9751,033,756.731,010,684.93
27 February 20154.21168.6641.982.3495,2001,033,757.351,010,958.90
28 February 20154.23170.3641.992.2992,5001,033,760.071,011,232.88
2 March 20154.37170.8342.032.3292,3001,033,761.591,011,506.85
3 March 20154.29171.4942.002.3392,4001,033,764.051,011,780.82
4 March 20154.21172.1741.982.3494,1001,033,767.051,012,054.79
5 March 20154.27171.8442.002.3294,8001,033,765.401,012,328.77
6 March 20154.24173.8841.992.2994,1001,033,775.151,012,602.74
9 March 20156.58178.3042.632.1194,5001,033,805.311,012,876.71
10 March 20157.45178.7842.872.1997,4001,048,680.991,013,150.68
11 March 20158.42179.3743.132.2296,3001,048,681.071,013,424.66
12 March 20159.13179.2143.322.1394,5001,048,681.721,013,698.63
13 March 20158.98177.9143.282.1893,6001,048,680.741,013,972.60
16 March 20158.41177.9043.132.1189,0001,048,679.801,014,246.58
17 March 20158.43175.8943.132.1289,5001,048,681.401,014,520.55
18 March 20158.52173.7543.162.0489,3001,048,687.471,014,794.52
19 March 20158.58172.1843.172.0087,5001,048,695.331,015,068.49
20 March 20158.68171.1943.202.0489,9001,048,701.871,015,342.47
24 March 20159.01172.5743.292.0293,2001,048,691.991,015,616.44
25 March 20161.61175.2344.002.0996,1001,048,680.101,015,890.41
26 March 20166.13181.7545.232.1196,6001,048,677.911,016,164.38
27 March 20165.54182.7245.072.13100,1001,048,675.341,016,438.36
30 March 20166.14184.2445.232.08100,1001,048,686.701,016,712.33
31 March 20166.70183.1445.382.1399,5001,048,685.841,016,986.30
01 April 20166.83182.7445.422.1198,5001,048,685.321,017,260.27
02 April 20166.93182.2745.452.1499,3001,048,684.401,017,534.25
03 April 20166.77179.9945.402.16100,6001,048,674.591,017,808.22
6 April 20166.99180.2745.462.19101,3001,048,677.181,018,082.19
7 April 20167.90182.3645.712.22101,7001,048,689.791,018,356.16
8 April 20167.76182.0645.672.21101,5001,048,687.161,018,630.14
9 April 20167.19181.7145.522.24101,6001,048,679.611,018,904.11
10 April 20166.79182.4345.412.26105,2001,048,677.691,019,178.08
13 April 20166.83182.3845.422.27105,1001,048,677.821,019,452.05
14 April 20166.95182.3845.452.27107,2001,108,154.301,019726.03
15 April 20166.98182.5345.462.26107,6001,108,154.301,020,000.00
16 April 20166.88181.4945.432.25107,2001,108,154.131,020,273.97
17 April 20163.58177.2144.532.21106,9001,114,781.471,020,547.95
20 April 20163.49178.1044.512.20103,2001,114,781.401,020,821.92
21 April 20161.13174.6843.872.10103,2501,114,779.051,021,095.89
22 April 20160.36174.2343.662.09101,7001,114,782.311,021,369.86
23 April 20159.98172.6943.562.13101,5001,114,788.391,021,643.84
24 April 20160.48172.3243.692.15102,8001,063,950.551,021,917.81
28 April 20161.65175.4844.012.17102,4001,063,950.601,022,191.78
29 April 20161.61175.6544.002.19102,6001,063,951.091,022,465.75
30 April 20160.17174.1843.612.20103,5001,063,944.411,022,739.73
4 May 20159.91174.9343.542.12102,3001,063,945.891,023,013.70
5 May 20159.65174.1443.472.16102,0001,042,981.221,023,287.67
6 May 20160.06172.7543.582.15101,9001,042,981.231,023,561.64
7 May 20160.23173.0843.622.17102,2001,042,980.841,023,835.62
8 May 20159.97173.1643.552.17103,2001,042,980.601,024,109.59
Table 2. Return-on-investment–based comparison of the proposed instantaneous-gradient-ascent-based forex investment with the standard forex investment strategies.
Table 2. Return-on-investment–based comparison of the proposed instantaneous-gradient-ascent-based forex investment with the standard forex investment strategies.
Investment StrategyROI
Random Walk−22.3
Buy and Hold−72.2
Sell and Hold72.2
Static Genetic Algorithm12.5
Average SVM+GA43.9
Best SVM+GA83.5
Average Proposed ISGA + Forecasting80.7
Best Proposed ISGA + Forecasting92.9
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Murtza, I.; Saadia, A.; Basri, R.; Imran, A.; Almuhaimeed, A.; Alzahrani, A. Forex Investment Optimization Using Instantaneous Stochastic Gradient Ascent—Formulation of an Adaptive Machine Learning Approach. Sustainability 2022, 14, 15328. https://doi.org/10.3390/su142215328

AMA Style

Murtza I, Saadia A, Basri R, Imran A, Almuhaimeed A, Alzahrani A. Forex Investment Optimization Using Instantaneous Stochastic Gradient Ascent—Formulation of an Adaptive Machine Learning Approach. Sustainability. 2022; 14(22):15328. https://doi.org/10.3390/su142215328

Chicago/Turabian Style

Murtza, Iqbal, Ayesha Saadia, Rabia Basri, Azhar Imran, Abdullah Almuhaimeed, and Abdulkareem Alzahrani. 2022. "Forex Investment Optimization Using Instantaneous Stochastic Gradient Ascent—Formulation of an Adaptive Machine Learning Approach" Sustainability 14, no. 22: 15328. https://doi.org/10.3390/su142215328

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop