Skip to main content
Log in

Optimal liquidation of foreign currencies when FX rates follow a generalised Ornstein-Uhlenbeck process

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

In this article, we consider the case of a multinational company realizing profits in a country other than its base country. The currencies used in the base and foreign countries are referred to as the domestic and foreign currencies respectively. For its quarterly and yearly financial statements, the company transfers its profits from a foreign bank account to a domestic bank account. Thus, the foreign currency liquidation task consists formally in exchanging over a period T a volume V of cash in the foreign currency f for a maximum volume of cash in the domestic currency d. The foreign exchange (FX) rate that prevails at time t is denoted Xd/f(t) and is defined as the worth of one unit of currency d in the currency f. We assume in this article that the natural logarithm of the FX rate \(x_{t}=\log X_{d/f}(t)\) follows a discrete generalized Ornstein-Uhlenbeck (OU) process, a process which generalizes the Brownian motion and mean-reverting processes. We also assume minimum and maximum volume constraints on each transaction. Foreign currency liquidation exposes the multinational company to financial risks and can have a significant impact on its final revenues, since FX rates are hard to predict and often quite volatile. We introduce a Reinforcement Learning (RL) framework for finding the liquidation strategy that maximizes the expected total revenue in the domestic currency. Despite the huge success of Deep Reinforcement Learning (DRL) in various domains in the recent past, existing DRL algorithms perform sub-optimally in this task and the Stochastic Dynamic Programming (SDP) algorithm – which yields the optimal strategy in the case of discrete state and action spaces – is rather slow. Thus, we propose here a novel algorithm that addresses both issues. Using SDP, we first determine numerically the optimal solution in the case where the state and decision variables are discrete. We analyse the structure of the computed solution and derive an analytical formula for the optimal trading strategy in the general continuous case. Quasi-optimal parameters of the analytical formula can then be obtained via grid search. This method, simply referred to as ”Estimated Optimal Liquidation Strategy” (EOLS) is validated experimentally using the Euro as domestic currency and 3 foreign currencies, namely USD (US Dollar), CNY(Chinese Yuan) and GBP(Great British Pound). We introduce a liquidation optimality measure based on the gap between the average transaction rate captured by a strategy and the minimum rate over the liquidation period. The metric is used to compare the performance of EOLS to the Time Weighted Average Price (TWAP), SDP and the DRL algorithms Deep Q-Network (DQN) and Proximal Policy Optimization (PPO). The results show that EOLS outperforms TWAP by 54%, and DQN and PPO by 15 − 27%. EOLS runs in average 20 times faster than DQN and PPO. It has a performance on par with SDP but runs 44 times faster. EOLS is the first algorithm that utilizes a closed-form solution of the SDP strategy to achieve quasi-optimal decisions in a liquidation task. Compared with state-of-the-art DRL algorithms, it exhibits a simpler structure, superior performance and significantly reduced compute time, making EOLS better suited in practice.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  1. Sutton RS, Barto AG (2018) Reinforcement Learning: An Introduction. 2nd edn, Cambridge. http://incompleteideas.net/book/the-book-2nd.html

  2. LeCun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521(7553):436–444. https://doi.org/10.1038/nature14539

    Article  Google Scholar 

  3. Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780. https://doi.org/10.1162/neco.1997.9.8.1735

    Article  Google Scholar 

  4. Mnih V, Kavukcuoglu K, Silver D, Graves A, Antonoglou I, Wierstra D, Riedmiller MA (2013) Playing atari with deep reinforcement learning. arXiv:1312.5602

  5. Schulman J, Wolski F, Dhariwal P, Radford A, Klimov O (2017) Proximal policy optimization algorithms. arXiv:1707.06347

  6. Lillicrap TP, Hunt JJ, Pritzel A, Heess N, Erez T, Tassa Y, Silver D, Wierstra D (2019) Continuous control with deep reinforcement learning

  7. Berkowitz SA (1988) The total cost of transactions on the NYSE. Hoboken, Wiley. NJ [u.a.]. NYSE = New York Stock Exchange

    Book  Google Scholar 

  8. Bertsimas D, Lo A (1998) Optimal control of execution costs. J Financ Mark 1(1):1–50

    Article  Google Scholar 

  9. Almgren R, Chriss N (2000) Optimal execution of portfolio transactions. J Risk, 5–39

  10. Hendricks D, Wilcox D (2014) A reinforcement learning extension to the almgren-chriss framework for optimal trade execution. In: 2014 IEEE Conference on computational intelligence for financial engineering economics (CIFEr), pp 457–464, DOI https://doi.org/10.1109/CIFEr.2014.6924109

  11. Théate T, Ernst D (2021) An application of deep reinforcement learning to algorithmic trading. Expert Syst Appl 173:114632

    Article  Google Scholar 

  12. Nevmyvaka Y, Feng Y, Kearns M (2006) Reinforcement learning for optimized trade execution. In: Proceedings of the 23rd International Conference on Machine Learning. ICML ’06. Association for Computing Machinery, New York, pp 673–680, DOI https://doi.org/10.1145/1143844.1143929

  13. Ning B, Ling FHT, Jaimungal S (2018) Double deep q-learning for optimal execution. arXiv:1812.06600

  14. Ye Z, Deng W, Zhou S, Xu Y, Guan J (2020) Optimal trade execution based on deep deterministic policy gradient. In: DASFAA (1), pp 638–654, DOI https://doi.org/10.1007/978-3-030-59410-7_42

  15. Lin S, Beling PA (2020) An end-to-end optimal trade execution framework based on proximal policy optimization. In: Bessiere C (ed) Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20. Special Track on AI in FinTech, https://doi.org/10.24963/ijcai.2020/627. International Joint Conferences on Artificial Intelligence Organization, Yokohama, pp 4548–4554

  16. Schnaubelt M (2022) Deep reinforcement learning for the optimal placement of cryptocurrency limit orders. Eur J Oper Res 296(3):993–1006

    Article  MathSciNet  MATH  Google Scholar 

  17. Deng Y, Bao F, Kong Y, Ren Z, Dai Q (2016) Deep direct reinforcement learning for financial signal representation and trading. IEEE Transactions on Neural Networks and Learning Systems 28 (3):653–664

    Article  Google Scholar 

  18. Wu X, Chen H, Wang J, Troiano L, Loia V, Fujita H (2020) Adaptive stock trading strategies with deep reinforcement learning methods. Inf Sci 538:142–158

    Article  MathSciNet  Google Scholar 

  19. Aboussalah AM, Lee C-G (2020) Continuous control with stacked deep dynamic recurrent reinforcement learning for portfolio optimization. Expert Syst Appl 140:112891

    Article  Google Scholar 

  20. Malliaris AG (1990) Wiener Process. In: Time Series and Statistics. Palgrave Macmillan, London, pp 316–318, DOI https://doi.org/10.1007/978-1-349-20865-4_43

  21. Abadi M, Agarwal A, Barham P, Brevdo E, Chen Z, Citro C, Corrado GS, Davis A, Dean J, Devin M, Ghemawat S, Goodfellow I, Harp A, Irving G, Isard M, Jia Y, Jozefowicz R, Kaiser L, Kudlur M, Levenberg J, Mané D, Monga R, Moore S, Murray D, Olah C, Schuster M, Shlens J, Steiner B, Sutskever I, Talwar K, Tucker P, Vanhoucke V, Vasudevan V, Viégas F, Vinyals O, Warden P, Wattenberg M, Wicke M, Yu Y, Zheng X (2015) TensorFlow : Large-Scale Machine Learning on Heterogeneous Systems. https://www.tensorflow.org/

Download references

Funding

This study was funded by Daimler AG.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Linwei Li.

Ethics declarations

Consent for Publication

All authors agree to publish the article in the Journal of Applied Intelligence.

Conflict of Interests

The authors have no relevant financial or non-financial interests to disclose.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, L., Matt, PA. & Heumann, C. Optimal liquidation of foreign currencies when FX rates follow a generalised Ornstein-Uhlenbeck process. Appl Intell 53, 1391–1404 (2023). https://doi.org/10.1007/s10489-022-03280-2

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-022-03280-2

Keywords

Navigation