Machine Learning Applications on Algorithmic Trading in the Foreign Exchange Market - Gouveia, André Nunes Correia (2021)
Nowadays, the largest share of trades done in market exchanges are made by computers. This has been proving to be the main way to invest in the various exchanges. Since the turn of the 20th century, the total volume of trades performed automatically by machines in the United States stock market as gone up from 15% to around 80%. Similarly, in the foreign exchange market, the largest market of the world with over 6 trillion US dollars in daily trade volume during 2019, it is estimated that the large majority of trades are also made by computers. With the possibility of using machines to trade for us, it makes sense to consider a mathematical theory that deals with modeling prices and financial products, and to program a software to take advantage of this information. Since the last century, another type of models have also been developed that have the capability of adapting themselves, or learn, with the information that they are provided. The objective of this thesis is to implement a strategy that benefits from the information generated by a machine learning model. This required an in-depth research on the underlying theory for this type of models, which is carefully defined here. Besides this, we developed a system that trades automatically for us, including a detailed backtesting engine that permitted to test this strategy, among others, in a simulated environment before using it in the market. This automatic trading system was meticulously designed to ensure extensibility and robustness purposing to explore as many strategies and models as needed, including machine learning approaches, based on a large set of user configurations. Subsequently, the foreign exchange market was used to live-run our strategies, which is open 24h a day during weekdays and is highly liquid. As a benchmark, other more common strategies were also tested and the predictive capability of the machine learning model was compared with an established mathematical model, the autoregressive integrated moving average model.