Elsevier

Expert Systems with Applications

Volume 90, 30 December 2017, Pages 290-302
Expert Systems with Applications

A stacked generalization system for automated FOREX portfolio trading

https://doi.org/10.1016/j.eswa.2017.08.011Get rights and content

Highlights

  • We attack automated FOREX portfolio management.

  • We present a machine learning-driven, stacked generalization system.

  • Different machine learning algorithms are best at different cases.

  • We infer subtle correlations between diverse machine learning algorithms.

  • We optimally combine them to perform automated FOREX portfolio management.

Abstract

Multiple FOREX time series forecasting is a hot research topic in the literature of portfolio trading. To this end, a large variety of machine learning algorithms have been examined. However, it is now widely understood that, in real-world trading settings, no single machine learning model can consistently outperform the alternatives. In this work, we examine the efficacy and the feasibility of developing a stacked generalization system, intelligently combining the predictions of diverse machine learning models. Our approach establishes a novel inferential framework that comprises the following levels of data processing: (i) We model the dependence patterns between major currency pairs via a diverse set of commonly used machine learning algorithms, namely support vector machines (SVMs), random forests (RFs), Bayesian autoregressive trees (BART), dense-layer neural networks (NNs), and naïve Bayes (NB) classifiers. (ii) We generate implied signals of exchange rate fluctuation, based on the output of these models, as well as appropriate side information obtained by analyzing the correlations across currency pairs in our training datasets. (iii) We finally combine these implied signals into an aggregate predictive waveform, by leveraging majority voting, genetic algorithm optimization, and regression weighting techniques. We thoroughly test our framework in real-world trading scenarios; we show that our system leads to significantly better trading performance than the considered benchmarks. Thus, it represents an attractive solution for financial firms and corporations that perform foreign exchange portfolio management and daily trading. Our system can be used as an integrated part in international commercial trade activities or in a quantitative investing framework for algorithmic trading and carry-trade speculation.

Introduction

The foreign exchange market (FOREX, FX) is a global over-the-counter (OTC) market for trading one currency in exchange of another. After the collapse of the Bretton Woods system in 1973, the daily average turnover of the FX market has immensely grown to reach $5.1 trillion per day in April 2016. This is almost twice the daily average volume for OTC interest rate products, thus rendering FX the currently most liquid market.1 The evolution of exchange rates is not only an important determinant of the value of cash flows denominated in foreign currencies for international businesses; most importantly, it is a variable of interest to investors that seek to identify opportunities of speculating on any imminent market movements (Ozturk, Toroslu, & Fidan, 2016). At the same time, FX rates are significantly influenced by monetary policy authorities. Indeed, this is the case since FX rates constitute a means for maintaining price stability, via controlling money supply, inflation, and interest rates. Thus, broad empirical evidence proves that geopolitical, monetary, and economic developments can significantly influence the fluctuation of FX financial time series, with their price essentially functioning as an aggregator of all economic activity (Beine, Laurent, & Palm, 2009).

Today, there are approximately 182 official currencies worldwide; however, only a small fraction of them is traded in the FX market. Indeed, over 95% of all daily FX transactions involves only eight currencies, namely the U.S dollar (USD), the Euro (EUR), the British pound (GBP), the Japanese yen (JPY), the Swiss franc (CHF), the New Zealand dollar (NZD), the Australian dollar (AUD) and the Canadian dollar (CAD). This liquidity profile is reasonable, since these currencies belong to economic areas with stable governments, respected central banks and relatively low inflation. In turn, the most traded currency pairs comprise the four majors, i.e. EUR/USD, USD/JPY, GBP/USD, and USD/CHF, followed by the three commodity pairs, i.e. AUD/USD, USD/CAD, and NZD/USD. Due to these facts concerning market liquidity, FX portfolio trading typically focuses on this set of seven major currency pairs, with the occasional addition of few extra currencies pertaining to peripheral economies of the European Union (Égert & Kocenda, 2014).

In this context, this work attacks the problem of designing effective automated portfolio trading systems for the FX market. This is a problem that has been at the epicenter of financial analysis, econometrics, as well as machine learning research, for quite long a time (Dymova, Sevastjanov, Kaczmarek, 2016, Ince, Trafalis, 2006, Sermpinis, Dunis, Laws, Stasinakis, 2012). Indeed, the considered problem has been proven to be quite hard, since it poses significant challenges to time-series modeling algorithms. Specifically, financial time series are noisy, since their fluctuation may be affected by factors that are hard to record and objectively quantify in a way that allows for them to be used as independent variables in the context of a time-series modeling algorithm. They are also known to exhibit a deterministically chaotic behavior; this means that financial variables behave as random variables in the short term, while their long-term trends exhibit a clear deterministic behavior, since they tend to converge towards their equilibrium levels. Further, financial time series are clearly non-stationary signals; in other words, their underlying distribution does not remain the same over time (Ohnishi et al., 2012). Indeed, this non-stationary nature can be attributed to structural breaks that occasionally arise from political events, government policies, as well as changes in the expectations and in the risk preferences of investors. Finally, their underlying patterns entail clear nonlinear patterns of dependencies; hence, intricate nonlinear time-series models must be developed for the purpose of accurately predicting their future price fluctuation.

Motivated from these facts, significant research effort has been devoted to the development of novel time-series modeling algorithms, capable of accounting for the noisy, nonlinear, and volatile nature of FX rates time-series. However, in addition to these fundamental challenges to the employed time-series modeling algorithms, the FX market is also characterized by a number of peculiarities that must be carefully taken care of when designing an automated FX trading system. These include: (i) the very high liquidity of the FX market; indeed, its huge trading volume represents the largest asset class in the world; (ii) its geographical dispersion; (iii) its continuous 24 h per day/ 5 days per week operation (i.e., trading from 22:00 GMT on Sunday (Sydney) until 22:00 GMT Friday (New York)); (iv) the variety and limited predictability of factors that affect exchange rates, e.g. related to geopolitical developments; (v) the low margins of relative profit compared to other markets of fixed income; and (vi) the widespread use of leverage as a means of enhancing profit and loss margins. Despite these challenges, though, these very characteristics also render FX the market closest to the ideal of perfect competition, notwithstanding currency intervention by central banks. Thus, they represent a huge opportunity that is ripe to be exploited by informed portfolio managers and algorithm developers.

In this paper, we address these challenges by introducing an automated FX trading framework that is complicated in nature yet, at the same time, parsimonious in the intuition. To capture nonlinear dependence patterns we consider employing a variety of state-of-the-art machine learning techniques, shown to perform well in real-world modeling scenarios, where the absence of linearities is the norm. To account for the underlying nonstationary nature of the modeled time-series, we ensure adjustment and adaptation of the employed predictive models, by means of continuous retraining.

To provide an effective means of overcoming the limitations posed by the noisy nature of the modeled data, we perform FX time-series modeling under a multidimensional modeling setup. Specifically, instead of merely training distinct time-series models on datasets pertaining to each one of the considered currency pairs, we also infer implied correlation signals across currency pairs. This way, we progress well beyond the univariate modeling setup adopted by existing FX portfolio trading systems, by allowing for the structural relationships between currency pairs to be inferred from the data, and be taken into consideration for the purpose of price fluctuation prediction and trading decision generation. Hence, this methodological aspect of our approach, targeting the utilization of additional information hidden in the correlation pairs, constitutes a major contribution this paper brings to the literature.

Indeed, the importance of modeling and studying currency correlation has been extensively studied in economics literature. For instance, Mizuno, Takayasu, and Takayasu (2006) have thoroughly analyzed the correlation networks among currencies; this revealed important information regarding currency dependencies around the globe, with special focus on the peripheral currencies. In a similar vein, Keskin, Deviren, and Kocakaplan (2011) presented a topology of correlation networks among 34 major currencies; this revealed significant correlation information regarding the dominance of EUR and USD as world currencies, as well as the fact that contagion patterns during the recent financial crisis differed by currency and by region. Inspired from these outcomes, several researchers have recently proposed various alternative approaches for extracting correlation information regarding the movements in the FX market (e.g., Miśkiewicz, 2016, Casarin, Tronzano, Sartore, 2013).

Despite this extensive research scrutiny, though, to the best of our knowledge, such correlation information has never been leveraged in the context of FX portfolio trading systems that learn to effectively fuse information of diverse nature. On the contrary, the main thesis of this work is that the incorporation of such inferred currency correlation information can offer significant performance gains to FX portfolio trading systems, by allowing for better data modeling capacities. Besides, a system utilizing correlations among currency pairs can also provide diversification and money management benefits, as is the case for all financial assets.

In a nutshell, we devise a novel stacked generalization technique that allows for intelligently combining predictive models driven from individual currency exchange rate signals, as well as inferred cross-currency correlation signals. The main characteristics of our approach, the unique combination of which endow it with significant advantages over the state-of-the-art, are the following:

  • 1.

    Our proposed FX trading system jointly models the performance of 10 currency pairs, by inferring their correlations in the context of a multidimensional modeling setup, and leveraging them for the purpose of prediction generation. This is in contrast to the existing literature, where the used time-series models do not leverage such across-the-board correlation information.

  • 2.

    We perform forecasting using a moving window retraining approach. In other words, the used predictive models are retrained on a moving window, so as to account for the fact that FX dynamics may change over time, influenced by monetary policy divergences, political instability, and economic growth. This is congruent with recent trends in the literature (e.g. Byun, et al., 2015, Costantini, Cuaresma, Hlouskova, 2016, Shen, Chao, Zhao, 2015), and is contrast to older approaches that either are incapable of rapidly adapting to structural breaks in the world economy, or employ complex Markov-switching models that are highly prone to overfitting (e.g., Bahrepour, et al., 2011, Sermpinis, Dunis, Laws, Stasinakis, 2012).

  • 3.

    We establish a multilevel, multicomponent modeling framework for FX price forecasting, driven by machine learning algorithms, and stacked generalization techniques. Stacking takes place at a diverse set of system levels: both at the level of computing implied signals through moving window correlations, as well as at the level of combining distinct predictive components via machine learning techniques. Such a stacked generalization framework, which also takes into account inferred implied correlation signals, apart from raw exchange rate signals, is a novel solution that has never been reported in the past.

We perform an exhaustive experimental evaluation of our system, using market data over a long time-period which spans a total of 15 years. The long time period considered under our experimental setup allows to explore system performance under volatility-stress periods and smooth trending periods alike.

The remainder of this study is organized as follows. In Section 2, we provide a brief overview of related empirical work, and explore the most commonly used modeling techniques for FX rates forecasting. In Section 3, we elaborate on the dataset used for developing and evaluating our system. In Section 4, we provide a thorough description of the motivation and the architecture of our developed FX portfolio trading system. In Section 5, we elaborate on our experimental setup, and present all our empirical results. In addition, we assess our empirical findings by analyzing their statistical significance and resulting real-world trading performance. Finally, in Section 6 we draw our conclusions, while also indicating directions for future research.

Section snippets

Related work

There is an abundance of research work in automated trading systems. Most of these are generic asset trading systems, as opposed to systems specifically tailored to the unique characteristics of the FX market. In general, these systems are based on time-series analysis techniques, nonlinear regression models, and, more recently, advanced machine learning techniques (Patel, Shah, Thakkar, & Kotecha, 2015). Similar is the landscape of FX trading systems, with advanced machine learning algorithms

Data collection and preprocessing

Our dataset is downloaded from Bloomberg (US close session time). It comprises the daily FX rates of 10 currencies; these include EUR, JPY, GBP, CAD, CHF, AUD, NZD, SEK, NOK and DKK. Thus, our dataset covers more than 95% of FX market’s liquidity, including three categories of currencies: major currencies, commodity currencies, and European peripheral currencies. Our dataset covers a 15-year period, which spans from 1/1/2001 up to 31/12/2015; this results in around 4000 observations for each

Proposed approach

The proposed automated FX trading system comprises three subsequent levels of functionality, as shown in Fig. 3. At the first level, we postulate and fit a variety of machine learning algorithms for generating original predictive signals of exchange rate fluctuation (upward or downward). Specifically, we use a naïve bayes (NB) binary classifier, as well as the following regression models: SVM-regression, NNs, RFs, and a related “sum-of-trees” model where averaging is performed under a Bayesian

Experimental evaluation

In this Section, we provide a thorough experimental evaluation of our approach, along with comparisons to some baseline models and strategies. Specifically, the considered baselines comprise:

  • 1.

    Naïve strategy: Under this strategy, we consider that the current-day currency movement will be repeated on the next day.

  • 2.

    AR: We use a standard linear model, highly popular in the field of econometrics, namely the AR model (Asteriou & Hall, 2011). The model postulated for each currency is composed of five

Conclusions

The thrust of this empirical study was focused on creating an automated trading system tailored to 10 currency pairs traded against the USD. We proposed a novel FX rate portfolio forecasting model, leveraging the attractive properties of popular machine learning algorithms. Our approach exploited well-established knowledge regarding the interconnections among currencies, as reflected in their pairwise correlations.

We performed an extensive experimental evaluation of our approach, using data

References (40)

Cited by (0)

View full text