The microscopic relationships between triangular arbitrage and cross-currency correlations in a simple agent based model of foreign exchange markets
Alberto Ciacci, Takumi Sueshige, Hideki Takayasu, Kim Christensen, Misako Takayasu
TThe microscopic relationships between triangular arbitrage and cross-currencycorrelations in a simple agent based model of foreign exchange markets
Alberto Ciacci (cid:63) , Takumi Sueshige (cid:63) , Hideki Takayasu , Kim Christensen , Misako Takayasu Blackett Laboratory, Imperial College London, London SW7 2AZ, United Kingdom Center for Complexity Science, Imperial College London, London SW7 2AZ, United Kingdom Department of Mathematical and Computing Science, School of Computing, Tokyo Institute of Technology,4259-G3-52, Nagatsuta-cho, Midori-ku, Yokohama 226-8503, Japan, 226-8502 Institute of Innovative Research, Tokyo Institute of Technology 4259, Nagatsuta-cho, Yokohama 226-8502, Japan Sony Computer Science Laboratories, 3-14-13, Higashigotanda, Shinagawa-ku, Tokyo 141-0022, Japan (cid:63)
These authors contributed equally to this work* Corresponding authorE-mail: [email protected]
Abstract
Foreign exchange rates movements exhibit significant cross-correlations even on very short time-scales. The effect ofthese statistical relationships become evident during extreme market events, such as flash crashes. In this scenario, anabrupt price swing occurring on a given market is immediately followed by anomalous movements in several relatedforeign exchange rates. Although a deep understanding of cross-currency correlations would be clearly beneficial forconceiving more stable and safer foreign exchange markets, the microscopic origins of these interdependencies have notbeen extensively investigated. We introduce an agent-based model which describes the emergence of cross-currencycorrelations from the interactions between market makers and an arbitrager. Our model qualitatively replicates thetime-scale vs. cross-correlation diagrams observed in real trading data, suggesting that triangular arbitrage plays aprimary role in the entanglement of the dynamics of different foreign exchange rates. Furthermore, the model showshow the features of the cross-correlation function between two foreign exchange rates, such as its sign and value,emerge from the interplay between triangular arbitrage and trend-following strategies.
Various non-trivial statistical regularities, known as stylized facts [1], have been documented in trading data frommarkets of different asset classes [2]. The available literature examined the heavy-tailed distribution of price changes[3–6], the long memory in the absolute mid-price changes (volatility clustering) [4, 6–10], the long memory in thedirection of the order flow [10–13] and the absence of significant autocorrelation in mid-price returns time series, withthe exclusion of negative, weak but still significant autocorrelation observed on extremely short time-scales [6,9,14–16].Different research communities (e.g., physics, economics, information theory) took up the open-ended challenge ofdevising models that could reproduce these regularities and provide insights on their origins [2, 17, 18]. Economistshave traditionally dealt with optimal decision-making problems in which perfectly rational agents implement tradingstrategies to maximize their individual utility [2, 17, 18]. Previous studies have looked at cut-off decisions [19–21],asymmetric information and fundamental prices [22–26] and price impact of trades [27–30]. In the last thirty years theorthodox assumptions of full rationality and perfect markets have been increasingly disputed by emerging disciplines,such as behavioral economics, statistics and artificial intelligence [17]. The physics community have also entered this quest for simple models of non-rational choice [17] by taking viewpoints and approaches, such as zero-intelligence and1/32 a r X i v : . [ q -f i n . T R ] F e b gent-based models, that often stray from those that are common among economists. Agent-based models (ABMshenceforth) rely on simulations of interactions between agents whose actions are driven by idealized human behaviors[17]. A seminal attempt to describe agents interactions through ABM is the Santa Fe Stock Market [31], whichneglects the perfect rationality assumption by taking an artificial intelligence approach [17]. The model successfullyreplicates various stylized facts of financial markets (e.g., heavy-tailed distribution of returns and volatility clustering),hinting that the lack of full rationality has a primary role in the emergence of these statistical regularities [17].Following [31], several ABMs [32–44] have further examined the relationships between the microscopic interactionsbetween agents and the macroscopic behavior of financial markets.In this study we introduce a new ABM of the foreign exchange market (FX henceforth). This market is characterizedby singular institutional features, such as the absence of a central exchange, exceptionally large traded volumes and adeclining, yet significant dealer-centric nature [45]. Electronic trading has rapidly emerged as a key channel throughwhich investors can access liquidity in the FX market [45, 46]. For instance, more than 70% of the volume in the FXSpot market is exchanged electronically [46]. A peculiar stylized fact of the FX market is the significant correlationamong movements of different currency prices. These interdependencies are time-scale dependent [47, 48], theirstrength evolves in time and become extremely evident in the occurrence of extreme price swings, known as flashcrashes. In these events, various foreign exchange rates related to a certain currency abruptly appreciate or depreciate,affecting the trading activity of several FX markets. A recent example is the large and rapid appreciation of theJapanese Yen against multiple currencies on January 2 nd et al. [47] observed thatthe cross-correlation between real and implied prices of Japanese Yen is significantly below the unit on very shorttime-scales, conjecturing that this counter-intuitive property highlights how the same currency could be purchasedand sold at different prices by implementing a triangular arbitrage strategy. Aiba and Hatano [37] proposed an ABMrelying on the intriguing idea that triangular arbitrage influences the price dynamics in different currency markets.However, this study fails to explain whether and how reactions to triangular arbitrage opportunities lead to thecharacteristic shape of the time-scale vs cross-correlation diagrams observed in real trading data [47, 48].Building on these observations, the present study aims to obtain further insights on the microscopic origins ofthe correlations among currency pairs. We introduce an ABM model in which two species (i.e., market makersand the arbitrager) interact across three inter-dealer markets where trading is organized in limit order books. Themodel qualitatively replicates the characteristic shape of the cross-correlation functions between currency pairsobserved in real trading data. This suggests that triangular arbitrage is a pivotal microscopic mechanism behindthe formation of cross-currency interdependencies. Furthermore, the model elucidates how the features of thesestatistical relationships, such as the sign and value of the time-scale vs cross-correlation diagram, stem from theinterplay between trend-following and triangular arbitrage strategies.This paper is organized as follows. Section 2 presents the methods of this study. In particular, we outline the basicconcepts, discuss the employed dataset and provide a detailed description of the proposed model. In Section 3, weexamine the behavior of our model against real FX markets. Section 4 concludes and provides an outlook on theresearch paths that could be developed from the outcomes of this study. Technical details, further empirical analysesand an extended version of the model are presented in the supporting information sections. Electronic trading takes place in an online platform where traders submit buy and sell orders for a certain assetsthrough an online computer program. Unmatched orders await for execution in electronic records known as limit orderbooks (LOBs henceforth). By submitting an order, traders pledge to sell (buy) up to a certain quantity of a givenasset for a price that is greater (less) or equal than its limit price [2, 54]. The submission activates a trade-matchingalgorithm which determines whether the order can be immediately matched against earlier orders that are still queuedin the LOB [54]. A matching occurs anytime a buy (sell) order includes a price that is greater (less) or equal thanthe one included in a sell (buy) order. When this occurs, the owners of the matched orders engage in a transaction.2/32rders that are completely matched upon entering into the system are called market orders . Conversely, orders thatare partially matched or completely unmatched upon entering into the system (i.e., limit orders ) are queued in theLOB until they are completely matched by forthcoming orders or deleted by their owners [54].
Price V o l u m e Bid
Askb t a t m t s t Fig 1. Schematic of a LOB and related terminology.
At any time t the bid price b t is the highest limit priceamong all the buy limit orders (blue) while the ask price a t is the lowest limit price among all the sell limit orders(red). The bid and ask prices are the best quotes of the LOB. The mid point between the best quotes m t = ( a t + b t ) / mid price . The distance between the best quotes s t = a t − b t is the bid-ask spread . Thevolume specified in a limit order must be a multiple of the lot size ς , which is the minimum exchangeable quantity (inunits of the traded asset). The price specified in a limit order must be a multiple of the tick size δ , which is theminimum price variation imposed by the LOB. The lot size ς and the tick size δ are known as resolution parameters of the LOB [2]. Orders are allocated in the LOB depending on their distance (in multiples of δ ) from the currentbest quote. For instance, a buy limit order with price b t − nδ occupies the n + 1-th level of the bid side.The limit order with the best price (i.e., the highest bid or the lowest ask quote) is always the first to be matchedagainst a forthcoming order. The adoption of a minimum price increment δ forces the price to move in a discrete grid,hence the same price can be occupied by multiple limit orders at the same time. As a result, exchanges adopt anadditional rule to prioritize the execution of orders bearing the same price. A very common scheme is the price-time priority rule which uses the submission time to set the priority among limit orders occupying the same price level, i.e.the order that entered the LOB earlier is executed first [54]. In the FX market, the price of a currency is always expressed in units of another currency and it is commonly knownas foreign exchange rate (FX rate henceforth). For instance, the price of one Euro (EUR henceforth) in JapaneseYen (JPY henceforth) is denoted by EUR/JPY. The same FX rate can be obtained from the product of two otherFX rates, e.g. EUR/JPY = USD/JPY × EUR/USD, where USD indicates US Dollars. In the former case EUR ispurchased directly while in the latter case EUR is purchased indirectly through a third currency (i.e., USD), seeFig. 2. 3/32 irect Indirect
Fig 2. Two ways of obtaining one unit of EUR.
Direct transaction (left panel): agent t we expect the following equality to holdEUR / JPY t (cid:124) (cid:123)(cid:122) (cid:125) FX rate = (USD / JPY t ) × (EUR / USD t ) (cid:124) (cid:123)(cid:122) (cid:125) implied FX cross rate , (1)that is, the costs of a direct and indirect purchase of the same amount of a given currency must be the same. Clearly,Eq. (1) can be generalized to any currency triplet.However, several datasets [50, 51, 53, 55] reveal narrow time windows in which Eq. (1) does not hold. In this scenario,traders might try to exploit one of the following mispricesEUR / JPY t < (USD / JPY t ) × (EUR / USD t ) (2a)EUR / JPY t > (USD / JPY t ) × (EUR / USD t ) (2b)by implementing a triangular arbitrage strategy. For instance, Eq. (2b) suggests that a trader holding JPY couldgain a risk-free profit by buying EUR indirectly (JPY → USD → EUR) and selling EUR directly (EUR → JPY).
Buy
Sell
EUR/JPY t < (USD/JPY t )x(EUR/USD t ) EUR/JPY t > (USD/JPY t )x(EUR/USD t ) SellJPY EURUSD
Buy
SellJPY EURUSD
Buy
Fig 3. Profitable misprices and associated triangular arbitrage strategies . Left panel: an agent buysEUR for JPY and sells EUR for JPY through USD. Right panel: an agent sells EUR for JPY and buys EUR for JPYthrough USD. 4/32ssuming that the arbitrager completes each transaction at the best quotes (i.e., sell at the best bid and buyat the best ask) available in the EUR/JPY, USD/JPY and EUR/USD LOBs, any strategy presented in Fig. 3 iseffectively profitable if the following condition (i.e., Eq. (3a) for left panel strategy or Eq. (3b) for right panel strategy)is satisfied a EUR / JPY ( t ) < b USD / JPY ( t ) × b EUR / USD ( t ) (3a) b EUR / JPY ( t ) > a USD / JPY ( t ) × a EUR / USD ( t ) (3b)where b x/y ( t ) and a x/y ( t ) are the best bid and ask quotes available at time t in the x/y market respectively.In the same spirit of [37,50,51], we detect the presence of triangular arbitrage opportunities when one of the followingprocesses µ I ( t ) = b USD / JPY ( t ) × b EUR / USD ( t ) a EUR / JPY ( t ) (4a) µ II ( t ) = b EUR / JPY ( t ) a USD / JPY ( t ) × a EUR / USD ( t ) (4b)exceeds the unit. In this study, we employ highly granular LOB data provided by Electronic Broking Services (EBS henceforth). EBS isan important inter-dealer electronic platform for FX spot trading [46]. Trading is organized in LOBs and estimatessuggest that approximately 70% of the orders are posted by algorithm [46]. We investigate three major FX rates,USD/JPY, EUR/USD and EUR/JPY, across four years of trading activity (2011-2014).
Table 1. EBS dataset structure.
Date Timestamp Market Event Direction Depth Price Volume2011-05-10 09.00.00.000 USD/JPY Deal Buy 1st 100.000 1... ... ... ... ... ... ... ...2011-10-21 21.00.00.000 EUR/USD Quote Ask 3rd 0.8000 5
Each record (i.e., row) corresponds to a specific market event. Records are reported in chronological order (top tobottom) and include the following details: i) date (yyyy-mm-dd), ii) timestamp (GMT), iii) the market in which theevent took place, iv) event type (submission (Quote) or execution (Deal) of visible or hidden limit orders), v)direction of limit orders (Buy/Sell for deals and Bid/Ask for quotes), vi) depth (number of occupied levels) betweenthe specified price and the best price, vii) price and viii) units specified in the limit order.The shortest time window between consecutive records is 100 millisecond (ms). Events occurring within 100 msare aggregated and recorded at the nearest available timestamp. The tick size has changed two times within theconsidered four years window, see [56] and Table S1 for further details.The EBS dataset provides a 24-7 coverage of the trading activity (from 00:00:00.000 GMT Monday to 23:59:59.999GMT Sunday included), thus offering a complete and uninterrupted record of the flow of submissions, executions anddeletions occurring in the first ten price levels of the bid and ask sides of the LOB.The EBS dataset, in virtue of its features, is a reliable source of granular market data. First, EBS directly collectsdata from its own trading platform. This prevents the common issues associated to the presence of third partiesduring the recording process, such as interpolations of missing data and input errors (e.g., incorrect timestamps ororder types). Second, the EBS dataset offers a continuous record of LOB events across a wide spectrum of currencies,thus becoming a natural choice for cross-sectional studies (e.g., triangular arbitrage or correlation networks). Third,in spite of the increasing competition, the EBS platform has remained a key channel for accessing FX markets formore than two decades by connecting traders across more than 50 countries [57, 58]. The enduring relevance of this5/32latform has been guaranteed by the fairness and the competitiveness of the quoted prices.
We introduce a new microscopic model (Arbitrager Model hencefort) in which market makers trade d = 3 FX rates in d = 3 inter-dealer markets. Trading is organized in LOBs and, for simplicity, prices move in a continuous grid. Weenforce the assumption that market makers cannot interact across markets, that is, they can only trade in the LOBthey have been assigned to. Finally, echoing [37], we include a special agent (i.e., the arbitrager) that is allowed tosubmit market orders in any market. Fig 4. Schematic of the Arbitrager Model ecology.
The ecology comprises three independent markets.Trading is organized in continuous price grid LOBs as in [42], see Section S3. Market makers (black agents) maintainbid (blue circles) and ask (red circles) quotes with constant spread (black segment). To adjust these quotes, marketmakers dynamically update their dealing prices (squares) by adopting trend-based strategies. The best quotes aremarked by dotted lines (blue for bid and red for ask). Transactions occur when the best bid matches or exceeds thebest ask. Market makers engaging in a trade close the deal at the mid point between the two matching prices (i.e.,transaction price), see Fig. S4. Finally, we include an arbitrager (green agent) that exclusively submits market ordersacross the three markets to exploit triangular arbitrage opportunities emerging now and then. The actions of thisspecial agent, affecting the events occurring in otherwise independent markets, entangle the dynamics of the FX ratestraded in the ecology. Echoing [37], the ecology can be visualized as a spring-mass system in which the dynamics ofthree random walkers (i.e., the markets) are constrained by a restoring force (i.e., the arbitrager) acting on the centerof gravity of the system.
The i -th market maker operating in the (cid:96) -th market actively manages a bid quote b i,(cid:96) ( t ) and an ask quote a i,(cid:96) ( t )separated by a constant spread L (cid:96) = a i,(cid:96) ( t ) − b i,(cid:96) ( t ). To do so, the i -th market maker updates its dealing price z i,(cid:96) ( t ) , which is the mid point between the two quotes (i.e., z i,(cid:96) ( t ) = a i,(cid:96) ( t ) − L (cid:96) / b i,(cid:96) ( t ) + L (cid:96) / z i,(cid:96) ( t ) = z i,(cid:96) ( t − dt ) + c (cid:96) φ n,(cid:96) ( t ) dt + σ (cid:96) √ dt(cid:15) i,(cid:96) ( t ) i = 1 , . . . , N (cid:96) (5)6/32here N (cid:96) is the number of market makers participating the (cid:96) -th market, σ (cid:96) >
0, and (cid:15) i,(cid:96) ( t ) ∼ N (0 , φ n,(cid:96) ( t ) = n − (cid:80) k =0 ( p (cid:96) ( g t,(cid:96) − k ) − p (cid:96) ( g t,(cid:96) − k − e − kξ n − (cid:80) k =0 e − kξ (cid:96) = 1 , . . . , d (6)is the weighted average of the last n < g t,(cid:96) changes in the transaction price p (cid:96) in the (cid:96) -th market, g t,(cid:96) is the number oftransactions occurred in [0 , t [ in the (cid:96) -th market and ξ > c (cid:96) controlshow the current price trend φ n,(cid:96) ( t ) influences market makers’ strategies. For instance, c (cid:96) > c (cid:96) <
0) indicates thatmarket makers operating in the (cid:96) -th market tend to adjust their dealing prices z ( t ) in the same (opposite) directionof the sign of the price trend φ n,(cid:96) ( t ).Transactions occur when the i -th market maker is willing to buy at a price that matches or exceeds the ask price ofthe j -th market maker (i.e., b i,(cid:96) ≥ a j,(cid:96) ). Trades are settled at the transaction price p ( g t,(cid:96) ) = ( a j,(cid:96) ( t ) + b i,(cid:96) ( t )) / z ( t + dt ) to the latest transactionprice p ( g t,(cid:96) ), see Figs. S3 and S4 The arbitrager is a liquidity taker (i.e., she does not provide bid and ask quotes like market makers) that can onlysubmit market orders in each market to exploit an existing triangular arbitrage opportunity. Assuming that agentsexchange EUR/JPY, EUR/USD and USD/JPY, the triangular arbitrage processes are µ I ( t ) = b EUR/USD ( t ) × b USD/JPY ( t ) a EUR/JPY ( t ) (7a) µ II ( t ) = b EUR/JPY ( t ) a EUR/USD ( t ) × a USD/JPY ( t ) (7b)where b (cid:96) ( t ) and a (cid:96) ( t ) are the best bid and ask quotes at time t in the (cid:96) -th market.Whenever Eqs. (7a) or (7b) exceeds the unit, the arbitrager submits market orders to exploit the current opportunity(henceforth predatory market orders). Contrary to limit orders, market orders trigger an immediate transactionbetween the arbitrager and the market maker providing the best quote on the opposite side of the LOB. This impliesthat transactions involving the arbitrager are always settled at the bid or ask quote offered by the matched marketmaker, which are by the definition the current best bid or ask quote of the LOB. Following the post-transactionupdate rule, the matched market maker adjust its dealing price to its own matched bid or ask quote, that is, z i,(cid:96) ( t + dt ) → a i,(cid:96) ( t ) in case of a buy predatory market order or z i,(cid:96) ( t + dt ) → b i,(cid:96) ( t ) in case of a sell predatory marketorder, see Fig. S5. Echoing previous empirical studies [47, 48], we examine the shape of the cross-correlation function ρ i,j ( ω ) = (cid:104) ∆ m i ( t )∆ m j ( t ) (cid:105) − (cid:104) ∆ m i ( t ) (cid:105)(cid:104) ∆ m j ( t ) (cid:105) σ ∆ m i σ ∆ m j (8a) σ ∆ m (cid:96) = (cid:0) (cid:104) ∆ m (cid:96) ( t ) (cid:105) − (cid:104) ∆ m (cid:96) ( t ) (cid:105) (cid:1) / (8b)where the time-scale ω is the interval (i.e., in seconds) between two consecutive observations of the (cid:96) -th mid price m (cid:96) time series, ∆ m (cid:96) ( t ) ≡ m (cid:96) ( t ) − m (cid:96) ( t − ω ) is the linear change between consecutive observations and σ ∆ m (cid:96) is thestandard deviation of ∆ m (cid:96) ( t ). 7/32
011 20122013 2014
Trading Data Simulation (unit: sec) (unit: sec)(unit: sec)-0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec) (a) (b) -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec)-0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec) Fig 5. Trading data vs. model based cross-correlation functions.
Cross-correlation function ρ i,j ( ω ) for∆USD/JPY vs. ∆EUR/USD (green), ∆EUR/USD vs. ∆EUR/JPY (blue) and ∆USD/JPY vs. ∆EUR/JPY (red) asa function of the time-scale ω of the underlying time series. (a) Real market data (EBS) across four distinct years(2011-2014). (b) Arbitrager Model simulations. The number of participating market makers( N EUR/USD , N
USD/JPY , N
EUR/JPY ) are (35 , ,
25) in the first experiment, see (b) top panel, and (50 , ,
25) in thesecond experiment, see (b) bottom panel. The trend-following strength parameters are( c EUR/USD , c
USD/JPY , c
EUR/JPY ) = (0 . , . , .
8) in both experiments. The length of each simulation is 5 × timesteps. The price trends φ n,(cid:96) are calculated over the most recent n = 15 changes in the transaction price p and thescaling constant is set to ξ = 5, see Eq. (6). Details on the initialization of the model and the conversion betweensimulation time (i.e., time steps) and real time (i.e., sec) are provided in Section S5.In real trading data we observe that the value of the cross-correlation function ρ i,j ( ω ) varies with ω on very shorttime-scales ( ω < ω ≈ ω ≈ ρ i,j ( ω ) displayed in Fig. 5(a) is compatible with the one found byMizuno et al. [47]. However, our trading data-based cross-correlation functions stabilize on much shorter time-scales.Considering that [47] employed trading data collected in 1999, a period where lower levels of automation imposed aslower trading pace, we hypothesize that the time-scale ω beyond which ρ i,j ( ω ) stabilizes reflects the speed at whichmarkets react to a given event. Furthermore, ρ i,j ( ω ) stabilizes around different levels over the four trading yearscovered in our analysis. For instance, the cross-correlation between ∆USD/JPY and ∆EUR/JPY, see Fig. 5(a),stabilizes around 0.6 in 2011-2012 and 0.3 in 2013-2014. We assert that the variability in the stabilization levels of ρ i,j ( ω ) might be related to the different tick sizes adopted by EBS during the four years covered in this empiricalanalysis, see [56] and Table S1. Detailed investigations on how changes in the design of FX LOBs (e.g., tick size)and the increasing sophistication of market participants (e.g., high frequency traders) affect the characteristic shapeof ρ i,j ( ω ) are outside the scope of this paper, however, such studies will be a very much welcomed addition to thecurrent literature.The Arbitrager Model satisfactorily replicates the characteristic shape of ρ i,j ( ω ), suggesting that triangular arbitrageplays a primary role in the entanglement of the dynamics of currency pairs in real FX markets. We observe twoquantitative differences between the characteristic shape of ρ i,j ( ω ) derived from simulations of the Arbitrager Modeland real trading data. First, ρ i,j ( ω ) flattens after ω ≈
30 sec in the model, see Fig. 5(b), and ω ≈
10 sec in realtrading data, see Fig. 5(a). Second, in extremely short time-scales ( ω → ρ i,j ( ω ) does notconverge to zero as in real trading data, see Fig. 5(b), but to nearby values. We assert that these discrepanciesstem from the extreme simplicity of the Arbitrager Model which neglects various practices of real FX markets thatcontribute, to different degrees, to the shape and features of ρ i,j ( ω ) revealed in real trading data. To support thishypothesis, we developed an extended version of the Arbitrager Model which includes additional features of real FXmarkets, see Section S6. This more complex version of our model overcomes the main differences between the curvesdisplayed in Fig. 5(a) and (b), reproducing cross-correlation functions ρ i,j ( ω ) that approach zero when ω → The Arbitrager Model, reproducing the characteristic shape of ρ i,j ( ω ), suggests that triangular arbitrage plays aprimary role in the formation of the cross-correlations among currencies. However, it is not clear how the featuresof ρ i,j ( ω ), such as its sign and values, stem from the interplay between the different types of strategies adopted byagents operating in our ecology. Addressing this open question is one of the main objectives of the present study.We define the actual state of the j -th market ν j ( t ) as the sign of the current price trend sgn( φ n,(cid:96) ( t )) ∈ {− , + } , seeEq. (6). It follows that the current configuration of the ecology q ( t ) = { ν ( t ) , ν ( t ) , ν ( t ) } is the combination of thestates of each market. Our model, considering three markets, admits 2 = 8 different ecology configurations. Whenthe arbitrager is not included in the system, two markets have the same probability of being in the same and oppositestate, see first column of Fig. 6. This occurs because price trends are driven by transactions triggered by endogenousdecisions, that is, events occurring in different markets remain completely unrelated. As a consequence, market statesflip independently and at the same rate. It follows that the eight possible combinations of market states share thesame appearance probabilities 1 / and expected lifetimes, see Fig. 7. In these settings, the dynamics of the midprice of FX rate pairs do not present any significant correlation, see third column of Fig. 6. 9/32 UR/USD vs. USD/JPYEUR/USD vs. EUR/JPYUSD/JPY vs. EUR/JPY P r obab ili t y Same Opposite 0 0.3 0.6 P r obab ili t y Same Opposite (a) P r obab ili t y Same Opposite 0 0.3 0.6 P r obab ili t y Same Opposite 0 0.3 0.6 P r obab ili t y Same Opposite 0 0.3 0.6 P r obab ili t y Same Opposite (b)(c) -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec)-0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec)-0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec) Fig 6. Statistical relationships between different FX markets.
Probability of observing two markets in thesame or opposite state in the absence of the arbitrager (left column), with the arbitrager (central column) and theassociated cross-correlation functions ρ i,j ( ω ) (right column) for (a) ∆EUR/USD vs. ∆USD/JPY, (b) ∆EUR/USD vs.∆EUR/JPY and (c) ∆USD/JPY vs. ∆EUR/JPY. The red solid line in the histograms marks the value of 0.5,highlighting the case in which two markets have the same probability of being in the same or opposite state. Thelines indicating the value of the cross-correlation function ρ i,j ( ω ) are solid (dashed) for experiments including(excluding) the arbitrager. Simulations are performed under the same settings of the experiment presented inFig. 5(b), bottom panel. We find that the inclusion of the arbitrager increases the probability of observing EUR/USDand USD/JPY as well as EUR/USD and EUR/JPY in the same state and USD/JPY and EUR/USD in the oppositestate. Furthermore, the active presence of this special agent intertwines the dynamics of different FX rates, creatingcross-correlations functions that resemble those emerged in real trading data.The inclusion of the arbitrager has a major impact on the overall behavior of the model. We notice the emergenceof imbalances in the probability of observing two markets in the same or opposite state. For instance, the EUR/USDand EUR/JPY markets have the same state in ≈
57% of the experiment duration, see Fig. 6(b). Movements of FXrate pairs become correlated, revealing cross-correlation functions ρ i,j ( ω ) whose shapes qualitatively mimic thosefound in real trading data. The sign and stabilization levels of these functions are consistent with the sign and size ofthe probabilities imbalances, suggesting that these two results are two faces of the same coin.To understand how the findings presented in Fig. 6 unfold we need to take a closer look at the statistical properties ofthe eight ecology configurations. The presence of the arbitrager introduces a degree of heterogeneity in both theexpected lifetimes and appearance probabilities of ecology configurations, see Fig. 7. This reveals three interestingfacts. First, the average lifetime of every ecology configuration is smaller than its counterpart in an arbitrager-freesystem. To explain this feature, we recall that predatory market orders trigger three simultaneous transactions (i.e.,one in each market) altering the current price trends φ n,(cid:96) ( t ), see Eq. (6). When the latest change in transactionprice p (cid:96) ( g t,(cid:96) ) − p (cid:96) ( g t,(cid:96) −
1) induced by a predatory market order and φ n,(cid:96) ( t − dt ) have opposite signs, the actions of10/32he arbitrager weaken (i.e., | φ n,(cid:96) ( t ) | < | φ n,(cid:96) ( t − dt ) | ) or even flip the sign (i.e., φ n,(cid:96) ( t ) φ n,(cid:96) ( t − dt ) <
0) of the pricetrend. When this occurs, the arbitrager weakens the trend-following behaviors of market makers in at least one of thethree markets, thus increasing the likelihood of a transition to another ecology configuration. As triangular arbitrageopportunities of both types appear, with different incidences, during any ecology configuration, see Fig. S15, theexpected lifetimes of these configurations are, to different extents, shorter than in an arbitrager-free system. A v e r age li f e t i m e ( un i t: s e c ) +++ EUR/USDUSD/JPYEUR/JPY -++ +-+ --+ ++- -+- ---+-- (a) (b) P r obab ili t i e s +++ EUR/USDUSD/JPYEUR/JPY -++ +-+ --+ ++- -+- ---+--
Fig 7. Expected lifetime and appearance probability of the eight ecology configurations.
Statistics arecollected from simulations of the Arbitrager Model with active (violet) and inactive (grey) arbitrager. Simulations areperformed under the same settings of the experiment presented in Fig. 5(b), bottom panel. We observe that thepresence of an active arbitrager increases the average lifetimes (a) and appearance probabilities (b) of certainconfigurations and reduces the same statistics for others. Statistics in (a) are expressed in real time (i.e., sec.), detailson the conversion between simulation time (i.e., time steps) and real time (i.e., sec) are provided in Section S5.Second, certain ecology configurations are expected to last more than others (i.e., single episodes). As reactionsto triangular arbitrage opportunities increase the likelihood of flipping a market state, the average lifetime of agiven configuration relate to the time required for the first triangular arbitrage opportunity to emerge. For instance,the time between the inception and the first time µ I ( t ) or µ II ( t ) becomes larger than one never exceeds 4 sec for {− , − , + } , which is the configuration with shortest expected lifetime, while it can reach ≈ { + , + , + } , whichis the configuration with longest expected lifetime, see Fig. S14(a). This difference can be intuitively explained bylooking at the combination of market states. When the ecology configuration is {− , − , + } , EUR/USD and USD/JPYhave the opposite state of EUR/JPY. In this scenario, the implied FX cross rate EUR/USD × USD/JPY moves in theopposite direction of the FX rate EUR/JPY, creating the ideal conditions for a rapid emergence of triangular arbitrageopportunities. Conversely, the three markets share the same state when the ecology configuration is { + , + , + } . Inthis case, both the FX rate and the implied FX cross rate move in the same direction, extending the time required bythese prices to create a gap that can be exploited by the arbitrager.The third and final interesting fact emerged in Fig. 7 is that certain configurations are more likely to appear than others.To understand this aspect, we first highlight the significant differences between the probabilities of transitioning froma configuration to another, see Table S5. For instance, assuming that the system is leaving { + , + , + } , the probabilitiesof transitioning to {− , + , + } and { + , + , −} are 35.8% and 22.7%, respectively. This difference can be explained bythe fact that it is much easier to flip the state of EUR/USD and move to {− , + , + } than flipping EUR/JPY and moveto { + , + , −} . The value of the price trend φ n,(cid:96) ( t ) can be intuitively seen as the resistance to state changes of the (cid:96) -thmarket: the higher its value, the more the transaction price must fluctuate in the opposite direction to flip its sign.For each configuration, we sample the absolute value of this statistics at the emergence of any triangular arbitrageopportunity and normalize its average by the initial center of mass p (cid:96) ( t ), see Section S5, to make it comparable withthe same quantity measured in other markets. For { + , + , + } we find that (cid:104)| φ n,(cid:96) ( t ) |(cid:105) /p (cid:96) ( t ) is substantially higher forEUR/JPY than EUR/USD and USD/JPY, see Fig. S17. As a result, predatory market orders are more likely to setthe ground for transitions from { + , + , + } to {− , + , + } (35.8%) or { + , − , + } (33.6%). Looking at these transitions onthe opposite direction is even more compelling: { + , + , + } is the most likely destination from both {− , + , + } (37.5%)and { + , − , + } (36.4%). This hints at the presence of a loop in which the ecology transits from { + , + , + } to {− , + , + } or { + , − , + } and then moves back. Such dynamics find an explanation in the fact that the market that has recently11/32lipped its state, causing a departure from { + , + , + } towards {− , + , + } or { + , − , + } , can be easily flipped back againbefore its resistance to state changes φ n,(cid:96) ( t ) increases in absolute value. This happens when the arbitrager respondsto a type 2 triangular arbitrage opportunity (i.e., µ II ( t ) >
1) when the ecology configuration is either {− , + , + } or { + , − , + } .The significant probabilities of returning to { + , + , + } stem from the interplay of two elements. First, triangulararbitrage opportunities are more likely to be of type 2 than type 1 in both {− , + , + } and { + , − , + } , see Fig. S15.Second, the markets with lowest resistance to state changes (cid:104)| φ n,(cid:96) ( t ) |(cid:105) /p (cid:96) ( t ) are EUR/USD for {− , + , + } andUSD/JPY for { + , − , + } , see Fig. S17, which are exactly the states that should be flipped to return to { + , + , + } .The conditional transition probability matrix displayed in Table S5 reveals the presence of another configurationtriplet (i.e., {− , − , −} , {− , + , −} and { + , − , −} ) exhibiting an analogous behavior while {− , − , + } and { + , + , −} arethe only two configurations that are not part of any loop. Fig. S16 shows this mechanism in action by displaying thesequence of ecology configurations during a segment of the model simulation. It is easy to observe how the systemtends to move across configurations belonging to the same looping triplet for long, uninterrupted time windows.Ultimately, this peculiar mechanism increases, to different degrees, the appearance probabilities of configurationsinvolved in these loops at the expenses of {− , − , + } and { + , + , −} .To sum up, our model elucidates how the interplay between different trading strategies entangles the dynamics ofdifferent FX rates, leading to the characteristic shape of the cross-correlation functions observed in real tradingdata. The Arbitrager Model restricts its focus to the interactions between two types of strategies, namely triangulararbitrage and trend-following. Despite the simplicity of our framework, the interplay between these two strategies alonesatisfactorily reproduces the cross-correlation functions observed in real trading data. In particular, trend-followingstrategies preserve the current combination of market states for some time while reactions to triangular arbitrageopportunities influence the behavior of trend-following market makers by altering the price trend signals used intheir dealing strategies. The interactions between these two strategies constantly push the system towards certainconfigurations and away from others through multiple mechanisms. This can be easily seen in Fig. 7 as two distinctstatistics, the average expected lifetimes and the appearance probability, put the eight configurations in the sameorder. For instance { + , + , + } has the longer expected lifetime but also the highest appearance probability. This force shapes the features of the statistical relationships between currency pairs. FX rates traded in markets that share thesame state in configurations with higher (lower) appearance probabilities and longer (shorter) expected lifetimes aremore likely to fluctuate in the same (opposite) direction. For instance, let us consider USD/JPY and EUR/JPY.These two markets have the same states in the four configurations with higher probabilities (i.e., { + , + , + } , {− , + , + } , { + , − , −} and {− , − , −} ) and opposite states in those with lower probabilities (i.e., { + , − , + } , {− , − , + } , { + , + , −} and {− , + , −} ). It follows that the probability of observing USD/JPY and EUR/JPY in the same state at a givenpoint in time t is ≈ The purpose of this study was to obtain further insights on the microscopic origins of the widely documentedcross-correlations among currencies. We took up this challenge by introducing a new ABM, the Arbitrager Model, inwhich market makers adopting trend-following strategies provide liquidity in three independent markets and interactwith an arbitrager. In these settings, our model reproduced the characteristic shape of the cross-correlation functionbetween between fluctuations of FX rate pairs under the assumption that triangular arbitrage is the only mechanismthrough which the different FX rates become synchronized. This suggests that triangular arbitrage plays a primaryrole in the entanglement of the dynamics of currency pairs in real FX markets. In addition, the model explains howthe features of ρ i,j ( ω ) emerges from the interplay between triangular arbitrage and trend-following strategies. Inparticular, triangular arbitrage influences the trend-following behaviors of liquidity providers, driving the systemtowards certain combinations of price trend signs and away from others. This affects the probabilities of observingtwo FX rates drifting in the same or opposite direction, making one of the two scenarios more likely than the other.Ultimately, this entangles the dynamics of these prices, creating the significant cross-currency correlations that arereproduced in our model and observed in real trading data.The present study, finding a common ground between previous microscopic ABMs of the FX market and triangulararbitrage [37, 42, 59], sets a new benchmark for further investigations on the relationships between agent interactions12/32nd market interdependencies. In particular, it is the first ABM to provide a complete picture on the microscopicorigins of cross-currency correlations.The outcomes of this work open different research paths and raise new challenges that shall be considered in futurestudies. First, the Arbitrager Model could be further generalized by including a larger number of currencies, allowingtraders to monitor different currency triangles. We assert that extending the number of available currencies couldreveal new insights on i) statistical regularities related to the triangular arbitrage processes, such the distributionsof µ I ( t ) and µ II ( t ), and ii) how the features of the cross-correlation function between two FX rates stem from amuch more complex system in which the same FX rate is part of several triangles. Second, a potential extension ofthis model should consider the active presence of special agents operating in FX markets. For instance, simulatingpublic interventions implemented by central banks could be a valuable exercise to understand how the large volumesmoved by these entities affect the dynamics of the triangular arbitrage processes µ I ( t ) and µ II ( t ) and the localcorrelations (i.e., in the intervention time window) between currency pairs. Third, another interesting path leads tomarket design problems. In this study we have hypothesized a relationship between changes in the stabilization levelsof the cross-correlation functions ρ i,j ( ω ) and the different tick sizes adopted by EBS in the period covered by theemployed dataset. Calling for further investigations, we believe that an extended version of the present model shouldexamine how different tick sizes affect the correlations between FX rates.We are confident that appropriate extensions and enhancements could turn the model into a valuable tool thatcould be used by exchanges, regulators and market designers. In particular, its simple settings would allow theseentities to make predictions on how regulations or design changes could affect the relationships between FX rates andthe properties (e.g., frequency, magnitude, duration, etc.) of triangular arbitrage opportunities in a given market.Furthermore, its applicability might attract the attention of other actors operating in the FX market, such as centralbanks. The ultimate objective of this work and its potential future extensions shall remain the provision of usefulmeans to enhance the understanding of financial market dynamics, assisting the aforementioned entities in conceivingsafer and more efficient trading environments. We thank EBS, NEX Group plc. for providing the data employed in this study. Alberto Ciacci acknowledges PhDstudentships from the Engineering and Physical Sciences Research Council through Grant No. EP/L015129/1. AlbertoCiacci and Takumi Sueshige thank Kiyoshi Kanazawa for fruitful discussions.
Conceptualization:
Hideki Takayasu, Misako Takayasu, Alberto Ciacci, Takumi Sueshige
Funding acquisition:
Alberto Ciacci, Takumi Sueshige, Misako Takayasu
Project supervision:
Hideki Takayasu, Misako Takayasu, Kim Christensen
Investigation:
Alberto Ciacci, Takumi Sueshige
Methodology:
Alberto Ciacci, Takumi Sueshige, Hideki Takayasu, Misako Takayasu
Software:
Takumi Sueshige, Alberto Ciacci
Visualization:
Takumi Sueshige
Validation:
Alberto Ciacci, Takumi Sueshige
Writing - original draft:
Alberto Ciacci, Takumi Sueshige
Writing - review and editing:
Alberto Ciacci, Takumi Sueshige, Hideki Takayasu, Misako Takayasu, Kim Chris-tensen
References
1. Buchanan M. It’s a (stylized) fact! Nature Physics. 2011;8(1):3. 13/32. Gould MD, Porter MA, Williams S, McDonald M, Fenn DJ, Howison SD. Limit order books. QuantitativeFinance. 2013;13(11):1709–1742.3. Gopikrishnan P, Meyer M, Amaral LN, Stanley HE. Inverse cubic law for the distribution of stock pricevariations. The European Physical Journal B-Condensed Matter and Complex Systems. 1998;3(2):139–140.4. Cont R. Empirical properties of asset returns: stylized facts and statistical issues. Quantitative Finance.2001;1(2).5. Plerou V, Stanley HE. Stock return distributions: tests of scaling and universality from three distinct stockmarkets. Physical Review E. 2008;77(3):037101.6. Chakraborti A, Toke IM, Patriarca M, Abergel F. Econophysics review: I. Empirical facts. QuantitativeFinance. 2011;11(7):991–1012.7. Liu Y, Cizeau P, Meyer M, Peng CK, Stanley HE. Correlations in economic time series. Physica A: StatisticalMechanics and its Applications. 1997;245(3-4):437–440.8. Cont R. Volatility clustering in financial markets: empirical facts and agent-based models. In: Long memoryin economics. Springer; 2007. p. 289–309.9. Stanley HE, Plerou V, Gabaix X. A statistical physics view of financial fluctuations: Evidence for scaling anduniversality. Physica A: Statistical Mechanics and its Applications. 2008;387(15):3967–3981.10. Gu GF, Zhou WX. Emergence of long memory in stock volatility from a modified Mike-Farmer model. EPL(Europhysics Letters). 2009;86(4):48002.11. Zovko I, Farmer JD, et al. The power of patience: a behavioural regularity in limit-order placement. Quantitativefinance. 2002;2(5):387–392.12. Lillo F, Farmer JD. The long memory of the efficient market. Studies in nonlinear dynamics & econometrics.2004;8(3).13. Bouchaud JP, Gefen Y, Potters M, Wyart M. Fluctuations and response in financial markets: the subtle natureof ‘random’price changes. Quantitative finance. 2004;4(2):176–190.14. Cont R. Long range dependence in financial markets. In: Fractals in engineering. Springer; 2005. p. 159–179.15. Zhao L. A model of limit-order book dynamics and a consistent estimation procedure. Citeseer; 2010.16. A¨ıt-Sahalia Y, Mykland PA, Zhang L. Ultra high frequency volatility estimation with dependent microstructurenoise. Journal of Econometrics. 2011;160(1):160–175.17. Farmer JD, Smith E, Shubik M. Economics: the next physical science? arXiv preprint physics/0506086. 2005;.18. Parlour CA, Seppi DJ. Limit order markets: A survey. Handbook of financial intermediation and banking.2008;5:63–95.19. Chakravarty S, Holden CW. An integrated model of market and limit orders. Journal of Financial Intermediation.1995;4(3):213–241.20. Parlour CA. Price dynamics in limit order markets. The Review of Financial Studies. 1998;11(4):789–816.21. Foucault T. Order flow composition and trading costs in a dynamic limit order market1. Journal of Financialmarkets. 1999;2(2):99–134.22. Glosten LR, Milgrom PR. Bid, ask and transaction prices in a specialist market with heterogeneously informedtraders. Journal of financial economics. 1985;14(1):71–100.23. Kyle AS. Continuous auctions and insider trading. Econometrica: Journal of the Econometric Society. 1985; p.1315–1335. 14/324. Goettler R, Parlour C, Rajan U, et al. Microstructure effects and asset pricing. Preprint, available at http://enscientificcommons org/33345856. 2006;.25. Ro¸su I. A dynamic model of the limit order book. The Review of Financial Studies. 2009;22(11):4601–4641.26. Rosu I, et al. Liquidity and information in order driven markets. Chicago Booth School of Business. 2010;.27. Bertsimas D, Lo AW. Optimal control of execution costs. Journal of Financial Markets. 1998;1(1):1–50.28. Almgren R, Chriss N. Optimal execution of portfolio transactions. Journal of Risk. 2001;3:5–40.29. Alfonsi A, Fruth A, Schied A. Optimal execution strategies in limit order books with general shape functions.Quantitative Finance. 2010;10(2):143–157.30. Obizhaeva AA, Wang J. Optimal trading strategy and supply/demand dynamics. Journal of Financial Markets.2013;16(1):1–32.31. Anderson P, Arrow K, Pines D. The economy as an evolving complex system Addison-Wesley. Redwood City.1988;.32. Takayasu H, Miura H, Hirabayashi T, Hamada K. Statistical properties of deterministic threshold elements—thecase of market price. Physica A: Statistical Mechanics and its Applications. 1992;184(1-2):127–134.33. Sato AH, Takayasu H. Dynamic numerical models of stock market price: from microscopic determinism tomacroscopic randomness. Physica A: Statistical Mechanics and its Applications. 1998;250(1-4):231–252.34. Cont R, Bouchaud JP. Herd behavior and aggregate fluctuations in financial markets. Macroeconomic dynamics.2000;4(2):170–196.35. Chiarella C, Iori G, et al. A simulation analysis of the microstructure of double auction markets*. Quantitativefinance. 2002;2(5):346–353.36. Challet D, Stinchcombe R, et al. Non-constant rates and over-diffusive prices in a simple model of limit ordermarkets. Quantitative finance. 2003;3(3):155–162.37. Aiba Y, Hatano N. A microscopic model of triangular arbitrage. Physica A: Statistical Mechanics and itsApplications. 2006;371(2):572–584.38. Preis T, Golke S, Paul W, Schneider JJ. Multi-agent-based order book model of financial markets. EPL(Europhysics Letters). 2006;75(3):510.39. Preis T, Golke S, Paul W, Schneider JJ. Statistical analysis of financial returns for a multiagent order bookmodel of asset trading. Physical Review E. 2007;76(1):016108.40. Lillo F. Limit order placement as an utility maximization problem and the origin of power law distribution oflimit order prices. The European Physical Journal B. 2007;55(4):453–459.41. Yamada K, Takayasu H, Takayasu M. Characterization of foreign exchange market using the threshold-dealer-model. Physica A: Statistical Mechanics and its Applications. 2007;382(1):340–346.42. Yamada K, Takayasu H, Ito T, Takayasu M. Solvable stochastic dealer models for financial markets. PhysicalReview E. 2009;79(5):051120.43. Lee S, Lee K. Heterogeneous expectations leading to bubbles and crashes in asset markets: Tipping point,herding behavior and group effect in an agent-based model. Journal of Open Innovation: Technology, Market,and Complexity. 2015;1(1):12.44. Cocco L, Concas G, Marchesi M. Using an artificial financial market for studying a cryptocurrency market.Journal of Economic Interaction and Coordination. 2017;12(2):345–365. 15/325. Rime D, Schrimpf A. The anatomy of the global FX market through the lens of the 2013 Triennial Survey. BISQuarterly Review, December. 2013;.46. Bank for International Settlements (BIS). Monitoring of fast-paced electronic markets, Report submitted bya Study Group established by the Market Committee; 2018. Available from: .47. Mizuno T, Kurihara S, Takayasu M, Takayasu H. Time-scale dependence of correlations among foreigncurrencies. In: The Application of Econophysics. Springer; 2004. p. 24–29.48. Wang GJ, Xie C, Chen YJ, Chen S. Statistical properties of the foreign exchange network at differenttime scales: evidence from detrended cross-correlation coefficient and minimum spanning tree. Entropy.2013;15(5):1643–1662.49. Han MF, Westelius MNJ. Anatomy of Sudden Yen Appreciations. International Monetary Fund; 2019.50. Aiba Y, Hatano N, Takayasu H, Marumo K, Shimizu T. Triangular arbitrage as an interaction among foreignexchange rates. Physica A: Statistical Mechanics and its Applications. 2002;310(3-4):467–479.51. Fenn DJ, Howison SD, McDonald M, Williams S, Johnson NF. The mirage of triangular arbitrage in the spotforeign exchange market. International Journal of Theoretical and Applied Finance. 2009;12(08):1105–1123.52. Kozhan R, Tham WW. Execution risk in high-frequency arbitrage. Management Science. 2012;58(11):2131–2149.53. Foucault T, Kozhan R, Tham WW. Toxic arbitrage. The Review of Financial Studies. 2016;30(4):1053–1094.54. Bonart J, Lillo F. A continuous and efficient fundamental price on the discrete order book grid. Physica A:Statistical Mechanics and its Applications. 2018;503:698–713.55. Marshall B, Treepongkaruna S, Young M. Exploitable arbitrage opportunities exist in the foreign exchangemarket. American Finance Association Annual Meeting, New Orleans. 2008;.56. Mahmoodzadeh S, Gen¸cay R. Tick size change in the wholesale foreign exchange market. Working paper,Simon Fraser University, BC; 2014.57. CME Group. EBS; 2019. Available from: .58. CME Group. EBS Platforms; 2019. Available from: .59. Kanazawa K, Sueshige T, Takayasu H, Takayasu M. Derivation of the Boltzmann equation for financialBrownian motion: Direct observation of the collective motion of high-frequency traders. Physical review letters.2018;120(13):138301.60. Kanazawa K, Sueshige T, Takayasu H, Takayasu M. Kinetic theory for financial Brownian motion frommicroscopic dynamics. Physical Review E. 2018;98(5):052317.61. Sueshige T, Kanazawa K, Takayasu H, Takayasu M. Ecology of trading strategies in a forex market for limitand market orders. PloS one. 2018;13(12):e0208332.62. Yura Y, Takayasu H, Sornette D, Takayasu M. Financial brownian particle in the layered order-book fluid andfluctuation-dissipation relations. Physical review letters. 2014;112(9):098703.63. Sercu P. International finance: Theory into practice. Princeton University Press; 2009. 16/32 U S D / J PY E UR / J PY March July NovemberMarch July NovemberMarch July November E UR / U S D Fig S1. Mid price patterns . The panels show the dynamics of the mid price between January 1 st st S2 Tick sizes adopted by EBS in the period 2011-2014
Table S1. Tick sizes adopted in the EBS market.
Initial Month USD/JPY EUR/USD EUR/JPY2011-03 0.01 0.0001 0.012012-09 0.001 0.00001 0.001- 0.005 0.00005 0.005EBS has changed the tick size twice in the period between January 1 st st S3 The Dealer Model (Yamada et al. 2009)
The Dealer Model [42] introduces a simple market ecology in which N agents interact in a single inter-dealer marketwhere trading is organized in a LOB. For simplicity, the model assumes a continuous price grid, neglecting the roleplayed by the tick size in real financial markets. Agents act as market makers by maintaining buy and sell limitorders through which they provide a bid and an ask quote to the market. 17/32 ig S2. Dealer Model basics. The market is participated by N = 4 market makers providing bid b i ( t ) (bluecircles) and ask a i ( t ) (red circles) quotes, i = 1 , . . . , N . The continuous price grid prevents limit orders to be queuedat the same price level. Each limit order includes one unit of the traded currency. The market making spread L = a i ( t ) − b i ( t ), i = 1 , . . . , N is the same for each agent and constant in time, that is, market makers only managetheir dealing price z i ( t ) = ( a i ( t ) + b i ( t )) / i = 1 , . . . , N (white squares) to dynamically adjust their bid and askquotes b i ( t ) = z i ( t ) − L/ a i ( t ) = z i ( t ) + L/ i = 1 , . . . , N . The vertical dashed lines mark the best bid b ( t )(blue) and ask a ( t ) (red) quotes. The distance between the best quotes is the current spread s ( t ) = a ( t ) − b ( t ). Thecurrent mid price is m ( t ) = ( a ( t ) + b ( t )) / i -th market maker is willing to buy at a price that matches or exceeds the ask priceof the j -th market maker (i.e., b i ≥ a j ). Trades are settled at the transaction price p ( g t ) = ( a j ( t ) + b i ( t )) /
2, where g t is the number of transactions occurred in [0 , t [. We stress that the mid-price m ( t ) and the transaction price p ( g t ) aretwo different quantities. The former, being the mid point between the best quotes, is the center of the LOB and canbe tracked at any time step. The latter is sampled whenever two market makers engage in a trade.The Dealer Model assumes that a transaction prompts the entire market to immediately update their dealingprices z i ( t + dt ) , i = 1 , . . . , N to the latest transaction price p ( g t ), see Fig. S3. In the absence of interactions, marketmakers independently update their dealing prices by adopting a trend-based strategy z i ( t ) = z i ( t − dt ) + c (cid:104) ∆ p (cid:105) n dt + σ √ dt(cid:15) i ( t ) i = 1 , . . . , N (S1)where σ > (cid:15) i ( t ) ∼ N (0 , (cid:104) ∆ p (cid:105) n = 2 n ( n + 1) n − (cid:88) k =0 ( n − k )( p ( g t − k ) − p ( g t − k − n < g t changes in the transaction price p .The real-valued parameter c controls how the current price trend (cid:104) ∆ p (cid:105) n influences market makers’ strategies. Forinstance, c > z ( t ) in the direction of the price trend(i.e., trend-following). Conversely, c < ig S3. Interactions in the Dealer Model. (a) Market makers are not engaging in transactions as the best bidprice (blue dashed line) is smaller than the best ask price (red dashed line). (b) The best bid price matches the bestask price, prompting Market Makers p = ( a + b ) /
2. (c) This transaction prompts each marketmaker to update its dealing price to the latest transaction price (i.e., z → p ). S4 Agent interactions in the Arbitrager Model
In this section we provide further details on the mechanisms ruling agents interactions in the Arbitrager Model, seeFigs. S4 and S5.
Fig S4. Interactions in the Arbitrager Model. (a) Market makers are not engaging in transactions as the bestbid price (blue dashed line) is smaller than the best ask price (red dashed line). (b) The best bid price matches thebest ask price, prompting Market Makers p = ( a + b ) /
2. (c) This transaction prompts the twotransacting market makers to re-adjust their dealing prices z to the latest transaction price p . 19/32 a)(b)(c) EUR/JPY EUR/USD USD/JPY z z z z z z z z z z z z z z z z z z z z z z z z z z z Fig S5. Exploiting a triangular arbitrage opportunity in the Arbitrager Model. (a) The states of thethree markets before the emergence of an exploitable triangular arbitrage opportunity. (b) When µ I ( t ) ≥
1, thearbitrager submits a buy market order (blue square) in the EUR/JPY market and sell market orders (red squares) inthe EUR/USD and USD/JPY markets, matching the encapsulated limit orders (i.e., Market Maker z , EUR/JPY ( t + dt ) → a , EUR/JPY ( t )), causing a mid price change in each market. S5 Initialization and dynamic control of the Arbitrager Model
S5.1 Introduction
Kanazawa et al. [59] have recently introduced a microscopic model of the interactions between high frequency traders(HFTs) and investigated its theoretical aspects by adapting Boltzmann and Langevin equations to this specific context.The results of this work have been further formalized in a parallel study from the same authors [60]. The dealingprice updates in the HFT model are driven by the following dynamics z i,(cid:96) ( t ) = z i,(cid:96) ( t − dt ) + c ∗ (cid:96) tanh (cid:18) p (cid:96) ( g t,(cid:96) ) − p (cid:96) ( g t,(cid:96) − p ∗ (cid:96) (cid:19) dt + σ (cid:96) √ dt(cid:15) i,(cid:96) ( t ) i = 1 , . . . , N (cid:96) (S3)where ∆ p ∗ (cid:96) , c ∗ (cid:96) are constants while the other variables and constants have the same meaning as in Eq. (5). It canbe shown that setting ∆ p ∗ (cid:96) (cid:29) p (cid:96) ( g t(cid:96) ) − p (cid:96) ( g t(cid:96) −
1) allows for a linear approximation of Eq. (S3) that resembles thedynamics of the dealing price updates in the Arbitrager Model, see Eq. (5). This correspondence allows us to exploitthe theoretical results of [59, 60] to achieve a satisfactory control of the dynamics of the Arbitrager Model. Forinstance, Fig. S8 shows that the average time between consecutive transactions in simulations of the Arbitrager Modelis in strong agreement with its theoretical value estimated in the framework of Kanazawa et al. [59, 60]. In thefollowing sections we provide details on how the parameters governing the evolution of our model have been set in thesimulations discussed in this study. 20/32
Table S2. Parameters governing the dynamics of the Arbitrager ModelName Symbol Dimension Section
Initial center of mass p (cid:96) ( t ) price S5.3Market making spread L (cid:96) price S5.3Number of market participants N (cid:96) dimensionless S5.4Volatility of dealing price updates σ (cid:96) price/ √ time S5.4Average time between transactions Γ time (sec) S5.4Discretized time step ∆ t time (sec) S5.4Price changes accounted in φ n,(cid:96) ( t ) n dimensionless S5.5Scaling of the weight function in φ n,(cid:96) ( t ) ξ dimensionless S5.5Trend-following strength c (cid:96) price/time S5.6The evolution of the Arbitrager Model ecology is controlled by 9 parameters. For each parameter, we report itsnomenclature, symbol, dimension and the section in which we explain how its value is set in the simulations presentedin Fig. 5. S5.3 Initial state of the LOB
To initialize the (cid:96) -th LOB, we first fix its initial center of mass p (cid:96) ( t ) and the constant market making spread L (cid:96) .The former is set arbitrarily to a value with the same magnitude of the mid-price patterns observed in real tradingdata, see Fig. S1. Following the analysis of [59], we fix the market making spread in the USD/JPY market to L USD/JPY = 0 .
05. For simplicity, the market making spread in other markets is set such that it becomes proportionalto the size of p (cid:96) ( t ), that is L (cid:96) = L USD/JPY × ( p (cid:96) ( t ) /p USD/JPY ( t )). Table S3. Initial center of mass and market making spread in each marketExchange Rate p ( t ) L EUR/USD 1.25 0.05USD/JPY 110 0.05 × (110/1.25)EUR/JPY 137.5 0.05 × (137.5/1.25)Values of p (cid:96) ( t ) and L (cid:96) for EUR/USD, USD/JPY and EUR/JPY.At this point we use the values in Table S3 to obtain the initial dealing prices for each trader and market, thusrevealing the initial profile of the LOBs z i,(cid:96) ( t ) = (cid:40) L (cid:96) (cid:0)(cid:112) u i,(cid:96) − (cid:1) + p (cid:96) ( t ) , if 0 < u i,(cid:96) ≤ . L (cid:96) (cid:16) − (cid:112) − u i,(cid:96) ) (cid:17) + p (cid:96) ( t ) otherwise (S4)where u i,(cid:96) ∼ U (0 ,
1) is an uniformly distributed random variable. The expression in Eq. (S4) is derived from theinverse function sampling procedure. Let r ≡ ( z ( t ) − p ( t )) be the relative distance between an initial dealing price z ( t ) and the initial center of mass price p ( t ). The LOB profile is stable when the probability density function (PDF)of r is ψ (cid:96) ( r ) = (cid:40) L (cid:96) (cid:16) − | rL (cid:96) | (cid:17) if | r | ≤ L (cid:96) r isΨ (cid:96) ( r ) = (cid:40) L (cid:96) ( L (cid:96) + 2 r ) , if − L (cid:96) < r ≤ − L (cid:96) ( L (cid:96) − r ) + 1 otherwise (S6)then, we compute the inverse function of Eq. (S6)Ψ − (cid:96) ( y ) = (cid:40) L (cid:96) (cid:0) √ y − (cid:1) , if 0 < y ≤ . L (cid:96) (cid:16) − (cid:112) − y ) (cid:17) if 0 . < y ≤ y = u ∼ U (0 , z i,(cid:96) ( t ), seeEq. (S4). (a) (b) (c) Fig S6. Inverse function sampling in the context of the Arbitrager Model. (a) The LOB profile is stableif the PDF of r corresponds to the triangular function ψ (cid:96) ( r ) [60]. (b) The CDF Ψ (cid:96) ( r ). (c) Schematic of the inversefunction sampling applied to Ψ (cid:96) ( r ). S5.4 Relationships between simulation time and real time
Kanazawa et al. [60] found that the average time between two consecutive transactions isΓ = L (cid:96) N (cid:96) σ (cid:96) , (S8)In Section S5.3 we have fixed L (cid:96) . For the sake of simplicity, we assume that the three markets in the ArbitragerModel moves at the same pace , on average. This implies that Γ is the same in each market and constant in time.Informed by real trading data, we fix Γ as follows. We consider each market separately and calculate the averagewaiting times between consecutive transactions in each trading year. This leads to 12 averages (i.e., 4 years × ≈ . CD F time differences (unit: sec) 0 0.5 1 0.1 1 10 100 CD F time differences (unit: sec) 0 0.5 1 0.1 1 10 100 CD F time differences (unit: sec) 0 0.5 1 0.1 1 10 100 CD F time differences (unit: sec)2011 201220142013 (a) (b)(c) (d) Fig S7. Waiting times statistics in real trading data.
Cumulative density functions (CDFs) of the waitingtimes between consecutive transactions for EUR/USD (red), USD/JPY (blue) and EUR/JPY (green) in (a) 2011, (b)2012, (c) 2013 and (d) 2014. Data is provided by EBS, see Section 2.2.To ensure that simulations of our model maintain Γ ≈ . N (cid:96) and σ (cid:96) such that Eq. (S8)is satisfied. The number of market makers participating each market is set heuristically by considering severalcombinations ( N EUR/USD , N USD/JPY , N EUR/JPY ) and examining how well the model-based cross-correlation function ρ i,j ( ω ) replicates the same function built on real trading data. Having fixed N (cid:96) , the volatility of the dealing priceupdates is found by rearranging Eq. (S8) σ (cid:96) = L (cid:96) √ N (cid:96) Γ . (S9)Finally, the amplitude of a discretized time step in the model simulation ∆ t should be set such that ∆ t (cid:28) Γ. We fix∆ t = 0 .
01 sec and use this constant in the discrete approximation of Eq. (5).
Table S4. Approximate equivalences between real and model timesec time steps t = 0 .
01 sec, we show how many time steps roughly equate to 1 sec, 10 sec and 1 min.Fig. S8 shows the distributions of the time between consecutive transactions in simulations of the ArbitragerModel. We find that the average waiting time in our simulations is ˜Γ ≈ .
65 sec (65 time steps), which is very close tothe theoretical value Γ ≈ . t = 0 .
01 sec to convert simulation time steps in real time andcompare the stabilization of the data-based and model-based cross-correlation functions ρ i,j ( ω ), see Figs. 5 and S1123/32 P D F Time (unit: sec)
Fig S8. Waiting times statistics in the Arbitrager Model.
Probability density functions (PDFs) of thewaiting times between consecutive transactions for EUR/USD (red), USD/JPY (blue) and EUR/JPY (green) in theArbitrager Model. Simulations are performed under the same settings of the experiment presented in Fig. 5(b),bottom panel. For an adequate comparison against the theoretical predictions of the average time betweenconsecutive transactions [60], the PDFs do not account for transactions triggered by the arbitrager.
S5.5 Parameters involved in the calculation of the current price trend
The calculation of the price trend process φ n,(cid:96) ( t ), see Eq. (6), requires us to set the number of accounted transactionprice changes n and the scaling constant of the exponential weighting function ξ . In the simulations presented inFigs. 5 and S11 we arbitrarily set n = 15 observations and ξ = 5. These choices allow us to model a scenario in whichtrend-following market makers do not exclusively rely on the latest change in the transaction price to determine thecurrent direction of the market. Instead, they compute a weighted average of the most recent price changes whereweights are calculated according to an exponential function. S5.6 Trend-following strength parameter
The trend-following strength parameter c determines how the sign and value of the current price trend φ n,(cid:96) ( t ) affectthe strategic decisions of the participating market makers. When c >
0, market makers are likely to update theirdealing prices z ( t ) upward when the price trend is positive and downward when the price trend is negative. Conversely, c < et al. [61] have classified the strategic behavior of FX traders by examining EBS data covering thetrading activity in the USD/JPY market during the week starting from June 5 th c > et al. [62].Relying on these studies, we enforce the assumption that market makers populating the Arbitrager Model ecologyadopt trend-following strategies (i.e., c > c is the same for every market maker andacross markets. To fix c , we use Eq. (91) in [60]. The nondimensional parameter∆˜ p ∗ = 1 / ( c Γ) (S10)shall take values that are not far from 2 for the model to produce the marginal trend-following behavior, whichsuccessfully replicated various statistical properties of real trading data in [60]. This motivates us to set c = 0 .
8, thusobtaining ∆˜ p ∗ ≈ .
79. 24/32
S6.1 Motivations
The Arbitrager Model qualitatively replicates the shape of the cross-correlation functions ρ i,j ( ω ) and providesimportant insights on how the microscopic interactions between market makers and arbitragers entangles the dynamicsof different FX rates. However, the cross-correlation functions ρ i,j ( ω ) reproduced by this extremely simple modelpresent two features that are not found in real trading data. First, on extremely short time-scales (i.e., ω → ρ i,j ( ω ) does not approach zero as the same function built on real trading data. Second, the model-based ρ i,j ( ω ) flattens when ω (cid:39)
30 sec while the data-based ρ i,j ( ω ) flattens when ω (cid:39)
10 sec. -0.3 0 0.3 0 1 2 3 4 5 C o rr e l a t i on Time (unit: sec)-0.3 0 0.3 0.6 0 1 2 3 4 5 C o rr e l a t i on Time (unit: sec)
Trading data Simulation(a) (b)
Fig S9. Trading data vs. model based cross-correlations functions.
Enlarged visualization of thecross-correlation functions ρ i,j ( ω ) presented in Fig. 5. (a) Real market data (EBS) in 2013. (b) Arbitrager Modelsimulations. Contrarily to the cross-correlation functions displayed in (a), the model-based ρ i,j ( ω ) takes non-zerovalues when ω → γ .This introduces an additional toy (i.e., unrealistic) mechanism through which the dynamics of different FX ratesbecome entangled. S6.2 A more realistic decision making process
S6.2.1 The arbitrager
In the original model, see Section 2.3, the arbitrager automatically submits predatory market orders as soon asEqs. (7a) or (7b) exceeds the unit. In real FX markets this decision is far less trivial as these orders might not beexecuted at the prices used in the calculation of Eqs. (7a) and (7b). For instance, faster traders could have alreadyexploited the existing opportunity, pushing back Eqs. (7a) or (7b) below the unit. As a result, the profitable mispriceevaporates, exposing slower arbitragers to the risk of generating losses. We introduce a more realistic decision making25/32rocess in which the arbitrager takes into the account the risks associated with this trading strategy. In particular,the arbitrager submits market orders if one of the following conditions is satisfied µ I ( t ) ≥ ζ A ( t ) (S11a) µ II ( t ) ≥ ζ A ( t ) (S11b)where ζ A ( t ) ∼ exp( λ A ). The parameter λ A represents the risk profile of the arbitrager. The higher the value of λ A ,the more profitable the gap between real and implied prices must be to convince the arbitrager to exploit the currentopportunity. S6.2.2 Market makers
The submission of predatory market orders ensures immediate execution, forcing the matched market makers to eithersell too low or buy too high . In the original Arbitrager Model, see Section 2.3, market makers remain indifferentto triangular arbitrage opportunities, that is, they do not attempt to anticipate the arbitrager to avoid predatorymarket orders. However, it is plausible that such a simplifying assumption does not adequately describe the behaviorof liquidity providers acting in real FX markets. In this extension of the Arbitrager Model we enhance the strategicbehaviors of market makers by allowing them to foresee the arbitrager’s moves and re-adjust their quotes accordingly.Their dealing price updates are driven by Eq. (5), however, they also track the likelihood of engaging in an unfavourabletransaction with the arbitrager. For instance, the i -th market maker operating in the EUR/JPY market monitors itsexposure to predatory market orders by calculating the following ratios χ Ii,
EUR/JPY ( t ) = b USD/JPY ( t ) × b EUR/USD ( t ) a i, EUR/JPY ( t ) (S12a) χ IIi,
EUR/JPY ( t ) = b i, EUR/JPY ( t ) a USD/JPY ( t ) × a EUR/USD ( t ) (S12b)where b i,(cid:96) ( t ) and a i,(cid:96) ( t ) are the current bid and ask limit prices of the i -th market maker and b (cid:96) ( t ) and a (cid:96) ( t ) are thecurrent best quotes in the (cid:96) -th market. Clearly, Eqs. (S12a) and (S12b) can be straightforwardly rewritten for marketmakers operating in the USD/JPY or EUR/USD markets.The more Eqs. (S12a) or (S12b) exceeds the unit, the larger the discrepancy between the current quote of the i -thmarket maker and the implied best cross FX rate. In the former case, the i -th market maker is underpricing EUR/JPY,facing the risk of selling too low . In the latter case, the i -th market maker is overpricing EUR/JPY, facing the risk ofbuying too high . As the implied cross FX rate is the same for every agent, the market maker with the highest value of χ is always the one who is offering the best quote, hence the first to be matched by predatory market orders.In the same spirit of Eqs. (S11a) and (S11b), we assume that the i -th market maker, perceiving a high risk ofinteracting with the arbitrager, deletes and re-adjusts its current quotes if one of the following conditions is satisfied χ Ii,
EUR/JPY ( t ) ≥ ζ MM, EUR/JPY ( t ) (S13a) χ IIi,
EUR/JPY ( t ) ≥ ζ MM, EUR/JPY ( t ) (S13b)where ζ MM, EUR/JPY ( t ) ∼ exp( λ MM, EUR/JPY ). The parameter λ MM , EUR/JPY represents the average risk profile (i.e.,is the same for every market maker) in the EUR/JPY market. The lower the value of λ MM , EUR/JPY , the less marketmakers tolerate their exposure to predatory market orders.When Eqs. (S13a) or (S13b) is satisfied, the i -th market maker sets its dealing price to the current mid price m EUR/JPY ( t ) = ( a EUR/JPY ( t ) + b EUR/JPY ( t )) /
2, rejecting the update imposed by Eq. (5) to reduce the risk ofengaging in a transaction with the arbitrager. This mimics real traders deleting their limit orders queued in the veryfirst levels of the LOB to replace them with new orders lying farther away from the current best quotes. 26/32 a) EUR/JPY
Fig S10. Foreseeing a triangular arbitrage opportunity in the Arbitrager Model.
The plot considers theEUR/JPY market. The best bid and ask quotes are marked by the blue and red dashed lines, respectively. Theimplied best bid price of EUR/JPY (i.e., b USD/JPY × b EUR/USD ) is denoted by the green solid line. (a) The currentbest ask quote a EUR/JPY (red dashed line) is smaller than the implied best bid quote b USD/JPY × b EUR/USD (greensolid line). This misprice exposes Market Maker buylow a EUR/JPY and sell high b USD/JPY × b EUR/USD . (b) When χ I , EUR/JPY ≥ ζ MM, EUR/JPY , Market Maker z , EUR/JPY to the mid price m EUR/JPY (i.e., the mid point between the best quotes in (a)).This action neutralizes the existing triangular arbitrage opportunity as the new best ask quote a EUR/JPY (red dashedline) matches or exceeds the implied best bid quote b USD/JPY × b EUR/USD (green solid line).
S6.3 An additional price-entangling mechanism
The law of one price states that in frictionless markets the prices of two assets with the same cash flows must beidentical [63]. The law of one price is maintained by two distinct mechanisms, triangular arbitrage and and shoppingaround , which promptly correct temporary gaps between the prices of two identical assets [63]. The former has beenextensively described in Section 2.1.2 and it is the only way to enforce the law of one price in the standard version ofthe Arbitrager Model, see Section 2.3. The latter mechanism relates to the fact that rational traders, having detectedtwo assets with identical cash flows but different prices, always buy the one with lower price and sell the one withhigher price. This alters the demand and supply in the markets in which these assets are exchanged, thus closing thegap between their prices [63]. Reproducing the shopping around mechanism in the Arbitrager Model requires marketmakers to operate in multiple LOBs. To avoid a complete overhaul of the fundamentals of the Arbitrager Model,we opt instead for a simpler stylized mechanism which retains the basic feature that distinguishes shopping aroundfrom triangular arbitrage, that is, the absence of a round trip (e.g. JPY → EUR → USD → JPY) [63]. We assumethat market makers operating in the EUR/JPY market peg their bid and ask quotes to the implied best bid andask prices with constant probability γ , thus rejecting the dealing price update imposed by Eq. (5). For instance, thequotes of the i -th market maker that decides to peg its prices to the implied best quotes at time t are b i, EUR/JPY ( t ) = b EUR/USD ( t ) × b USD/JPY ( t ) , (S14) a i, EUR/JPY ( t ) = a EUR/USD ( t ) × a USD/JPY ( t ) . (S15)This introduces an additional, simplistic mechanism through which the price of EUR/JPY is pushed towards itsimplied FX cross rate EUR/USD × USD/JPY.
S6.4 Cross-correlation functions and discussion
Fig. S11 reveals how the inclusion of additional features of real FX markets improves the replication of the characteristicshape of ρ i,j ( ω ). In particular, both the data-based and model-based cross-correlation functions ρ i,j ( ω ) approachzero on extremely short time-scales (i.e., ω → ρ i,j ( ω )flattens on much shorter time-scales when compared to the standard Arbitrager Model, see Fig. 5(b). This rapidstabilization is indeed observed in cross-correlation functions derived from real trading data, see Fig. S11(a). 27/32
011 20122013 2014
Trading Data Simulation (unit: sec) (unit: sec)(unit: sec)-0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec) (a) (b) -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on -0.3 0 0.3 0.6 C o rr e l a t i on
0 10 20 30 40 50 60(unit: sec) C o rr e l a t i on -0.3 0 0.3 0.6 0 10 20 30 40 50 60 C o rr e l a t i on (unit: sec) C o rr e l a t i on Fig S11. Trading data vs. model based cross-correlation functions.
Cross-correlation function ρ i,j ( ω ) for∆USD/JPY vs. ∆EUR/USD (green), ∆EUR/USD vs. ∆EUR/JPY (blue) and ∆USD/JPY vs. ∆EUR/JPY (red) asa function of the time-scale ω of the underlying time series. (a) Real market data (EBS) across four distinct years(2011-2014). (b) Extended Arbitrager Model simulations. The number of participating market makers( N EUR/USD , N
USD/JPY , N
EUR/JPY ) are (30 , ,
20) in the first experiment, see (b) top panel, and (30 , ,
20) in thesecond experiment, see (b) bottom panel. Details on the other settings of the simulations are provided in Fig. 5. Therisk profile of the arbitrager is λ A = 0 .
01 while the risk profiles of market makers are λ MM, USD/JPY = λ MM, EUR/USD = λ MM, EUR/JPY = 0 . γ = 0 .
01. The insets in (b) provide an enlarged visualization of the cross-correlations functions ρ i,j ( ω ) on very shorttime-scales (i.e. ω < ρ i,j ( ω ) when ω → ρ i,j ( ω ) presented in Fig. S11(b) is based on a set of risk profile parameters that gives marketmakers a predominant role at the expense of the arbitrager. This means that a large fraction of triangular arbitrageopportunities are neutralized by market makers before the arbitrager can place predatory market orders. This resultcannot inform us on the fraction of opportunities that are destroyed by market makers or exploited by arbitragers inreal FX markets. However, it suggests that the entanglement of the dynamics of FX rates starts at different times ineach market, depending on the current state of the LOB.The second insight emerging from Fig. S11 is that the interdependencies among currencies stem from the interplay ofseveral agents’ behaviors. While the interactions between triangular arbitrage and trend-following strategies retaina primary, necessary role in the entanglement of FX rates dynamics, the introduction of a second, complementarymechanism (i.e., shopping around ) to close the gap between real and implied prices allows the model based ρ i,j ( ω ) tostabilize on shorter time-scales ω , obtaining a characteristic shape that is strongly compatible with the same functionderived from real trading data. This suggests that in real FX markets additional strategies are likely to interact withtriangular arbitrage and trend-following behaviors to shape the features of cross-currency correlations. 28/32 TimeTime E UR / U S D TimeEUR/USDUSD/JPYEUR/JPY -++ -+- ++- +-- U S D / J PYE UR / J PY Fig S12. Price trend signs and market states.
Simulated price patterns of EUR/USD (top), USD/JPY (mid)and EUR/JPY (bottom). Periods of negative (positive) price trends are denoted by a red (green) background.Vertical dashed lines mark a change in the ecology configuration q ( t ). Price trends φ n,(cid:96) are calculated over the mostrecent n = 15 changes in the transaction price and with scaling constant ξ = 5. The table below the panels combinesthe market states to show how the ecology configuration q ( t ) evolves in time. S8 Statistical properties of ecology configurations time (unit: sec)(a) 10 -4 -2
0 3 6 9
CCD F time (unit: sec)(b) 10 -4 -2
0 3 6 9
CCD F Fig S13. Complementary cumulative distribution function (CCDF) of the time between theemergence of the first triangular arbitrage opportunity and the transition to another configuration.
The CCDFs are presented in two separate panels and each color represents a given configuration: (a) { + , + , + } (violet), {− , + , + } (cyan), { + , − , + } (green) and {− , − , + } (orange). (b) {− , − , −} (violet), { + , − , −} (cyan), {− , + , −} (green) and { + , + , −} (orange). The black lines mark the CCDF of the interval (in sec) between a randompoint in time and the transition to another configuration. The y-axis is visualized in the logarithmic scale.Configurations exhibit different tails of the distribution, suggesting that the probability of observing large waitingtimes between the emergence of the first triangular arbitrage opportunity and the transition to another configurationdepends on the current combinations of market states. 29/32 -4 -2
0 4 8
CCD F (b) time (unit: sec)10 -4 -2
0 4 8
CCD F (a) time (unit: sec) Fig S14. Complementary cumulative distribution function (CCDF) of the time required for the firsttriangular arbitrage opportunity to emerge.
The CCDFs are presented in two separate panels and each colorrepresents a given configuration: (a) { + , + , + } (violet), { + , + , + } (cyan), { + , − , + } (green) and {− , − , + } (orange).(b) {− , − , −} (violet), { + , − , −} (cyan), {− , + , −} (green) and { + , + , −} (orange). The y-axis is visualized in thelogarithmic scale. Configurations exhibit different tails of the distribution, suggesting that the probability ofobserving large waiting times between the inception of the configuration and the emergence of the first triangulararbitrage opportunity depends on the current combinations of market states. Table S5. Transition rates between two configurations
Configuration { +, +, + } { -, +, + } { +, -, + } { -, -, + } { +, +, - } { -, +, - } { +, -, - } { -, -, - }{ +, +, + } { -, +, + } { +, -, + } { -, -, + } { +, +, - } { -, +, - } { +, -, - } { -, -, - } Rows (Columns) indicate the departed (reached) configuration. We count how many times the system transitionedbetween two specific configurations and normalize this number by the total number of transitions from the departedconfiguration. The two grey portions of the matrix mark the first (upper-left) and second (lower-right) clustersdiscussed in Section 3.2. 30/32 r obab ili t i e s +++ EUR/USDUSD/JPYEUR/JPY -++ +-+ --+ ++- -+- ---+--
Fig S15. Fraction of triangular arbitrage opportunities of the first and second type in each ecologyconfiguration.
Black bars denote the incidence of type 1 opportunities, see Eq. (4a), while white bars represent theincidence of type 2 opportunities, see Eq. (4b). We notice that one type appears more frequently than the other,depending on the considered configuration. C l u s t e r time (unit: sec) Fig S16. The sequence of transitions between configurations exhibits a clustered behavior.
The x-axisrepresents an arbitrary time window of the experiment. The y-axis splits the eight ecology configurations in threegroups - from top to bottom: (1) cluster 1, (2) cluster 2 and (3) {− , − , + } and { + , + , −} , which are the twoconfigurations that do not belong to any cluster. Details on the concept of configuration clustering are provided inSection 3.2. At each point in time we identify the current ecology configuration and add a marker to the group itbelongs to. A visual inspection of the figure reveals the presence of time windows in which the system moves betweenconfigurations belonging to the same cluster, corresponding to the long, uninterrupted lines observed in groups 1 and2, but not in group 3. These peculiar dynamics favor the appearance of configurations belonging to groups 1 and 2 atthe expenses of those belonging to group 3, see Fig. 7(b). Details on the conversion between simulation time (i.e.,time steps) and real time (i.e., sec) are provided in Section S5. 31/32 .04.0 108.0 10 R e l a t i v e t r end s +++ EUR/USDUSD/JPYEUR/JPY -++ +-+ --+ ++- -+- ---+-- -6-6
Fig S17. Price trends and changes in market states.
Sample averages of the normalized absolute value of theprice trend (cid:104)| φ n,(cid:96) ( t ) | /p (cid:96) ( t ) (cid:105) for EUR/USD (orange), USD/JPY (violet) and EUR/JPY (cyan). Normalizing by theinitial center of mass p (cid:96) ( t ) allows us to compare the price trends across markets with different price magnitudes. Weexclusively sample the value | φ n,(cid:96) ( t ) | /p (cid:96) ( t ) at the emergence of each triangular arbitrage opportunity and considereach configuration independently. As arbitrager’s market orders alter price trends, the value of | φ n,(cid:96) ( t ) | /p (cid:96) ( t ), where t is the time step when µ I or µ II exceeds the unit, informs us on how currently hard is to flip the state of the (cid:96) -thmarket. For instance, we consider { + , + , + } and observe that (cid:104)| φ n,(cid:96) ( t ) | /p (cid:96) ( t ) (cid:105) is much higher in EUR/JPY than inEUR/USD and USD/JPY. This is reflected in the probabilities of transitioning from { + , + , + } to otherconfigurations. Flipping EUR/JPY before the other two markets, causing a transition to { + , + , −} , occurs in 22.7%of the cases. However, flipping EUR/USD or USD/JPY first, causing a transition to {− , + , + } or { + , − , + }}