# Detecting correlations and triangular arbitrage opportunities in the Forex by means of multifractal detrended cross-correlations analysis

## Abstract

Multifractal detrended cross-correlation methodology is described and applied to Foreign exchange (Forex) market time series. Fluctuations of high-frequency exchange rates of eight major world currencies over 2010–2018 period are used to study cross-correlations. The study is motivated by fundamental questions in complex systems’ response to significant environmental changes and by potential applications in investment strategies, including detecting triangular arbitrage opportunities. Dominant multiscale cross-correlations between the exchange rates are found to typically occur at smaller fluctuation levels. However, hierarchical organization of ties expressed in terms of dendrograms, with a novel application of the multiscale cross-correlation coefficient, is more pronounced at large fluctuations. The cross-correlations are quantified to be stronger on average between those exchange rate pairs that are bound within triangular relations. Some pairs from outside triangular relations are, however, identified to be exceptionally strongly correlated as compared to the average strength of triangular correlations. This in particular applies to those exchange rates that involve Australian and New Zealand dollars and reflects their economic relations. Significant events with impact on the Forex are shown to induce triangular arbitrage opportunities which at the same time reduce cross-correlations on the smallest timescales and act destructively on the multiscale organization of correlations. In 2010–2018, such instances took place in connection with the Swiss National Bank intervention and the weakening of British pound sterling accompanying the initiation of Brexit procedure. The methodology could be applicable to temporal and multiscale pattern detection in any time series.

## Keywords

Time series Multiscale cross-correlation Multifractal detrended fluctuation analysis Agglomerative hierarchical clustering Quantitative finance Triangular arbitrage## Mathematics Subject Classification

37M10 37F35 62P05 91B84## 1 Introduction

Dynamics of complex systems, which are typically described by many degrees of freedom and a nonlinear internal structure, as well as their specific response to significant changes in the environment are within a research focus of many areas in fundamental and applied sciences, including mathematical, physical, biological and economic sciences [1]. The present study of complexity in a system behavior is focused on the financial market with multicale signatures of its response to some major events influencing currency exchange rates.

The foreign exchange financial market (known as the Forex or FX market) is a global market for currency trading in continuous operation 24 h a day except for weekends (10 pm UTC Sunday—10 pm UTC Friday). According to the recent foreign exchange statistics published by the Bank for International Settlements, the averaged daily trade volume exceeded 5 trillion US dollars in April 2016, with currencies mostly traded including US dollars, euros and Japanese yens (see—[2]). This huge volume makes the Forex market the biggest in the world of finance and serves just as a single parameter illustrating its enormous complexity [3].

Seminal papers elucidating intricate complex dynamics of the foreign exchange market on short timescales include turbulent cascade approach [4], motivated by hierarchical features in hydrodynamics of turbulence, as well as those referring to multi-affine analysis of typical currency exchange rates [5] and also their sparseness and roughness [6]. The Forex market determines currency exchange rates between any traded pair of currencies through a complex and nowadays mostly machine-driven automatic system of multiple type transactions among different kinds of buyers and sellers round-the-clock. Most recent works on uncovering patterns in foreign exchange markets include, but are not limited to, studies of lead-lag relationships [7], scaling relationships [8], multifractality and efficiency issues [9, 10], partial correlations [11] or quote spreads in high-frequency trading [12].

The Forex market is highly liquid market due to its massive trading and asset volume. Typically, it exhibits small daily fluctuations of currency exchange rates. Nevertheless, the value of one currency is determined relative to the value of the other currency through the exchange rate. Any information or event having impact on one currency value will propagate through the Forex market by means of adjusting various other exchange rates, which could be envisaged as a sort of local (pairwise) currency interactions which eventually should influence globally all the currencies traded in the Forex market. Therefore, we may expect that occasionally, a significant fluctuation or even a temporally significant change in one exchange rate of any pair due to whatever reason will propagate to remaining pairs of currencies depending on the degree of cross-correlations between quotes for different currency pairs. Such influence should be particularly strong when comparing exchange rates of currencies with a common, the so-called base currency. Any temporal discrepancy between exchange rates for such two pairs of currencies, with one currency in common, would offer immediately an opportunity to make a profit just by means of using this window of opportunity due to favorable exchange rates. It is the so-called triangular arbitrage opportunity [13, 14, 15, 16].

However, in reality we deal with enormous amounts of data flowing at very high rates in the Forex market and elsewhere. Matching buy–sell transactions may typically occur during milliseconds via automated trading systems [17]. Such enormous amounts of data have to be effectively analyzed for promising patterns down to a level of small fluctuations over small timescales. Big data, data mining, machine learning, artificial intelligence, and an algorithmic high-frequency trading are in focus of quantitative finance [18]. Attempts to predict changes in financial time series from correlation-based deep learning have been quite promising [19]. Recently, a novel predictive framework for forecasting future behavior of financial markets has been proposed by [20]. Artificial intelligence may benefit a great deal from financial applications and social sciences alike [21]. Hence, financial market studies are of interest from fundamental and practical point of view for a wide community of scientists, engineers and professionals, bringing together many branches of mathematics, physics, economy and computer sciences to address some challenging issues.

The main research problem addressed in this paper is the following: to what extent bivariate cross-correlations on the Forex market at various levels of fluctuations of exchange rates and timescales ranging from tens of seconds up to weeks may provide important information about a possibility to observe disparities in exchange rates, which may offer potential arbitrage opportunities.

Our goal is to demonstrate prediction power of the so-called *q*-detrended cross-correlation coefficient stemming from the multifractal formalism when applied to historical time series of exchange rates for a set of currencies. We will investigate in detail sensitivity of various statistical properties of small and large fluctuations using natural scalability of our cross-correlation measure and follow closely the way how information and events related to financial markets may build arbitrage opportunities among a set of currency exchange rates.

We would like to emphasize that our method based on detrended cross-correlation analysis is quite novel and only recently a plethora of applications started to emerge across many fields of nonlinear correlations studies, including meteorological data [22], electricity spot market [23], effects of weather on agricultural market [24], stock markets [25], cryptocurrency markets [26], electroencephalography (EEG) signals [27], electrocardiography (ECG) and arterial blood pressure [28] as well as air pollution [29, 30]. Such wide interest across different fields of research in application of detrended cross-correlation analysis to nonlinear time series studies serves as an additional strong motivation for elucidating such analysis in terms of its potential and limitations.

The paper is organized as follows. First, we discuss the Forex data used in the present study and our methodology for the financial times series of logarithmic returns for exchange rates. Next, we discuss a degree of triangular arbitrage opportunity in a form of a convenient coefficient derived from suitable exchange rates. Then, we describe fundamental concepts of our statistical methods, which stem from multifractal formalism. We define *q*-dependent detrended coefficient capturing cross-correlations of two detrended time series. The results section comprises global behavior of currency rates, logarithmic return rates statistics with the focus on large fluctuations, discussion of hierarchy among currency exchange rates and the role of abrupt cross-correlation changes and large fluctuations in detecting arbitrage opportunities. Finally, we summarize and draw some general conclusions. In view of the above-mentioned interdisciplinary research by other authors [22, 24, 25, 27, 28, 29, 30], through the conclusions from our present work, we would like also to support advantages of multifractal detrended cross-correlation method and its wide applications to study any time series with nonlinear correlations, not only in the foreign exchange market but also across other fields of pure and applied sciences.

## 2 Data and financial time series methodology

## 3 Triangular arbitrage in the Forex market

*t*. In our example, a subset of all exchange rates for 3 currencies (EUR, USD, CHF), namely 3 quotes EUR/CHF, EUR/USD, USD/CHF , is considered. Let us assume that a trader holds initially euros (EUR). One possibility to use arbitrage opportunity would be to do a sequence of transformations including those 3 currencies [13, 14]:

## 4 Multifractal statistical methodology

Let us consider multiple time series of exchange rates recorded simultaneously. We are interested in a level of cross-correlation between a pair of non-stationary time series, *x*(*i*) and *y*(*i*) , where \(i=1,2, \ldots , N\) corresponds to subsequent instances of time when the signals were recorded (\(t_1< t_2< \cdots < t_N\)). Both time series are synchronized in time and have the same number *N* of data points.

Following the idea of a new cross-correlation coefficient defined in terms of detrended fluctuation analysis (DFA) and detrended cross-correlation analysis (DCCA)—[32], which has been put forward in [33], we use in the present study a multifractal detrended cross-correlation analysis (MFCCA) [34] with *q*-dependent cross-correlation coefficient. The cross-correlations of stock markets have been also investigated with a time-delay variant of DCCA method [35]. Multiscale multifractal detrended cross-correlation analysis (MSMF–DXA) has been proposed and subsequently employed to study dynamics of interactions in the stock market [36]. Other methods, including weighted multifractal analysis of financial time series [37] and multiscale properties of time series based on the segmentation [38], allow for multifractal and multiscale nonlinear effects investigations.

Multifractal cross-correlations can also be studied using Multifractal Detrending Moving-Average Cross-Correlation Analysis (MFXDMA) as it has been done by [39] and within the wavelet formalism by making use of the Multifractal Cross Wavelet Transform (MF-X-WT) analysis performed by [40]. The approach adopted in the present study has been introduced by [41]. In what follows, we briefly state main points of this approach.

### 4.1 Detrended cross-correlation methodology

We define a new time series *X*(*k*) of partial sums of the original time series elements *x*(*i*). In an analogous way, the second time series of interest, *Y*(*k*), is obtained out of the original time series *y*(*i*). Depending on the nature of the signal, we may expect in time series trends and seasonal periodicities. In order to remove such trends at various timescales *s* (if data points are collected at the same time intervals \(\Delta t\), the scale number *s* corresponds to the time), we subdivide both series of length *N* into a number of \(M(s) = \mathrm{int}(N/s)\) non-overlapping intervals, each of length *s* (\(s < N/5\)), starting from one end of a time series. For a given timescale *s*, we may repeat the partitioning procedure from the other end of the time series, thus obtaining in total 2*M*(*s*) time intervals, each of which will contain *s* data points. For each of the interval *k* (\(k = 0, \ldots , 2M(s)-1\)), we find a polynomial of degree *m*, \(P^{(m)}_{(s,k)}\), for a given timescale *s* (equivalent to the number *s* of used data point to perform the fit). In general, it could be a polynomial of any finite degree, depending on the nature of the signal. For the purpose of data analysis in this paper, we use polynomials of degree \(m=2\) unless otherwise stated [34].

*k*-th interval from partitioning with the scale

*s*. Constructed estimates of the covariance allow us to define a family of fluctuation functions \(F_{XY}^{(q)}(s)\) of the order \(q \ne 0\) for a given choice of the timescale (number of data points in the interval)

*s*

*q*-th order fluctuation function, which follows from the multifractal detrended fluctuation analysis (MFDFA) for a single time series [42]. Multifractal cross-correlations for time series should manifest themselves as a power-law behavior of the fluctuation functions \(F_{XY}^{(q)}\) over a range of timescales

*s*:

*q*-dependent exponent, \(\lambda (q)\), provides the insight into multifractal properties of the cross-correlations. In the limiting case of \(\lambda (q)=const\), that is in the case of the exponent being independent on

*q*, we may infer the monofractal type of cross-correlations between the two time series

*x*(

*i*) and

*y*(

*i*). Again, in the case of \(x(i)\equiv y(i)\), the asymptotic behavior of the fluctuation function, as defined by Eq. (8), takes a form which is familiar from the MFDFA approach:

*h*(

*q*) is a generalized Hurst exponent [42, 43, 44, 45, 46].

### 4.2 Detrended cross-correlation *q*-coefficient

*q*, defined by Eq. (8), convey the information about fluctuations of different order in magnitude over a range of timescales. Therefore, one can define a

*q*-dependent detrended cross-correlation (

*q*DCCA) coefficient using a family of such fluctuation functions [41]:

*q*-dependent cross-correlation coefficient is bounded: \(-1 \le \rho _q(s) \le 1\), for \(q > 0\) [41].

The definition of the cross-correlation given by Eq. (11) can be interpreted as a generalization of the Pearson coefficient [47, 48]. Advantage of the coefficient \(\rho _q(s)\) over the conventional Pearson index has already been studied through numerical methods in different contexts by several authors (see, e.g., [49] and references therein). The parameter *q* helps to identify the range of detrended fluctuation amplitudes corresponding to the most significant correlations for these two time series [41].

It has been established that for \(q >2\) large fluctuations mainly contribute to \(\rho _q(s)\), whereas for \(q < 2\) the dominant contribution is due to small- and medium-size fluctuations [25, 41]. Hence, by choosing a range of values in *q* we may filter out correlation coefficient for either small or large fluctuations.

## 5 Analysis and results

Based on the methodology described, we will investigate multiscale properties for cross-correlations among time series corresponding to currency exchange rates for the whole period 2010–2018 as well as for some sub-periods. We use MATLAB desktop environment for the numerical implementation of our methodology. Although we have quite large data sets (see “Appendix”), the implementation itself is quite straightforward and all the computations can be accomplished on a modern PC class computer. We also apply standard methods of MATLAB source codes validation and surrogate data checking against artefacts or robustness of nonlinear correlations within our data sets [41].

Although in our study we focus on different signatures and statistical properties of multivariate time series with respect to triangular arbitrage, one may envisage a broader picture of such analysis, whereby one would like to uncover a specific kind of cross-correlations in these time series which would help us to detect underlying interconnections useful for the system behavior prediction in future.

### 5.1 Logarithmic returns and the inverse cubic law

In this subsection, we will present a general picture for the financial time series dynamics with an emphasis on events which have an impact on the Forex market.

#### 5.1.1 A currency index

We define a currency index \(CI_a\) for the currency *a* as an average out of cumulative log-returns for all exchange rates that have *a* as a base currency.

*r*(

*b*/

*a*,

*t*) denotes time-dependent log-return for exchange rate

*b*/

*a*with label \(b \in \{ AUD, CAD, CHF, EUR, GBP, JPY, NZD, USD \}\) such that it is different from the label

*a*.

The currency index given by Eq. (12) indicates performance of any given currency in terms of exchange rates to other currencies in our data sets. With such a single averaged characteristics, one may have a general overview of a global temporal behavior and performance of any currency in the Forex market.

In Fig. 1, currency indexes time variation is shown for all the currencies in our data set for the considered period 2010–2018. For this plot, we take logarithmic returns arising from average bid and ask exchange rates. In the figure, we have indicated some political or economic events on the timescale (with dotted vertical line) which in principle could have impact on the Forex market performance during that period of time. These labels may serve as an intuitive explanation of features observed on the curves related to the currency indexes. We have included some sudden events: the US stock market flash crash on May 6, 2010, Fukushima Daiichi (Japan) nuclear disaster unfolding during several days in the aftermath of the earthquake which took place on March 11, 2011, the Swiss National Bank (SNB) interventions (on September 6, 2011, and January 15, 2015), the US futures flash crash on August 24, 2015, the Brexit referendum on June 23, 2016, GBP pound sterling’s flash crash on October 7, 2016, (GBP/USD exchange rate briefly dropped overnight by 6 per cent), the US Presidential elections (on November 9, 2016) and the general elections in the UK (on January 8, 2017), and increase in overnight rate target to 1 per cent by the Bank of Canada (on September 6, 2017).

In general, one observes significant variations of considered currency indexes over the period of 8 years. Worth noting in this timeline are Swiss National Bank (SNB) interventions in 2011 and in 2015 as well as the Brexit referendum in 2016. In the following, we will explore in some more details statistical properties of the Forex market data in the vicinity of these events. We will discuss to what extent our proposed statistical analysis corroborates these features, when looking from the hindsight with the help of historical data from the Forex market.

#### 5.1.2 Inverse cubic tails of absolute return distributions

We note that all currency exchange rates with the Swiss franc (CHF) as base currency yield higher probability of larger absolute logarithmic returns than other exchange rates. These outliers could be attributed to two instances of the SNB interventions (in 2011 and 2015). In order to demonstrate the origin of these deviations, we remove from our data sets a period of a half an hour in the morning on January 15, 2015, when a significant volatility of currencies exchange rates has been observed in the wake of the SNB intervention [9]. The resultant tails of the probability distributions are shown in the inset of Fig. 2. Hence without this single, short-termed event on the market, the tails of the distributions approximately follow the inverse-cubic behavior.

### 5.2 Multifractality and scaling behavior of cross-correlation fluctuation functions

We already know that the outliers of the cumulative distributions document an increased level of larger fluctuations in absolute log-returns. This means also a higher chance to encounter fluctuations yielding larger returns. The question arises to what extent these fluctuations are cross-correlated among exchange rates. Such cross-correlations at least between two exchange rate time series would offer a potential opportunity of triangular arbitrage.

*s*in the range shown. We may also observe that the fluctuation functions depend on the coefficient

*q*for \(1 \lessapprox q \lessapprox 4\) though in this case that dependence is rather weak. Additionally, for the reference both insets in Fig. 3 show the average \(h_{XY}(q)\) of generalized Hurst exponents for each individual time series. This average is defined as follows [53]:

*q*parameters than this is the case for the exchange rates which are outside the triangular relation (the bottom panel).

### 5.3 Detrended cross-correlation q-coefficient in the Forex market

*q*-coefficient \(\rho _q(s)\) results for exchange rate series. Two examples of the cross-correlation between two series of returns for exchange rates are shown in Fig. 4: the top panel presents a pair of EUR/JPY and GBP/JPY, whereas the bottom panel illustrates the results of \(\rho _q(s)\) for EUR/JPY and GBP/USD.

However, for both pairs of exchange rates (one of them pertains to the triangular relation, whereas the other one does not in the shown example) we observe that the larger size fluctuations are considered (the greater *q* value is taken), the smaller cross-correlation in terms of the detrended cross-correlation *q*-coefficient \(\rho _q(s)\) is observed over the timescale considered. The magnitude of this cross-correlation measure is weakly dependent on the timescale and only slightly grows with time. Its growth is more pronounced for larger fluctuations (cf. data for \(q=4\)) than this is the case for smaller fluctuations (cf. \(q=1\)).

### 5.4 Fluctuations of different magnitude and cross-correlations

Let us investigate in some more detail the cross-correlations between relatively small and large fluctuations of two exchange rate return series. The results for all \(\rho _q(s)\) cross-correlations (378 pairs in total) over the whole period 2010–2018 in the case of \(q=1\) and \(q=4\) averaged over all scales *s* are shown in Fig. 5. Note that the cross-correlation pairs are grouped into two classes. One class of exchange rate pairs (in black, left top and bottom panels) which pertain to the triangular relation and the second class, where cross-correlated pairs are outside the triangular relation (in red, right top and bottom panels). On the top-left (in black) and top-right (in red) panels, the results for \(\rho _q(s)\) with \(q=1\) are sorted in decreasing order. This ordering is unchanged for the purpose of the presentation of results with \(q=4\).

This gives an idea about the range of obtained values of cross-correlation coefficient distributions for the currency pairs which are in or out the triangular relation. One can easily verify that at the level of smaller fluctuations (\(q=1\)) many pairs of logarithmic exchange rate returns, which are not linked by the triangular relation, could have a higher averaged cross-correlation coefficient than many pairs which have such property. The black dotted horizontal line on the top-left panel shows the average cross-correlation of different pairs pertaining to the triangular relation. The value of that overall average is about 0.6.

Note that in the case of cross-correlations with no triangular relations between pairs of currencies including AUD and NZD we observe stronger correlations than in the case of pairs pertaining to the triangular relations (the top panel for \(q=1\)). It indicates a possibility of observing stronger correlations in exchange rates among four currencies in comparison with what we would expect on average in the case of exchange rates linked with the triangular relations. This somewhat unexpected result could be ascribed to mechanisms coupling economies of these two countries.

Hence, from our study it follows that indeed some cross-correlations of the pairs, which are not linked by a common currency and are traded on the Forex market, may reach that overall average cross-correlation of exchange rates with a common base. This seems to be a surprising conclusion, since typically we would expect stronger correlations between explicitly correlated two series (by means of a common, base currency) rather than in a case where there is no such common base. However, we have to appreciate the fact that cross-correlations between any pair of exchange rates will have some impact on the cross-correlations of other pairs through mutual connections arising from different combinations of currencies being exchanged. Nonetheless, the small fluctuations in logarithmic returns would be difficult to use in viable trading strategies, mainly due to finite spreads in bid and ask rates. From the practical point of view, correlations of large fluctuations seem to be more promising in finding and exploiting arbitrage opportunities. The bottom panels show the results for the large fluctuations (\(q=4\)) in the corresponding cases of the exchange currency pairs which are in or outside the triangular relation (that is with a common currency or not). The order of currency pairs in the bottom panels is kept the same as in the top panels. For the case of the larger fluctuations, the level of overall average of cross-correlations is marked again with horizontal black dotted line at a value of 0.3 approximately for the case of triangular-related class of currency pairs. The cross-correlations of the large fluctuations are therefore approximately two times smaller than in the case of small correlations. However, in the case of GBP and CHF taken as the common base currency the cross-correlations are stronger for \(q=4\) than for \(q=1\). In the case of cross-correlations outside the triangular relations, the strong cross-correlations arise when we take AUD as base currency on the one side and NZD on the other.

It can be noticed that in general the cross-correlations for smaller fluctuations (\(q=1\)) are stronger than cross-correlations for the large fluctuations (\(q=4\)). This is in agreement with previous findings [25, 41, 54] for other financial instruments like stocks and commodities. The time evolution of averaged cross-correlations over currency pairs with the common base for large fluctuations will be discussed later (cf. Fig. 8).

### 5.5 Dendrograms—agglomerative hierarchical trees from cross-correlations of exchange rates

As we have already seen, studying quantitative levels of cross-correlations may uncover some less obvious connections among currencies than just the explicit link through a common base currency. In order to uncover a hierarchy of currencies in terms of logarithmic returns from exchange rates, one may consider cross-correlation coefficients as a measure of the distance *d*(*i*, *j*) between different exchange rate pairs.

*d*(

*i*,

*j*) similarly to the definition introduced by [55], but instead of correlation coefficient, we use

*q*-dependent cross-correlation coefficient [41, 56]. Thus, the distance for agglomerative hierarchical trees takes the following form:

*q*-coefficient as a way to induce measure for creating a hierarchy tree (a dendrogram). As a result of adopting the distance given by Eq. (15), we obtain graphs for the small (\(q=1\)) and for the large fluctuations (\(q=4\)) as it is shown in Fig 6.

### 5.6 Cross-correlations in multiple timescales

*q*-coefficient \(\rho _q(s)\) in the case of four different timescales: \(s = 5 \ \mathrm{mins}\), \(s=1\) h, \(s=24\) h and \(s=1\) week for the case of \(q=1\) and \(q=4\). The results are shown in Fig. 7. The top four panels refer to the \(q=1\) case, whereas the bottom four panels illustrate the case of \(q=4\). In both cases, the cross-correlations are sorted in decreasing order of values obtained for the shortest timescale (\(s = 5 \ \mathrm{min}\)). We sort \(\rho _q(s)\) values for the shortest timescale and keep that ordering unchanged when taking longer timescales.

We also show the overall average for the currency exchange rate pairs complying to the triangular relation (the black dotted line) and for currency exchange rate pairs which are not bounded by the triangular relation (red dotted line). The most striking feature when comparing the small and large fluctuation cross-correlations over different timescales is that in the former case little is happening over different timescales considered. The plots indicate nearly static cross-correlations, almost independent on the timescale for the small fluctuations. On the other hand, the cross-correlations for large fluctuations (\(q=4\)) change with extension of the timescale *s*.

The magnitude of values \(\rho _q(s)\) for currency exchange rates which are in triangular relation (black/left part of each panel) stay within the same range although the values themselves fluctuate significantly with a change of timescale. Specifically, the overall average (denoted by the black dotted horizontal line) grows from a value which is less than 0.3 (for \(s = 5 \ \mathrm{mins})\)) up to approximately 0.4 (for \(s \ge 1)\) h. The growth of the overall average of cross-correlation is even more convincing for the class of pairs of currency exchange rates which are not in a strict triangular relation.

In general for \(q=4\) and longer timescales *s* (24 h, 1 week), we observe stronger cross-correlations within exchange rates, related by the triangular relationship, for the pairs where the Swiss franc (CHF) or the British pound sterling (GBP) is the common base currency. It is evident that the cross-correlations (red/right parts of each panel) obtained for \(s = 5 \ \mathrm{mins}\) are much smaller than those corresponding to \(s \ge 1\) h.

What is more, for the shortest timescale shown here, the difference between cross-correlations for pairs that are in the triangular relations and those that are not, is the biggest. The cross-correlation for currency exchange pairs outside the triangular relation in the case of large fluctuations in logarithmic return rates grows in time, which indicates propagation of correlations in time. This explains why averaged cross-correlations for such currency pairs may be unexpectedly high (cf. Fig. 5). This gives us some idea about the information propagation time through the Forex market, which is the time needed to reflect the maximum average cross-correlation between any pair of exchange currency rates. As we have already mentioned above, in the Forex market all currency rates are connected through mutual exchange rate mechanism. However, in some cases the inherently stronger correlations (e.g., induced by the triangular relationship) will result in a very fast response (so the cross-correlations are significant after a relatively short time) whereas for some other exchange rates such response would be lagged in time (e.g. carried over through a sequence of exchange rate adjustments). This time lag could be regarded as an estimate for the time duration of window of opportunity to execute an arbitrage opportunity.

*s*taken in our approach. It is interesting to note that this effect becomes more pronounced when longer timescales are implemented (24 h, 1 week). A similar conclusion is valid when considering GBP or JPY taken as the base currency—corresponding curves have a maximum in 2016. GBP was mainly influenced by Brexit and GBP flash crash, whereas JPY appreciation was caused indirectly by US elections. On the contrary, the increase in the average for CAD as the base can be noted only for the shortest timescale \(s= \ 5 \mathrm{min}\) in 2017. This could mean that the sudden overnight increase in the rates by the Bank of Canada in 2017 did not have longer lasting effect and was only causing very short term effect. In order to identify promising arbitrage opportunities (e.g. the triangular arbitrage), our tentative conclusion would be that we have to observe large fluctuations (by means of significant cross-correlation coefficients for \(q=4\)) for relatively long timescale

*s*.

The periods of extreme variation of exchange rates are shown in the corresponding insets of Fig. 9. In the case of the small fluctuations (\(q=1\), black solid and dotted curves), these periods of significant exchange rate variations do not have significant impact on overall behavior through a range of timescales *s*. However, the large fluctuations in the cross-correlations (\(q=4\), magenta solid and dotted curves) are highly sensitive to the existence of these well localized in time events. The insets show that in fact the exchange rates compared (red and black curves) were changing so rapidly that they could not follow each other. In such a way, the possible arbitrage opportunities have arisen.

### 5.7 Detecting triangular arbitrage opportunities

All events indicated by values greater than 0 in fact could potentially offer triangular arbitrage opportunities. The top panel shows an example of potentially significant arbitrage opportunity which is related to the SNB intervention in 2015 and fluctuations in the CHF exchange rates. The middle panel of Fig. 10 illustrates a moderate arbitrage opportunity, which is related to the Brexit referendum and its impact on the GBP exchange rates. Finally, the bottom panel illustrates rather weak chance of exploiting triangular arbitrage opportunity—there is only one very brief in time instance when in theory this might be possible. In such a way, we have shown that the inspection of cross-correlations by means of the \(\rho _q(s)\) coefficient over a range of timescales *s*, especially for the large fluctuations (in our multifractal approach with the maximum value of the parameter \(q=4\) to ensure the convergence) allows to uncover the hierarchy in exchange rates and focus on the periods of time when arbitrage opportunities potentially exist. The arbitrage opportunities are very closely related to large fluctuations which tend to be more pronounced in the longer timescales *s*. This is the case for exchange rates related to CHF and GBP, and this is precisely what opens windows of opportunities for the triangular arbitrage.

## 6 Conclusions

We have investigated currency exchange rates cross-correlations within the basket of 8 major currencies. Distributions of 10 s historical logarithmic exchange rate returns follow approximately the inverse cubic power-law behavior when the brief period of trading on January 15, 2015, in the wake of the SNB intervention is excluded from the exchange rate data sets. The tails of the cumulative distributions of the high-frequency intra-day quotes exhibit non-Gaussian distribution of the rare events by means of the so-called fat tails (large fluctuations). This clearly documents that large fluctuations in the logarithmic rate returns occur more frequently than one may expect from the Gaussian distribution.

We have found that on average the cross-correlations of exchange rates for currencies in the triangular relationship are stronger than cross-correlations between exchange rates for currencies outside the triangular relationship. Detrended cross-correlation approach with \(\rho _q\) cross-correlation measure allows to uncover a hierarchical structure of exchange rates among set of currencies in the Forex market. To the best of our knowledge, it is the first ever application of the \(\rho _q\) cross-correlation coefficient to the agglomerative hierarchical clustering in a form of dendrograms. Such dendrograms may have important applications related to hedging, risk optimization, and diversification of the currency portfolio in the Forex market.

The detrended cross-correlation coefficient \(\rho _q\) is sensitive to timescales and fluctuation magnitudes allowing for a subtle (more sophisticated) cross-correlation measuring than just a simple global estimates (e.g. the Pearson’s coefficient). By using \(\rho _q\) coefficients, one may discriminate subintervals of time series when significant changes in time of cross-correlations are observed. Such abrupt changes of cross-correlations combined with the presence of relatively large fluctuations may signal potential triangular arbitrage opportunities. We have shown a viable possibility of such application using historical data for years 2015 and 2016, when a significant enhancement of correlations in exchange rate pairs involving CHF, GBP, JPY for large fluctuations (\(q=4\)) has been observed with increasing the timescale *s*.

Finally, our conjecture is that during significant events (e.g. with an impact on the Forex market) one may expect existence of potential triangular arbitrage opportunities. Such events and the resultant opportunities indeed have been identified in the historical trading data for the period 2010–2018. The evidence we have shown clearly indicates that the multifractal cross-correlation methodology should contribute significantly to predictive modeling of temporal and multiscale patterns in time series analysis.

We believe that our present study, where we consider currencies interaction through their mutual exchange rates and the dynamics of the rates adjustment to a new conditions due to a sudden event, may encourage future research in studying the information propagation through complex networks of interacting entities. This in turn may have some consequences for design of new smart learning methods for neural networks and a general computational intelligence in predicting a future behavior of complex systems. For example, since we have demonstrated feasibility of financial time series analysis against favorable patterns, we may expect future advancement in computer algorithms for financial engineering when trading tick-by-tick data are available in real time.

## Notes

### Compliance with ethical standards

### Conflict of interest

The authors declare that they have no conflict of interest.

## References

- 1.Kwapień, J., Drożdż, S.: Physical approach to complex systems. Phys. Rep.
**515**, 115–226 (2012)MathSciNetCrossRefGoogle Scholar - 2.Bank for International Settlements: Triennial Central Bank Survey of foreign exchange and OTC derivatives markets in 2016. (2016). https://www.bis.org/publ/rpfx16.htm. Accessed 29 March 2019
- 3.Rickles, D.: Econophysics and the complexity of financial markets. In: Hooker, C. (ed.) Philosophy of Complex Systems. Handbook of Philosophy of Science, vol. 10, pp. 531–565. North Holland (2011). https://doi.org/10.1016/C2009-0-06625-2
- 4.Ghashghaie, S., Breymann, W., Peinke, J., Talkner, P., Dodge, Y.: Turbulent cascades in foreign exchange markets. Nature
**381**, 767–770 (1996)CrossRefGoogle Scholar - 5.Vandewalle, N., Ausloos, M.: Multi-affine analysis of typical currency exchange rates. Eur. Phys. J. B
**4**(2), 257–261 (1998)CrossRefGoogle Scholar - 6.Vandewalle, N., Ausloos, M.: Sparseness and roughness of foreign exchange rates. Int. J. Mod. Phys. C
**9**(5), 711–719 (1998)CrossRefGoogle Scholar - 7.Basnarkov, L., Stojkoski, V., Utkovski, Z., Kocarev, L.: Lead–lag relationships in foreign exchange markets. Physica A
**539**, 122986 (2020)CrossRefGoogle Scholar - 8.Boilard, J.-F., Kanazawa, K., Takayasu, H., Takayasu, M.: Empirical scaling relations of market event rates in foreign currency market. Physica A
**509**, 1152–1161 (2018)CrossRefGoogle Scholar - 9.Yang, Y.-H., Shao, Y.-H., Shao, H.-L., Stanley, H.E.: Revisiting the weak-form efficiency of the EUR/CHF exchange rate market: evidence from episodes of different Swiss franc regimes. Physica A
**523**, 734–746 (2019)CrossRefGoogle Scholar - 10.Han, C., Wang, Y., Ning, Y.: Comparative analysis of the multifractality and efficiency of exchange markets: evidence from exchange rates dynamics of major world currencies. Physica A
**535**, 122365 (2019)CrossRefGoogle Scholar - 11.Basnarkov, L., Stojkoski, V., Utkovski, Z., Kocarev, L.: Correlation patterns in foreign exchange markets. Physica A
**525**, 1026–1037 (2019)CrossRefGoogle Scholar - 12.Cartea, Á., Jaimungal, S., Walton, J.: Foreign exchange markets with Last Look. Math. Financial Econ.
**13**, 1–30 (2019)MathSciNetzbMATHCrossRefGoogle Scholar - 13.Aiba, Y., Hatano, N.: Triangular arbitrage in the foreign exchange market. Physica A
**344**, 174–177 (2004)CrossRefGoogle Scholar - 14.Fenn, D.J., Howison, S.D., McDonald, M., Williams, S., Johnson, N.F.: The mirage of triangular arbitrage in the spot foreign exchange market. Int. J. Theor. Appl. Finance
**12**(8), 1105–1123 (2009)MathSciNetCrossRefGoogle Scholar - 15.Drożdż, S., Kwapień, J., Oświęcimka, P., Rak, R.: The foreign exchange market: return distributions, multifractality, anomalous multifractality and the Epps effect. New J. Phys.
**12**, 105003 (2010)CrossRefGoogle Scholar - 16.Cui, Z., Qian, W., Taylor, S., Zhu, L.: Detecting and identifying arbitrage in the spot foreign exchange market. Quant. Finance (2019). https://doi.org/10.1080/14697688.2019.1639801 CrossRefGoogle Scholar
- 17.Buchanan, M.: Physics in finance: trading at the speed of light. Nature
**518**, 161–163 (2015)CrossRefGoogle Scholar - 18.Guida, T.: Big Data and Machine Learning in Quantitative Investment. Wiley, New York (2019)Google Scholar
- 19.Moews, B., Michael Herrmann, J., Ibikunle, G.: Lagged correlation-based deep learning for directional trend change prediction in financial time series. Expert Syst. Appl.
**120**, 197–206 (2019)CrossRefGoogle Scholar - 20.Ghosh, I., Jana, R.K., Sanyal, M.K.: Analysis of temporal pattern, causal interaction and predictive modelling of financial markets using nonlinear dynamics, econometric models and machine learning algorithms. Appl. Soft Comput. J.
**82**, 105553 (2019)CrossRefGoogle Scholar - 21.Miller, T.: Explanation in artificial intelligence: insights from the social sciences. Artif. Intell.
**267**, 1–38 (2019)MathSciNetzbMATHCrossRefGoogle Scholar - 22.Chen-hua, S., Chao-ling, L., Ya-li, S.: A detrended crosscorrelation analysis of meteorological and API data in Nanjing, China. Physica A
**419**, 417–428 (2018)Google Scholar - 23.Fan, Q., Li, D.: Multifractal cross-correlation analysis in electricity spot market. Physica A
**429**, 17–27 (2015)CrossRefGoogle Scholar - 24.Cao, G., He, C., Xu, W.: Effect of weather on agricultural futures markets on the basis of DCCA cross-correlation coefficient analysis. Fluct. Noise Lett.
**15**, 1650012 (2016)CrossRefGoogle Scholar - 25.Zhao, L., Li, W., Fenu, A., Podobnik, B., Wang, Y., Stanley, H.E.: The q-dependent detrended cross-correlation analysis of stock market. J. Stat. Mech. Theory Exp.
**2018**, 023402 (2018)MathSciNetCrossRefGoogle Scholar - 26.Drożdż, S., Minati, L., Oświęcimka, P., Stanuszek, M., Wątorek, M.: Signatures of the crypto-currency market decoupling from the Forex. Future Internet
**11**, 154 (2019)CrossRefGoogle Scholar - 27.Chen, Y., Cai, L., Wang, R., Song, Z., Deng, B., Wang, J., Yu, H.: DCCA cross-correlation coefficients reveals the change of both synchronization and oscillation in EEG of Alzheimer disease patients. Physica A
**490**, 171–184 (2018)MathSciNetCrossRefGoogle Scholar - 28.Ghosh, D., Samanta, S., Chakraborty, S.: Multifractal correlation study between posture and autonomic deregulation using ECG and blood pressure data. In: Ghosh, D., Samanta, S., Chakraborty, S. (eds.) Multifractals and Chronic Diseases of the Central Nervous System, pp. 149-172. Springer, Singapore (2019). https://doi.org/10.1007/978-981-13-3552-5 CrossRefGoogle Scholar
- 29.Shen, C.: A comparison of principal components using TPCA and nonstationary principal component analysis on daily air-pollutant concentration series. Physica A
**467**, 453–464 (2017)CrossRefGoogle Scholar - 30.Wang, F., Wang, L., Chen, Y.: Detecting PM2.5’s correlations between neighboring cities using a time-lagged cross-correlation coefficient. Sci. Rep.
**7**(1), 10109 (2017)CrossRefGoogle Scholar - 31.Ducascopy Bank SA. https://www.dukascopy.com/. Accessed 15 Jan 2019
- 32.Podobnik, B., Stanley, H.E.: Detrended cross-correlation analysis: a new method for analyzing two nonstationary time series. Phys. Rev. Lett.
**100**, 084102 (2008)CrossRefGoogle Scholar - 33.Zebende, G.F.: DCCA cross-correlation coefficient: quantifying level of cross-correlation. Physica A
**390**, 614–618 (2011)CrossRefGoogle Scholar - 34.Oświęcimka, P., Drożdż, S., Forczek, M., Jadach, S., Kwapień, J.: Detrended cross-correlation analysis consistently extended to multifractality. Phys. Rev. E
**8**, 023305 (2014)CrossRefGoogle Scholar - 35.Lin, A., Shang, P., Zhao, X.: The cross-correlations of stock markets based on DCCA and time-delay DCCA. Nonlinear Dyn.
**67**, 425–435 (2012)MathSciNetCrossRefGoogle Scholar - 36.Lin, A., Shang, P., Zhou, H.: Cross-correlations and structures of stock markets based on multiscale MF-DXA and PCA. Nonlinear Dyn.
**78**, 485–494 (2014)CrossRefGoogle Scholar - 37.Xiong, H., Shang, P.: Weighted multifractal analysis of financial time series. Nonlinear Dyn.
**87**, 2251–2266 (2017)MathSciNetCrossRefGoogle Scholar - 38.Xu, M., Shang, P.: Multiscale time irreversibility analysis of financial times series based on segmentation. Nonlinear Dyn.
**94**, 1603–1618 (2018)CrossRefGoogle Scholar - 39.Jiang, Z.-Q., Zhou, W.-X.: Multifractal detrending moving-average cross-correlation analysis. Phys. Rev. E
**84**, 016106 (2011)CrossRefGoogle Scholar - 40.Jiang, Z.-Q., Gao, X.-L., Zhou, W.-X., Stanley, H.E.: Multifractal cross wavelet analysis. Fractals
**25**, 1750054 (2017)MathSciNetCrossRefGoogle Scholar - 41.Kwapień, J., Oświęcimka, P., Drożdż, S.: Detrended fluctuation analysis made flexible to detect range of cross-correlated fluctuations. Phys. Rev. E
**92**, 052815 (2015)CrossRefGoogle Scholar - 42.Kantelhardt, J.W., Zschiegner, S.A., Koscielny-Bunde, E., Havlin, S., Bunde, A., Stanley, H.E.: Multifractal detrended fluctuation analysis of nonstationary time series. Physica A
**316**, 87–114 (2002)zbMATHCrossRefGoogle Scholar - 43.Drożdż, S., Kwapień, J., Oświęcimka, P., Rak, R.: Quantitative features of multifractal subtleties in time series. Europhys. Lett.
**88**, 60003 (2009)CrossRefGoogle Scholar - 44.Drożdż, S., Oświęcimka, P.: Detecting and interpreting distortions in hierarchical organization of complex time series. Phys. Rev. E
**91**, 030902(R) (2015)CrossRefGoogle Scholar - 45.Grech, D.: Alternative measure of multifractal content and its application in finance. Chaos Solitons Fractals
**88**, 183–195 (2016)MathSciNetzbMATHCrossRefGoogle Scholar - 46.Klamut, J., Kutner, R., Gubiec, T., Struzik, Z. R.: The new face of multifractality: Multi–branchness and the phase transitions in time series of inter–event times. arXiv:1809.02674v3 [q-fin.ST] (2019). Preprint at: arXiv:1809.02674 (2019)
- 47.Pearson, K.: Note on regression and inheritance in the case of two parents. Proc. R. Soc. London
**58**, 240–242 (1895)CrossRefGoogle Scholar - 48.Rodgers, J.L., Nicewander, W.A.: Thirteen ways to look at the correlation coefficient. Am. Stat.
**42**(1), 59–66 (1988)CrossRefGoogle Scholar - 49.Jiang, Z.–Q., Xie,W.–J., Zhou, W.–X., Sornette, D.: Multifractal analysis of financial markets: a review. Preprint at: arXiv:1805.04750v1 [q-fin.ST] (2018). Reports on Progress in Physics, (2019) (
**in press**) - 50.Gopikrishnan, P., Meyer, M., Amaral, L.A., Stanley, H.E.: Inverse cubic law for the distribution of stock price variations. Eur. Phys. J. B
**3**, 139–140 (1998)CrossRefGoogle Scholar - 51.Drożdż, S., Kwapień, J., Grümmer, F., Ruf, F., Speth, J.: Are the contemporary financial fluctuations sooner converging to normal? Acta Physica Polonica B
**34**, 4293–4306 (2003)zbMATHGoogle Scholar - 52.Drożdż, S., Forczek, M., Kwapień, J., Oświȩcimka, P., Rak, R.: Stock market return distributions: from past to present. Physica A
**383**, 59–64 (2007)CrossRefGoogle Scholar - 53.Zhou, W.-X.: Multifractal detrended cross-correlation analysis for two nonstationary signals. Phys. Rev. E
**77**, 066211 (2008)CrossRefGoogle Scholar - 54.Wątorek, M., Drożdż, S., Oświęcimka, P., Stanuszek, M.: Multifractal cross-correlations between the World Oil and other Financial Markets in 2012–2017. Energy Econ.
**81**, 874–885 (2019)CrossRefGoogle Scholar - 55.Mantegna, R.N.: Hierarchical structure in financial markets. Eur. Phys. J. B
**11**, 193–197 (1999)CrossRefGoogle Scholar - 56.Kwapień, J., Oświęcimka, P., Forczek, M., Drożdż, S.: Minimum spanning tree filtering of correlations for varying time scales and size of fluctuations. Phys. Rev. E
**95**, 052313 (2017)CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.