Judgment day: algorithmic trading around the Swiss Franc cap removal

A key issue for decentralised markets like FX is how the market responds to extreme situations. Using data on FX transactions with a precise identi ﬁ cation of Algorithmic trading (AT)


Introduction
'Algorithmic traders . . . are a larger presence in various markets than previously, and the willingness of these institutions to support liquidity in stressful conditions is uncertain'.
-Janet L. Yellen New technologies have dramatically changed financial markets. One of the main innovations in recent years is algorithmic trading (AT), which broadly refers to the direct use of computers to implement trades. AT is now widely used by financial institutions, such as banks and hedge funds, and has important effects on the operation of financial markets. On one hand, it can improve market liquidity by reducing transaction costs and the reliance on financial intermediaries. It can also make security prices more efficient, in the sense that they better reflect fundamental values. It can even reduce risks due to human feelings that lead to, for example, panic reactions and herding behaviour. On the other hand, AT may not be socially desirable because it can increase market power (Hoffmann 2014), adverse selection (Biais et al. 2015), excess volatility and extreme market movements (Foucault et al. 2016)as occurred in the recent 'yen flash crash' 6 -and so can potentially threaten financial stability. We focus on this last issue in the current paper.
It is important to realise that investors use algorithms for many different purposes and strategies; therefore, the impact they have on market quality (e.g., liquidity, volatility and price efficiency) depends on why and how AT operates. This diversity contrasts with both the academic and popular literature, which has thus far focused on high-frequency proprietary algorithms. Hasbrouck and Saar (2013) and O'Hara (2015) indicate that a useful distinction is to categorise AT as 'agency' or 'proprietary'. Agency AT is used by buy-side institutions (and the broker-dealer firms that serve them) to minimise execution costs and the price impact of their trading. Proprietary AT, in contrast, aims to profit from the computer trading process itself, using algorithms to identify profitable trades in the market and exercising tight risk control (Bank for International Settlements [BIS] 2011). Typical proprietary AT is undertaken by sophisticated firms, such as hedge funds, that rely on low latency and are referred to as 'high-frequency trading (HFT) firms'. In this paper, we offer some evidence on the differential role of these two broad categories of agency and proprietary AT and analyse how they contribute to foreign exchange (FX) market quality in terms of liquidity and price efficiency.
We analyse the role of AT alongside human trading in the FX market in a period containing the announcement by the Swiss National Bank (SNB) on 15 January 2015 that it had discontinued its policy of capping the value of the Swiss franc (CHF) against the euro (EUR). This 'Swiss franc event' represents a natural experiment as one of the largest shocks to financial markets in recent years. 7 Also, it is the most significant 'black swan' event in the period in which AT has been a prominent force in the FX market. A detailed identification of AT and high granular order book data obtained from EBS, which is the leading platform for electronic spot FX trading in many of the major currencies, allows us to shed light on the contribution of AT and human traders to two important dimensions of market quality: liquidity and price efficiency.
A better understanding of whether AT is beneficial or detrimental to market quality in distressed situations is important for at least two reasons. First, being the first paper studying AT and human behaviours in an extreme event destabilising the FX market, our work may support the ongoing reform of trading venues (e.g., the Regulation National Market System [NMS] in the United States [US], and the Markets in Financial Instruments Directive [MiFID] I and II in Europe) and the efforts to regulate over-the-counter (OTC) markets (e.g., the Dodd-Frank Act, European Market Infrastructure Regulation [EMIR] and FX Global Code). The FX market is especially important because it is the world's largest financial market, 8 and it is crucial in guaranteeing efficiency and arbitrage conditions in many other markets, including those of bonds, stocks and derivatives. Also, as an OTC market, it is more fragmented and opaque, and it relies on bilateral clearing rather than central clearing (CCP). Moreover, FX spot transactions demand little margin, allowing FX traders to take highly leveraged positions easily (e.g., Galati et al. 2007).
Second, the resilience of an exchange system depends on the market participant types, their shares and their reciprocal influence on each other. As pointed out by Yellen (2017), this is particularly relevant for financial stability because, for instance, the contribution of AT to offer liquidity in calm markets can disappear in distressed situations-that is, when other market participants most need it. If these adverse consequences of AT are predominant, or not offset by human trading or by the prompt interventions of, for example, a central bank, then AT could represent a systemic threat to the whole trading system.
We proceed in three steps. First, we describe our data set, which is representative of the interdealer FX market and at the core of the Swiss franc FX market. Specifically, our data come from the central limit order book for spot FX operated by EBS Service Company Limited, which is part of NEX Markets and a business division of the NEX Group plc. To introduce our analysis, we provide an overview of trading patterns conducted by AT and human traders, as well as the role of the SNB. Second, we perform an in-depth analysis of two important dimensions of market quality: market liquidity and price efficiency.
By decomposing order flow and effective spreads by trader type, we highlight the contribution of agency and proprietary AT as well as human traders to liquidity provision and consumption. Third, to address the issue of price efficiency, we examine how AT and human traders contribute to (uninformative) volatility, to the price discovery process and to restoring arbitrage conditions.
Our study delivers three important findings. First, in reaction to the Swiss franc event, we find that AT, especially agency algorithms, significantly worsened market liquidity by reducing their supply and increasing their demand for liquidity-particularly in the direction of Swiss franc appreciation.
Conversely, human traders supported liquidity provision. Our estimates of effective spreads show that all spreads exploded on the event day, particularly those of proprietary ATs, and they remained much wider in the post-event period. Second, the supportive role of AT in price efficiency in the pre-event period disappeared during and after the shock. Rather than leading the price discovery process and closing arbitrage gaps, AT created uninformative volatility. Thus, our analysis delivers a consistent message: in extreme situations such as the Swiss franc event, the contribution of AT to market quality is reduced. Third, though our data set does not allow us to precisely identify SNB trades, our estimates indicate that the central bank's intervention was sizeable and diversified, implying that only part of it was conducted through the EBS platform. Our result showing AT's lack of contribution to sustaining market quality seems to hold true before, during and after central bank interventions occurred.
Of course, as in Tolstoy's comment on unhappy families, each period of market distress is distressed in its own way. Furthermore, the perfect identification of central bank activity and market participants' perception of it, as well as counterfactuals about what would have happened without it, are unachievable. However, like previous papers investigating important shocks, such as the failure of Lehman Brothers in 2008 (Afonso et al. 2011), the 'Flash Crash' in 2010(Kirilenko et al. 2017) and the Swiss franc event itself (Hagströmer and Menkveld 2019), our analysis should improve our understanding of AT, extreme market events, central bank interventions and broader financial stability issues.
Our paper contributes to three strands of the literature: First, it contributes to prior research on AT.
Apart from the important exception of Chaboud et al. (2014), prior research has focused on HFT, which is a specific category of AT. 9 Without distinguishing agency and proprietary AT categories, Chaboud et al. (2014) show that AT tends to improve price efficiency in 'normal' times and conclude that, 'it cannot be ruled out that AT may, on rare but important occasions, contribute to excess volatility' (Chaboud et al. 2014(Chaboud et al. , p. 2075. We fill this gap by analysing whether AT contributes to market quality in extreme events and find that AT, especially agency AT, was detrimental to market liquidity and both types of AT were unsupportive of price efficiency. Second, we add to the empirical literature on market crashes and extreme events. By inferring the identity of those engaged in HFT from traders' behaviour (e.g., based on the number of trades per day ' 9 The 'official' definition of 'HFT' is somewhat unclear; the Nasdaq and official sources such as MiFID II effectively use a broad definition of 'HFT' that includes agency algorithms. In addition to characteristics such as sophisticated computer programmes and colocation, the US Securities and Exchange Commission (SEC) definition includes algorithms that initiate trades that rely on speed of execution (see SEC 2010). It is the latter definition we use here to distinguish HFT from other AT. and net position of inventory), Kirilenko et al. (2017) analyse 15 putative high-frequency traders active on the CME E-Mini S&P 500 Futures market during the 2010 'Flash Crash'. Brogaard et al. (2018) study (intraday) short-lived large price movements across a few US stocks (3.5 stocks, on average). Our work differs from these papers in three important aspects: (i) we analyse AT and human traders in an OTC market that, by its nature, may be less resilient to shocks (Duffie 2012); (ii) we access the exact identification of traders' categories; and (iii) we investigate a genuinely exogenous and market-wide shock.
Third, we contribute to empirical research on FX interventions conducted by central banks, recently surveyed by Fratzscher et al. (2019), by performing a microstructure analysis of (agency and proprietary) algorithmic and human trading during periods of central bank intervention.

Literature review and testing hypotheses
The growing literature 10 on AT has tended to focus on HFT, which involves a specific category of proprietary ATs that operate high-speed technologies. The most commonly discussed issue is how HFT affects liquidity and price efficiency. The HFT community's ability to revise their quotes quickly after the arrival of news reduces the problem of the winner's curse but creates disincentives for trading for slower traders (Hoffmann 2014;Jovanovic and Menkveld 2016), including increased adverse selection and price impact (Foucault et al. 2016). In reaction to a fundamental shock, such as the SNB's announcement, it is reasonable to assume that AT's superior technology to adjust quotes and process information would aggravate the adverse selection affecting human traders. Thus, the first hypothesis is that, in reaction to the SNB shock, AT increased its market share relative to human traders and contributed more to informative trading and price efficiency.
In addition to increasing informational efficiency, the consensus is that HFT market-making enhances market quality by reducing spreads (O'Hara 2015). 11 However, it is not clear whether HFTs go with or lean against the wind-that is, whether HFTs amplify price falls (rises) by actively selling (buying), or dampen them by actively buying (selling) (Korajczyk and Murphy 2019;van Kervel and Menkveld 2019;Breckenfelder 2013;Tong 2015). A second hypothesis is that, in reaction to the shock, the share of the liquidity provision originating through AT changed.
While there is evidence that AT can be beneficial to market operation in normal circumstances, it is possible that the opposite may be true in unusual ones. On one hand, AT protocols are generally preprogrammed to operate in 'normal' market conditions (Chaboud et al. 2014), but AT may suffer reduced effectiveness or even cease to function in extreme conditions. On the other hand, human traders acting as dealers maintain a greater risk-bearing capacity and apply discretionary judgements (for example, to mutually share risk as a more efficient solution or to conduct better inference of unusual patterns, such as central bank interventions). For instance, Ait-Sahalia and Saglam (2014) and Rosu (2016) model HFT as averse to inventory risk and predict that volatility will lead high-frequency traders to reduce their provision of liquidity. Biais et al. (2015) find a role for HFT in fragmented markets, an issue that produces adverse selection, negative externalities and over-investment in equilibrium. 12 Thus, an alternative hypothesis is that there is a reduction in the activity and contribution to market quality of AT relative to human traders in extreme situations.
By analysing a 'black swan' event, our paper is mostly related to the literature on stock markets and future markets in distressed times. Prior research provides mixed evidence of the role of AT (more specifically, HFTs). On one hand, HFTs withdraw from their market-making role during flash crashes Menkveld and Yueshen 2018) or when market conditions become unfavourable (see, for example, 11 See, for example, Boehmer et al. (2018aBoehmer et al. ( , 2018b, Brogaard et al. (2015), Carrion (2013), Conrad et al. (2015), Hasbrouck and Saar (2013), Hendershott et al. (2011), Menkveld (2013 and Malinova et al. (2018). 12 The role of AT in fragmented markets with multiple exchanges is studied by Pagnotta and Philippon (2018). Other papers analyse the welfare implications from double auctions (e.g., Cespa and Vives, 2015;Du and Zhu, 2015) and asynchronous arrivals (e.g., Budish et al., 2015;Bongaerts and Van Achter, 2016). Bernales (2014) and Rojcek and Ziegler (2016) use numerical methods for dynamic models encompassing the endogenous role of HFT, central limit order books and latency. Raman et al. 2014;Anand and Venkataraman 2014;Korajczyk and Murphy 2019). On the other hand, HFTs provide liquidity and absorb imbalances created by non-high-frequency traders around large price movements (though only for single stocks, not for broader events) (Brogaard et al. 2018), and HFTs do not change their trading pattern when prices fall during flash crashes (Kirilenko et al. 2017).
In comparison with these papers, one of our key contributions is the analysis of an extreme event in the FX market. This differs from the markets studied in prior AT/HFT research in many important respects, including that (i) leveraged FX traders almost exclusively transact OTC (without clearing via CCPs), (ii) it is dominated by global FX dealers and (iii) central banks can intervene to directly affect FX rates.
The first two characteristics may lead to 'liquidity spirals' (Brunnermeier and Pedersen 2009;Brunnermeier et al. 2009), causing sudden losses, margin increases and liquidity dry-ups (Mancini et al. 2013), thereby impairing the risk-bearing capacity of international FX dealers (Gabaix and Maggiori 2015) and increasing the risk of coordination failures when speculative positions such as 'carry trade' are unwound (Plantin and Shin 2011). The only earlier paper that provides an in-depth analysis of AT in the FX market is that of Chaboud et al. (2014), who show that AT running in 'normal' conditions is associated with a reduction in arbitrage opportunities and that AT liquidity provision decreases return autocorrelation.

Market structure
At the core of the FX market, there is the interdealer segment (Lyons 2001). In it, EBS and Reuters are the two significant global electronic spot-trading platforms in major currency pairs. USD/CHF and EUR/CHF, the focus of this study, primarily trade on EBS (see King et al. 2012), and prices on EBS also constitute the reference values for derivative pricing in these currencies. Moreover, during the period of the Swiss franc event, EBS was the key trading platform for all Swiss franc positions, as the trading of futures on the Chicago Mercantile Exchange was suspended and OTC trading largely disappeared (Hagströmer and Menkveld 2019).
EBS is an order-driven electronic trading system that unites buyers and sellers of spot FX around the globe on a pre-trade anonymous central limit order book. EBS is accessible to FX dealing banks and, under the auspices of dealing banks (via prime brokerage arrangements), to hedge funds and commodity trading advisors (CTAs). EBS controls the network and each of the terminals on which it is recorded whether a trade is conducted by an ordinary keyboard ('manual' or 'human' trades) or by a direct computer interface ('algorithmic' trades).
As well as this simple distinction by terminal type, EBS requires market participants to identify in which types of trading they engage. This allows EBS to decompose the algorithmic trades into two different categories, referred to as 'bank algorithmic interface' ('bank AI') and 'professional trading community AI' ('PTC AI'), which is how EBS labels the direct computer interfaces. 13 'PTC' essentially refers to non-bank entities, such as hedge funds and CTAs, that can directly trade on EBS under the auspices of dealing banks (via prime brokerage arrangements). Trading through this route is all proprietary AT in the sense that it does not include trades directly driven by client demand. HFT algorithms contribute significantly to this type of trading. Bank AI is a mixed category dominated by agency AT. This includes a significant share (EBS estimates approximately 30%) of simple aggregators, which are computerbased trading systems that simply aggregate and process orders received from bank customers and from other types of agency AT, such as hedging and auto liquidation algorithms. This latter category of agency AT has been highlighted as a source of price distortions during other crashes (e.g., McCann and Yan 2015; BIS 2017). While it is likely that bank AI also contains some proprietary AT, it is dominated by agency AT. Hence, we treat it as representative of that category of trading. Figure 1 illustrates the three trade categories and their shares of average transaction volumes in EBS. For the rest of the paper, we discuss bank AI as agency (bank) AT and PTC AI as proprietary (non-bank) AT. 14 13 Market data at this level of granularity are not ordinarily sold or distributed by EBS to third parties. 14 Prior research shows that agency algorithmic execution orders tend to be larger in size and are executed at a lower frequency (BIS 2011), whereas HFT has higher trading volumes and numbers of trades but a smaller trade size than do non-HFT firms or large institutional investors (see, e.g., Aitken et al., 2014;Subrahmanyam and Zhen, 2016;Korajczyk and Murphy, 2019;van Kervel and Computer-based trading classified as PTC or bank AI accounts for approximately 70% of EBS market's transaction volume. However, the system includes features designed to prevent strategies by which speed or low latency is the sole contributor to success. First, it imposes a minimum quote life (MQL) for the five core currency pairs on EBS, so that once a limit order 15 is submitted, it cannot be cancelled for 250 milliseconds. 16 Second, and more importantly, EBS operates a randomised batching window on all messages that enter its matching engine, referred to as a 'latency floor'. This mechanism generates batching windows of 1-3 milliseconds, 17 during which time messages are processed on a randomised basis. As a result, the first message to arrive may not be the first released, and sub-millisecond differences in latency become less important for trading on EBS. 18 Because EBS is a 'wholesale' trading system, the minimum trade size over our sample period is one million of the base currency, 19 and trade sizes are only allowed in multiples of millions of the base currency.

Data
Our data consist of both intraday quotes and transactions for EUR/CHF, USD/CHF, EUR/USD, USD/JPY and EUR/JPY from 5 to 23 January 2015. This paper focuses on EUR/CHF and USD/CHF, and additional findings on the remaining currency pairs are summarised in 'Non-CHF foreign exchange rates' in the Online Appendix. We specify 15 January as the Swiss franc event day, 5-14 January as the pre-event period and 16-23 January as the post-event period. Following the convention in the literature . The descriptive statistics of these features in our data confirm that among the three categories, PTC AI is characterised by the highest average daily trading volume and number of trades but the smallest average daily trade size. See Table  OA.2 in the Online Appendix for further details. 15 We refer to 'limit orders' as those termed 'good-till-cancelled' ('GTC') orders by EBS. 16 An MQL of 250 milliseconds was applied in the EUR/USD, USD/JPY, USD/CHF, EUR/CHF and EUR/JPY currency pairs on EBS for the dates referenced in this paper. 17 This is for the dates referenced in this paper. 18 Note that this is not analogous to the frequent batch auction system described by Budish et al. (2015), which eliminates sniping of stale quotes, but is more like the random order delay system of Harris (2012). 19 The base currency is the first currency displayed in the symbol of the currency pair. For example, the euro is the base currency of EUR/CHF. (e.g., Mancini et al. 2013), we focus on data between 8:00 Greenwich Mean Time (GMT) and 17:00 GMT and exclude weekends, when the EBS market's trading platform is effectively inactive. 20,21 The transaction data set records the time stamp to the millisecond of each trade that occurred, along with the transaction price and quantity. Most importantly, the parties providing liquidity (submitting the limit order) and consuming liquidity (submitting the market order 22 ) have identifiers as 'human', 'bank AI' or 'PTC AI'. Thus, each trade can be classified by nine possible combinations of liquidity provider and consumer. In addition, each trade has an indicator of whether the liquidity provider was the buyer or the seller. We line up these millisecond time-stamped transactions with the 100-millisecond quote data, such that for a given transaction, the top 10 anonymised best bid and ask prices at the nearest previous whole 100-millisecond interval are also available. All quotes are firm and, therefore, truly represent the market prices at that instant. 23 Here, the trader type that posts each quote is not available to us, whereas that information is available in the transactions data.

Policy context
The SNB began intervening in the FX market to cap the value of the Swiss franc against the euro on 6 September 2011. In a press release of the same date, the SNB said, 'the massive overvaluation of the Swiss franc poses an acute threat to the Swiss economy and carries the risk of a deflationary development'. Therefore, 'it will no longer tolerate a EUR/CHF exchange rate below the minimum rate of CHF 1.20 . . . and is prepared to buy foreign currency in unlimited quantities' (SNB 2011).
As observable in Figure 2, following the introduction of this policy, the franc generally traded a little below its cap until late 2014, before appreciation pressures intensified towards the end of 2014 due to weakness in the euro-area economy and the safe haven status of the Swiss franc (Ranaldo and Söderlind 2010). In response, the SNB cut its interest rate on sight deposits to minus 0.25%. However, commitment to the exchange rate policy appeared to remain firm. On 18 December 2014, the SNB governor stated that the central bank was 'committed to purchasing unlimited quantities of foreign currency to enforce the minimum exchange rate with the utmost determination' (Jordan 2014). 24 Despite that, the capping policy was discontinued at 9:30 GMT 25 on 15 January 2015. Releasing an unscheduled press communiqué, the SNB explained the following: Recently, divergences between monetary policies of the major currency areas have increased significantly. The euro has depreciated significantly against the US dollar and this, in turn, has caused the Swiss franc to weaken against the US dollar. In these circumstances, the SNB concluded that enforcing and maintaining the minimum exchange rate for the Swiss franc against the euro is no longer justified. (2015) That this news was not generally expected by market participants is reflected in FX options prices leading up to the announcement (e.g., Mirkov et al. 2016;Jermann 2017), 26 the financial reporting after the announcement (e.g., Reuters 2015b; Bloomberg 2015) and the delayed reaction to the announcement described below. 24 Similarly, on 12 January 2015, another member of the SNB Governing Board said, 'we are convinced that the minimum exchange rate must remain the cornerstone of our monetary policy' (Reuters, 2015a). 25 In the rest of the paper, all times refer to GMT. 26 Both Mirkov et al. (2016) and Jermann (2017) find low implied break probabilities, though Hertrich and Zimmermann (2017) suggest a larger break probability, approaching 50%, was priced in.

Trading patterns
Here, we provide an overview of the market reaction to the SNB announcement made on 15 January 2015. In particular, we graphically illustrate the market patterns and key features of algorithmic and human trading around the announcement as a prelude to the more formal analysis in the rest of the paper. We first focus on the announcement time and then on the main intraday periods of the event day.
Panel A of Figure 3 plots the limit order volume to buy ('bid') or sell ('ask') euros for Swiss francs and the mid-price, 27 starting a few minutes before the announcement until the end of the event day. This figure shows that the bid volume before the announcement was constantly very large-that is, more than 450 million euros. Although our data from EBS do not include the identities of the institutions submitting the orders, we presume that this wall of bid orders was erected by a very special human trader, the SNB, to enforce the cap. This is based on the following: (i) the regular presence of the SNB before the announcement, (ii) the large size of the order (which is excessive for many market participants), (iii) the limited prices, which were in line with the SNB's cap and (iv) further issues such as the timing, which we discuss later.
Not by coincidence, the order book data suggest that the wall of bids disappeared at 9:29:45 (see Figure   3), reinforcing the idea that the SNB withdrew its limit orders in preparation for the actual announcement of the cap removal, which occurred at 9:30:00. Being an unscheduled announcement, this media release caught market participants by surprise. This may explain why the exchange rate remained essentially unchanged until 9:30:44, at which point it broke through the cap. We take this delayed response as further evidence that the decision to remove the cap was not expected by market participants. 28 Once it had broken through the cap, it moved rapidly, and both sides of the order book shrank significantly (indeed, on a few occasions during 9:31, the bid side of the market disappeared completely for a few seconds). Figure 3, the post-announcement period on the event day can be divided into three main sub-periods. The first phase spans from the SNB announcement until the re-erection of the bid wall a few seconds after 9:53. This represents the genuine shock phase during which the SNB removed the cap and, as far as we can judge, refrained from intervening in any way. 29 The second post-announcement phase starts with the re-appearance of the wall of bid orders of about 4 billion euros after 9:53. Again, we assume this reflects the return of the SNB, as it seems unlikely that other market participants, whether human or algorithmic traders, would have placed such a large volume of orders. However, it is notable that although the scale of bids was very large, the price of those bids was changed regularly so that very few were actually matched against market orders. Because market participants could see the size of the order book, it is very likely that they inferred that the SNB had stepped in, and so revised their beliefs about its willingness to act as 'the buyer (of euros) of last resort' and market stabiliser. Figure 3 shows the USD/CHF pattern, which has an analogous large volume on the bid side of more than 1 billion US dollars that appeared at about the same time. This phase went on for about one hour, until 10:52. After this point in time, the wall disappeared for a few minutes. Although small, walls intermittently reappeared, suggesting an attempt of the SNB to step back somewhat and let price discovery be conducted by market participants on their own. We consider the sub-period after 10:52 on the event day as the third phase, during which AT and human market participants trade more against each other, perhaps with the belief that the SNB was standing by to intervene when necessary. It shows the prices at which different trader types exchanged euros for Swiss francs in the 23 minutes following the SNB announcement, depending on whether their trades were consuming liquidity (market orders, Panel A) or providing it (limit orders, Panel B). The main message is that agency (bank) AT massively consumed and, to a lesser extent, provided liquidity at extreme prices (prices significantly different to those of the immediately preceding trades) on a number of occasions, notably between 9:31 and 9:36. Thus, over 79% of the cumulative appreciation of the franc in the 23 minutes to 9:53 is attributable to agency AT, which accounted for 55% (40%) of the volume of liquidity-consuming (liquidity-providing) trades. That agency (bank) AT both consumed and provided liquidity at extreme prices may reflect the diverse set of traders, including not only different banks but also various clients from whom these trades originated. Human traders were also very active, as they accommodated many extreme-price trades and guaranteed the largest share of the volume of liquidity-providing trades (51%), which was much larger than that of liquidity-consuming trades (21%). Overall, our graphical overview suggests that after the SNB announcement, agency and proprietary AT contributed to the liquidity dry-up (as they were net consumers of liquidity) and the subsequent price disruption (as they were net purchasers of the appreciating currency). Thus, the preliminary results suggest that computers traded 'with the wind', buying the franc as it appreciated, whereas humans 'leaned against the wind'. In the following sections, we examine these issues in more detail.

Market liquidity
In this section, we investigate in more detail the contributions of computer and human traders to the market liquidity of EUR/CHF and USD/CHF before, during and after the day of the SNB announcement. We first study the quantity-based (volume) dimension and then the price-based (effective spreads) dimension of market liquidity.

Liquidity volumes provided and consumed
First, we identify whether the consumer and the provider of liquidity for each trade was a human, an agency (bank) AT or a proprietary (non-bank) PTC AT. We then record the shares 30 of total trading volumes in three different periods: a 'pre-event' period (5-14 January 2015), the 'event day' (15 January 2015) and a 'post-event' period (16-23 January 2015). Finally, we record the 'net liquidity provision', which is the difference between the share of trades for which a given trader type provided liquidity and the share for which it consumed liquidity. Table 1 reports the main results.
Compared with the pre-event period, the net liquidity provision by computers fell on the event day and in the post-event period, whereas it increased for humans during both periods. The increases in human net liquidity provision were all statistically significant, whereas the decreases for computers were significant for at least one type of AT. In EUR/CHF (Panel A), the net liquidity provision by agency AT significantly declined on the event day, whereas that by proprietary AT significantly declined in the post-event period. In USD/CHF (Panel B), the net liquidity provision by both types of AT significantly declined on the event day, while it was again that of proprietary AT that significantly declined in the post-event period. Economically, the most significant changes were the decline in the share of agency AT liquidity-providing trades on the event day in EUR/CHF and the offsetting increase in the human share. Thus, although agency AT also decreased its share of liquidity-consuming trades on the event day and humans increased their share, this was not enough to change the pattern of net liquidity provision.

Effective spreads
We now turn our focus to a price-based indicator of liquidity. As shown in Section 5.1, computers reduced their net provision of liquidity on the event day and afterwards, but did they widen the bid-ask 30 Details of the total value and number of trades are shown in the Online Appendix. Overall, all types of traders increased their trading activity, and there was about eight times more CHF trading on the event day than there was on any day in the pre-event period. spreads on trades for which liquidity was still available? To investigate this question, we calculate a series of effective spreads, s, for each of the trader types: where t indexes the time of the trade; k indexes the type of trader providing liquidity (human, bank AI or PTC AI); q is a binary variable equal to +1 for trades in which the liquidity consumer was buying the base currency and −1 for trades in which it was selling it; p is the transaction price; and m is the mid-point between the best bid and ask quotes from any type of trader in the 100-millisecond window in which the trade took place.
To mitigate the effects of some extreme observations, Table 2  Taking our quantity-based (order flows) and price-based (effective spreads) indicators of market liquidity together, our findings corroborate the alternative hypothesis-that is, that there is a relative reduction in the activity of AT in extreme situations. More specifically, our results show that both agency and proprietary algorithms significantly reduced their net liquidity provision, and their trading activity created much wider spreads. In contrast, human traders significantly increased their net provision of liquidity and did so at narrower spreads than did computers. 31 We use K-sample tests to investigate equality across periods and Snedecor and Cochran (1989) tests to investigate equality across trader types.

Price efficiency
A second important dimension of market quality, alongside liquidity, is pricing efficiency. In an efficient market, any gaps that might arise between the actual price of an asset and the 'efficient price' reflecting its fundamental value tend to be small. They are closed quickly by traders drawing on the available information about the fundamental value. 32 Although price efficiency is difficult to measure, it is fair to assume that an efficient market environment is characterised by the following properties: (i) little excess volatility in prices on top of that attributable to changes in the fundamental price, (ii) an effective price discovery process and (iii) no or few deviations from arbitrage conditions. In this section, we examine the contributions of different trader types to these dimensions of efficient pricing around the SNB announcement.

Contributions to realised volatility
Following O'Hara and Ye (2011), we calculate the contributions of different trader types to the realised variance of returns in our pre-event, event day and post-event periods as follows: where k indexes the three types of traders (human, agency [bank] AT and proprietary [non-bank] PTC AT); n indexes the return observations, of which there are N in total; r denotes the returns, which are logarithmic returns derived from successive transaction prices; and d is a dummy variable that equals one if the trader initiating the trade (i.e., consuming liquidity) is of a particular trader type and is zero otherwise. So, for example, if prices changed by 2% during a particular period as a result of two trades, one by a computer that moved the price by 1% and another by a human trader that moved the price by a further 1%, then each type of trader would have contributed 50% of the realised variance in that period.
32 As Hendershott and Menkveld (2014) note, the net provision of limit orders need not be a good measure of liquidity supply, because a market order that leans against price pressure (i.e., goes against the prevailing market trend) can be thought of as contributing to liquidity and reducing volatility.
Panel A.1 of Table 3 shows the results of this breakdown applied to EUR/CHF and USD/CHF during the pre-event, event day and post-event periods. The results for EUR/CHF show a remarkable increase in the variance contribution of agency AT on the event day, of more than 90% of the total variance share. The post-event shares returned to the pre-event ones. The results for USD/CHF show a similar pattern.
Of course, the breakdown in Panel A.1 of As price jumps can affect realised volatility, we undertake the same analysis for contributions to realised bipower variation (Barndorff-Nielsen and Shephard 2004), which strips out the impact of price jumps.
Realised bipower variation is defined as follows (for our case, where we are interested in contributions): where and are defined in the equation for (above). Panels B.1 and B.2 of Table 3 show the same qualitative results as those using realised variances, suggesting that our findings are not sensitive to price jumps.
Overall, the analysis of realised volatility shows that agency AT was the main driver of volatility in EUR/CHF on the event day, providing empirical support relevant to policy concerns highlighted in other extreme FX market events (e.g., BIS 2017). 33 We obtain the same qualitative results if we normalise by trade volume rather than by number of trades.

Price discovery
As the second dimension of price efficiency, we now analyse the price discovery process. As any increase in volatility is valuable if it helps market prices to fully reflect available information, it is important to view the results in Section 6.1 in combination with the analysis of the price discovery process.
As a first step, we perform a simple univariate price-impact regression of the order flow disaggregated by market participants in the spirit of Kyle (1985). More specifically, we regress 5-minute returns on the order flow for each type of trader during the same 5-minute periods. Returns are computed as logarithmic returns (on the base currency) between successive mid-points of the best bid and ask quotes in the final 100 milliseconds of each period. Order flow is computed as the difference between liquidityconsuming purchases of the base currency and liquidity-consuming sales of the base currency by each trader type.  Table 3), the order flow originated by agency AT had the largest price impacts on both EUR/CHF and USD/CHF in the post-event period, as well as on USD/CHF on the event day itself. However, it was effectively zero for EUR/CHF on the event day, when agency AT trades generated the most volatility.
We extend the price-discovery analysis using a variant of the vector autoregression (VAR) model developed by Hasbrouck (1991aHasbrouck ( , 1991bHasbrouck ( , 2007 and employed by Hendershott et al. (2011). 34 This approach is based on estimating the contribution of news and different types of trade to the underlying efficient price. Specifically, we estimate the following model: We estimate this model, selecting K = 5 as the optimal number of lags based on AIC criterion, and transform it to a vector moving-average representation by repeatedly substituting for the right-handside terms. 37 The resulting equation for returns is as follows: As suggested by Hendershott et al. (2011), the last three terms on the right-hand side may be considered 'private information', because they reflect order flows from particular trader types, whereas the first term may be considered 'public information'. Thus, we can identify separate contributions to efficient 35 A Dicky-Fuller unit root test on the time series of the regression variables confirms the stationarity of the time series in each subperiod, including covariance stationarity. 36 This is the most logical ordering, but the pattern of results across periods remains similar, even with alternative orderings. 37 We do this with ten lags, after which the marginal effect of each substitution becomes small. pricing from public information and private information pertaining to each of the three types of traders via the following: 38 where ᵚ 2 is the variance of the random-walk component, and the terms on the right-hand side represent contributions to this from public information and private information pertaining to PTC AI, bank AI and human traders, respectively. human traders took over as the most significant contributor, whereas the influence of proprietary AT all but disappeared. Human trading also maintained a significant contribution in the post-event period.
The role of agency AT on the event day and in the post-event period was similar to that of human traders, though not as dramatic, stepping up from the pre-event levels. This was dwarfed by the increased contribution of agency AT to the total realised volatility, as highlighted in the previous section.
The pattern for USD/CHF is somewhat less clear, as the informational role of all types of trading was relatively small, pointing to the leading role of the EUR/CHF in discovering the new value of the Swiss franc.

Arbitrage deviations
Efficient prices should obey arbitrage conditions, such as triangular arbitrage. More specifically, this means that direct quotes for EUR/CHF should not move outside the range defined by implied quotes 38 To be clear, this follows from the assumptions of the model, and not from information in the market data provided by EBS.
derived from USD/CHF and EUR/USD. It is fair to assume that some computer trading in these markets is dedicated to identifying and trading on this triangular arbitrage.
We begin by calculating the frequency and average size of such arbitrage opportunities in the pre-event, event day and post-event periods. Specifically, we examine the best bid and ask quotes in each 100millisecond window and record the existence of an arbitrage opportunity if a profit could have been made by buying EUR/CHF directly and selling 'synthesised' EUR/CHF via USD/CHF and EUR/USD trades. The profits must exceed a minimum of one basis point, and we record the average profitability of all arbitrage opportunities meeting this criterion.
Panel A of Table 6 shows that, by far, the largest and most frequent arbitrage opportunities occurred during the event day itself. Arbitrage opportunities then remained over ten times more frequent in the post-event period compared with the pre-event period. This may suggest that AT had become less active in closing arbitrage deviations during the latter period, possibly in response to the increased volatility or simply a withdrawal from trading following the event. To shed more light on this issue, we follow where Y contains four endogenous variables, which are the frequency of arbitrage opportunities and order flows of each trader type relative to the total market order flows. These variables are measured over 5-minute windows. A is a 4×4 matrix of coefficients governing contemporaneous relationships between the endogenous variables. These were estimated using the approach of Rigobon (2003) and two lags of the endogenous variables. X includes six exogenous variables all computed over the preceding 10 minutes: the total trade volumes and return volatilities for each of the three currency pairs in the arbitrage triangle. Finally, G includes nine time-dummy variables, one for each hour of the trading day.
Panel B of Table 6 shows the estimated contemporaneous coefficients that reflect how the trading activity of each type of trader responds to arbitrage opportunities. The coefficients reveal that in the pre-event period, both AT types reacted in the expected way (i.e., to close arbitrage opportunities). In the post-event period, however, no type of trader responded significantly to arbitrage opportunities.
Thus, our results suggest a significant reduction in computer resources devoted to triangular arbitrage following the Swiss franc event. Also, the fact that no type of trading made a significant contribution to arbitrage suggests that most mispricings were closed by quote adjustment rather than by active trading.
To sum up, our analysis substantiates the idea that in reaction to extreme events, the contribution of AT to support price efficiency decreases; however, the opposite applies to human traders. This may reflect the possibility that after the announcement, many computer trades, especially agency AT, were driven by liquidity needs and risk exposure reductions rather than by information motives. Such patterns would be consistent with our previous findings (i.e., that computers reduce the liquidity supply and are the net consumers of liquidity). Alternatively, central bank interventions might have affected AT and human trading differently. We analyse the role of the central bank in the next section.

SNB intervention
As shown in Section 4.2, the analysis of the limit order book provides hints about the possible central bank interventions. Whether the central bank's presence was perceivable or not is an important issue, because algorithmic and human traders can react differently to it. For instance, in the presence of interventions of a (credible) central bank, human traders may revise their expectations about price reversals, price disruptions and market stability. Being pre-programmed, in contrast, it might be more difficult for algorithmic traders to decipher these issues, especially in unusual market environments. To address this issue, we perform two analyses, starting from a broad perspective and then zooming in on EBS data.

SNB sight deposits and option hedging
In our first analysis, we use publicly available data to estimate the overall intervention volume of the central bank. Using weekly data on SNB sight deposits (which is the key liability created by FX interventions), we estimate that the total SNB intervention was probably less than 16% of Swiss franc turnover on EBS over our full sample (18% of Swiss franc turnover during the 7 days beginning 15 January). 39 As discussed below, we are fairly confident that we can identify SNB limit order intervention on EBS through the techniques used (e.g., the use of a 'wall' of orders and some other, more detailed, characteristics). Based on these figures, we estimate that about a quarter of SNB intervention in the event week was through EBS limit orders. 40 This estimate is consistent with other evidence that suggests SNB favours a diversified approach (Moser 2016), including the substantial use of telephone orders (Fischer 2004), and it is also consistent with anecdotal evidence from market participants.
Our data set does not allow us to trace the impact of the SNB's other forms of intervention (such as telephone orders) on EBS, but some market participants have highlighted the role of telephone intervention in helping dealers hedge their substantial FX options' exposure in EUR/CHF. In order to corroborate this hypothesis, we analysed dealers' option positions using the EMIR trade repository database on option positions. 41 The main idea is that dealer banks supplied protection against Swiss franc appreciation to other market participants (such as Swiss corporates). As a result, dealers entered the event day with a significantly unbalanced (long) exposure in EUR/CHF options, triggering a large delta-hedging requirement after the SNB announcement-an operation commonly undertaken through an agency AT. Focussing on the 10 largest dealer banks (that normally represent around 90% of the dealer market, and so, presumably, the same share of bank AI), the trade repository data confirms that, as of 14 January 2015, they had a strongly unbalanced position. These banks had a net long EUR/CHF option position of 84 billion euros notional, and the ratio of long to short trades was about 1.8 to 1 in notional value terms. Using the data on strike prices, implied volatility and maturity available in this database, we calculate the standard Gamma measures. We find that this net position could have generated a hedging demand of about 4.5 billion euros per 1% move in EUR/CHF; the equivalent figure for USD/CHF was less than half this amount at, 2 billion US dollars. Overall, this evidence supports the views of participants that dealers had substantial option hedging requirements on the event day. If they are correct that much SNB telephone intervention was effectively passed directly to option desks, it is likely that this form of intervention actually reduced agency AT liquidity consumption, because option hedging would usually be carried out though this route.

Event-day results before SNB intervention
In our second analysis, we zoom in on the first intraday sub-period of 23 minutes after the SNB announcement, when it is widely accepted that there was no central bank intervention. This allows us to examine the reaction of AT and human traders to the shock in the absence of central bank intervention. We re-calculate both liquidity provision and realised variance contribution during this phase for EUR/CHF and USD/CHF. The results (see Tables OA.3 and OA.4 in the Online Appendix) are strikingly similar to those of the full event day. For example, for EUR/CHF, humans were significant net liquidity providers (30.5% net liquidity provision) and agency AT was the dominant source (92%) of realised variance. The main difference is that, over this intraday period, the group representing agency AT was the largest net liquidity consumer (−14.6%), a result that is consistent with SNB telephone intervention becoming a source of liquidity to dealer banks, offsetting the need for agency AT later in the day.

Identifying intervention in the EBS order book
To conclude our analysis, we estimate the limit order trades performed by the central bank, then recalculate the liquidity provision and consumption by the three types of trader by excluding these estimated SNB interventions. As noted above, the data set we have is anonymous, so our identification strategy is based on the SNB intervention approach described in Section 4.2 rather than on direct evidence of the trader's identity. More precisely, we consider a trade to be a SNB intervention when the following three conditions apply: First, the outstanding volume on the bid side of the EBS EUR/CHF order book is 20 million euro or more, 42 consistent with the analysis provided in Section 4.2. Second, a human trader is on the passive side (maker). Third, 00 or 50 are the last two digits of the transaction price, consistent with past SNB intervention strategy (Fischer 2004).
Given this identification of SNB limit orders, we repeat the analysis underpinning Table 1 excluding these trades. Table 7 shows the adjusted results for liquidity provision and consumption by computers and humans for EUR/CHF. Overall, the main result remains materially unaffected-that is, a reduction in (net) liquidity provision by computers is observed on the event day and in the post-event period.

Conclusion
The Swiss franc event is one of the largest shocks to financial markets in recent years and the most significant 'black swan' of the FX market since AT became prominent. Using FX data with a precise identification of AT, we study the reaction to this shock of human traders and AT, which can be further divided into two broad categories: agency (bank) AT and proprietary (non-bank) AT. We also study the role of central bank intervention and how it can affect human traders and AT.
We find that computer trading contributed to the decline in the market quality of the currency pairs directly affected on the event day and afterwards. Agency algorithms, which typically offered 42 The daily average bid size during the pre-event period and the event day is 14 million euros.
EUR/CHF liquidity before the shock, reduced their liquidity supply and created uninformative volatility. After the shock, proprietary algorithms subdued the price discovery and (triangular) arbitrage.
In contrast, human traders took over as the main contributors to liquidity provision and efficient pricing.
Of course, it is hard to draw general conclusions from one event, not least because not all market shocks are the same. Indeed, an important aspect of this particular event was the role of central bank intervention. Although we present some evidence that the SNB intervention does not alter our main results on computer trading, the overall effects of central bank interventions on human trading are less clear. The intervention may have encouraged human trading, as human traders possibly anticipated or adapted to it. Certainly, the fact that the SNB intervention tactics seem to have been deliberately designed to make their presence highly visible to market participants suggests that the central bank felt that communicating its involvement to the market was an important channel of intervention impact. As well as highlighting this potential co-ordination role of intervention for human trading, our results call attention to other issues relevant to central banks, such as the importance of monitoring outstanding FX option positions to help assess the likely impact of policy announcements and intervention.
In this paper, we study how AT reacts to a 'black swan' event. Future research should shed light on why it does so. For instance, is the AT reduction to market quality due to more stringent capital, trading requirements applied to AT or an inability to discern non-standard dynamics including central bank interventions? Our work should provide several insights for policymakers, market participants and academics. First, the main consensus in the literature, that AT improves liquidity and price efficiency, may be true in normal times, but it is debateable in extreme circumstances. Second, by comparing algorithmic trades across trading types (agency vs proprietary AT) and currency pairs, our paper supports the idea that AT cannot be viewed as a single object. It includes a diverse set of trading strategies, many of which do not fit the stereotype of computer trading (i.e., HFT arbitrage). 43     This figure illustrates the price, bid volume and ask volume around the SNB announcement from 09:25 GMT to 11:00 GMT on 15 January 2015. Panels A and B refer to EUR/CHF and USD/CHF, respectively. Price is the average mid-point between the top 10 best bid and ask prices at a 1-second window. Bid volume is calculated as the total volume over the 10 best bid quotes in a millisecond window, further summed up at a 1-second window. Ask volume is calculated in the same way. Each data point plotted in the charts represents price, bid volume and ask volume within a given second. The SNB announcement was made at 09:30 GMT; the bid 'wall' first appeared at 09:53 GMT and seemed to disappear from 10:53 GMT.  This figure illustrates the prices and volume by the three types of trader (i.e., human, bank AI and PTC AI) in the 23 minutes following the SNB announcement, depending on whether their trades were consuming liquidity (market orders, Panel A) or providing liquidity (limit orders, Panel B). Each data point plotted in the charts represents a simple average of the trade prices within a given second. Because of averaging, the prices in the top and bottom panels need not be identical.  This figure shows the market reaction on the day of the SNB announcement for EUR/CHF and USD/CHF. Panels A.1 and A.2 show the cumulative net purchase of CHF by the three types of trader (i.e., human, bank AI and PTC AI). Panels B.1 and B.2 show the cumulative net liquidity provision by the three types of trader. 'Liquidity consumer' is defined as a trader who submits a market order. 'Liquidity provider' is defined as a trader who submits a limit order. The net purchase of CHF for a given type of trader is the difference between the purchasing volume (of the base currency) as a liquidity provider and the selling volume (of the base currency) as a liquidity provider. The net liquidity provision for a given type of trader is the difference between the trading volume as a liquidity provider and trading volume as a liquidity consumer. This table presents the daily share of trading volume by the three types of trader (i.e., human, bank AI and PTC AI) for EUR/CHF and USD/CHF in the pre-event period (5-14 January), on the event day (15 January) and in the postevent period (16-23 January). Panels A and B present the results for EUR/CHF and USD/CHF, respectively. The daily share of trading volume for a given type of liquidity provider (i.e., submitting the limit order) is first calculated as its volume over the total market volume on a daily basis and is then averaged out within each period. The daily share of trading volume for a given liquidity consumer (i.e., submitting the market order) is calculated in the same manner. The net liquidity provision for a given type of trader is the difference between the daily share of volume as a liquidity provider and daily share of volume as a liquidity consumer. The lower part of Panels A and B shows the result of the t-test on the hypotheses that the daily share of volume is equal between the event day and the pre-event period, and is equal between the post-and pre-event periods. ***, ** and * denote statistical significance at the 1%, 5% and 10% levels, respectively. 10.2 *** -0.7 -10.8 *** 9.4 *** 13.1 *** -18.5 *** 10.3 *** -8.7 *** -1.7 ** Post-event = pre-event?
3.5 *** 3.7 *** -8.8 *** 3.8 *** 7.4 *** -7.8 *** 2.1 ** 0.1 -2.2 ** Liquidity provider Liquidity consumer Net liquidity provision This table presents the effective spreads of EUR/CHF (Panel A) and USD/CHF (Panel B) by the three types of liquidity provider (i.e., human, bank AI and PTC AI) for EUR/CHF and USD/CHF in the pre-event period (5-14 January), on the event day (15 January) and in the post-event period (16-23 January). The effective spread is first calculated trade by trade and is then averaged out within each trading day. The final daily effective spread presented in this table is the average daily effective spread within each period. We use Ksample tests to investigate equality across periods, and Snedecor and Cochran (1989) tests to investigate equality across trader types. ***, ** and * denote statistical significance at the 1%, 5% and 10% levels, respectively.   This table presents the estimated price-impact coefficients (β) for the three types of liquidity consumer (i.e., human, bank AI and PTC AI) in the pre-event period (5-14 January), on the event day (15 January) and in the post-event period (16-23 January).

= + + ,
where t is at a 5-minute interval; is the type of liquidity consumer; is the logarithmic return (on the base currency) between the successive mid-quote of the best bid and ask quotes in the final 100 milliseconds at the 5-minute window, meaning ln( −1 ⁄ ); and is the order flow for each type of liquidity consumer during the same 5-minute window, calculated as the difference between liquidity-consuming purchases of the base currency and liquidity-consuming sales of the base currency by each trader type. Panels A and B show the estimated coefficients for EUR/CHF and USD/CHF, respectively. ***, ** and * denote statistical significance at the 1%, 5% and 10% levels, respectively.  This table presents the contributions to the variance of efficient price by the three types of liquidity consumer (i.e., human, bank AI and PTC AI) in the pre-event period (5-14 January), on the event day (15 January) and in the post-event period (16-23 January). A number of the most extreme returns on the event day were excluded to avoid allowing them to drive the results. The returns and order flow are defined in Table 4. The procedure of estimating the contributions to variance of efficient price by the three trader types is described in Section 6.2. Panels A and B show the contributions for EUR/CHF and USD/CHF, respectively.  In this table, Panel A presents the average frequency and size of the arbitrage opportunities between EUR/CHF, USD/CHF and EUR/USD at a 1-minute window in the pre-event period (5-14 January), on the event day (15 January) and in the post-event period (16-23 January). An arbitrage opportunity is recorded if the combination of best bid and ask quotes across the three currency pairs in a 100-millisecond window offers a profit in excess of one basis point. Frequency is calculated as the number of arbitrage opportunities over the number of 100milliseconds in 1 minute (i.e., 600) and is further averaged out within the pre-event period, the event day and the post-event period. Profitability is the average profitability of arbitrage opportunities where they exist and is further averaged out within each period. Panel B presents the estimated contemporary coefficients of order flow by each trader type on the frequency of arbitrage opportunities over a 5-minute window in the pre-and post-event periods. The associated SVAR model and its estimation are described in Section 6.3. ***, ** and * denote statistical significance at the 1%, 5% and 10% levels, respectively.