«Rock around the Clock: An Agent-Based Model of Low- and High-Frequency Trading Sandrine Jacob Leal, Mauro Napoletano, Andrea Roventini, Giorgio ...»
Working Paper Series
Department of Economics
University of Verona
Rock around the Clock: An Agent-Based Model of Low- and
Sandrine Jacob Leal, Mauro Napoletano, Andrea Roventini, Giorgio Fagiolo
WP Number: 2 February 2014
ISSN: 2036-2919 (paper), 2036-4679 (online)
Rock around the Clock: An Agent-Based Model of Lowand High-Frequency Trading
Sandrine Jacob Leal∗ Mauro Napoletano† Andrea Roventini‡ Giorgio Fagiolo§ January 31, 2014 Abstract We build an agent-based model to study how the interplay between low- and highfrequency trading aﬀects asset price dynamics. Our main goal is to investigate whether high-frequency trading exacerbates market volatility and generates ﬂash crashes. In the model, low-frequency agents adopt trading rules based on chronological time and can switch between fundamentalist and chartist strategies. On the contrary, high-frequency traders activation is event-driven and depends on price ﬂuctuations. High-frequency traders use directional strategies to exploit market information produced by low-frequency traders. Monte-Carlo simulations reveal that the model replicates the main stylized facts of ﬁnancial markets. Furthermore, we ﬁnd that the presence of high-frequency trading increases market volatility and plays a fundamental role in the generation of ﬂash crashes. The emergence of ﬂash crashes is explained by two salient characteristics of high-frequency traders, i.e., their ability to i) generate high bid-ask spreads and ii) synchronize on the sell side of the limit order book. Finally, we ﬁnd that higher rates of order cancellation by high-frequency traders increase the incidence of ﬂash crashes but reduce their duration.
Keywords: Agent-based models, Limit order book, High-frequency trading, Lowfrequency trading, Flash crashes, Market volatility JEL codes: G12, G01, C63 ∗ Corresponding author. CEREFIGE - ICN Business School (Nancy-Metz) France - GREDEG. Address: ICN Business School (Nancy-Metz) 13, rue Michel Ney, 54000 Nancy (France). Tel:+33 383173776.
Fax:+33 383173080. E-mail address: firstname.lastname@example.org † OFCE, Skema Business School, Sophia-Antipolis (France), and Scuola Superiore Sant’Anna, Pisa (Italy). E-mail address: email@example.com ‡ Universit` di Verona (Italy); Scuola Superiore Sant’Anna, Pisa (Italy), and OFCE, Sophia-Antipolis a (France). E-mail address: firstname.lastname@example.org § Scuola Superiore Sant’Anna, Pisa (Italy). E-mail address: email@example.com 1 Introduction This paper builds an agent-based model to study how high-frequency trading aﬀects asset price volatility as well as the occurrence and the duration of ﬂash crashes in ﬁnancial markets.
The increased frequency and severity of ﬂash crashes and the high volatility of prices observed in ﬁnancial time series have recently been associated to the rising importance of high-frequency trading (see, e.g., Sornette and Von der Becke, 2011, and further references therein). However, the debate in the literature about the beneﬁts and costs of high frequency trading (HFT henceforth) has not been settled yet. On the one hand, some works stress that high-frequency traders may play the role of modern market-makers, providing an almost continuous ﬂow of liquidity (Menkveld, 2013). Moreover, HFT reduces transaction costs and favors price discovery and market eﬃciency by strengthening the links between diﬀerent markets (Brogaard, 2010). On the other hand, many empirical and theoretical studies raise concerns about the threatening eﬀects of HFT on the dynamics of ﬁnancial markets. In particular, HFT may lead to more frequent periods of illiquidity, possibly leading to the emergence of ﬂash crashes (Kirilenko et al, 2011).
Furthermore, HFT may exacerbate market volatility (Zhang, 2010; Hanson, 2011) and negatively aﬀect market eﬃciency (Wah and Wellman, 2013).
This work contributes to the current debate on the impact of HFT on asset price dynamics by developing an agent-based model of a limit-order book (LOB) market1 wherein heterogeneous high-frequency (HF) traders interact with low-frequency (LF) ones. Our main goal is to study whether HFT helps to explain the emergence of ﬂash crashes and more generally periods of higher volatility in ﬁnancial markets. Moreover, we want to shed some light on which distinct features of HFT are relevant in the generation of ﬂash crashes and aﬀect the process of price-recovery after a crash.
In the model, LF traders can switch between fundamentalist and chartist strategies according to their proﬁtability. HF traders adopt directional strategies that exploit the price and volume-size information produced by LF traders (cf. SEC, 2010; Aloud et al, 2011). Moreover, in line with empirical evidence on HFT (see e.g., Easley et al, 2012), LF trading strategies are based on chronological time, whereas those of HF traders are framed in event time.2 Consequently, LF agents, who trade at exogenous and constant See, for instance, Farmer et al (2005) and Slanina (2008) for detailed studies of the eﬀect of limitorder book models on market dynamics.
As noted by Easley et al (2012), HFT requires the adoption of algorithmic trading implemented through computers which natively operate on internal event-based clocks. Hence, the study of HFT cannot be reduced to its higher speed only, but it should take into account also the associated new frequency, co-evolve with HF agents, whose participation in the market is endogenously triggered by price ﬂuctuations. Finally, consistent with empirical evidence (see Kirilenko et al, 2011), HF traders face limits in the accumulation of open positions.
So far, the few existing agent-based models dealing with HFT have mainly treated HF as zero-intelligence agents with an exogenously-given trading frequency (e.g., Bartolozzi, 2010; Hanson, 2011). However, only few attempts have been made to account for the interplay between HF and LF traders (see, for instance, Paddrik et al, 2011; Aloud et al, 2013; Wah and Wellman, 2013). We improve upon this literature along several dimensions. First, we depart from the zero-intelligent framework by considering HF traders who hold event-based trading-activation rules, and place orders according to observed market volumes, constantly exploiting the information provided by LF traders.
Second, we explicitly account for the interplay among many HF and LF traders. Finally, we perform a deeper investigation of the characteristics of HFT that generate price downturns, and of the factors explaining the fast price-recovery one typically observes after ﬂash crashes.
We study the model in two diﬀerent scenarios. In the ﬁrst scenario (“only-LFT” case), only LF agents trade with each other. In the second scenario (our baseline), both LF and HF traders co-exist in the market. The comparison of the simulation results generated from these two scenarios allows us to assess the contribution of highfrequency trading to ﬁnancial market volatility and to the emergence of ﬂash crashes.
In addition, we perform extensive Monte-Carlo experiments wherein we vary the rate of HF traders’ order cancellation in order to study its impact on asset price dynamics.
Monte-Carlo simulations reveal that the model replicates the main stylized facts of ﬁnancial markets (i.e., zero autocorrelation of returns, volatility clustering, fat-tailed returns distribution) in both scenarios. However, we observe ﬂash crashes together with high price volatility only when HF agents are present in the market. Moreover, we ﬁnd that the emergence of ﬂash crashes is explained by two salient characteristics of HFT, namely the ability of HF traders (i) to grasp market liquidity leading to high bid-ask spreads in the LOB; (ii) to synchronize on the sell-side of the limit order book, triggered by their event-based strategies. Furthermore, we observe that sharp drops in prices coincide with the contemporaneous concentration of LF traders’ orders on the buy-side of the book. In addition, we ﬁnd that the fast recoveries observed after price crashes result from both a more equal distribution of HF agents on both sides of the book and a lower persistence of HF agents’ orders in the LOB. Finally, we show that HF agents’ order cancellations have an ambiguous eﬀect on price ﬂuctuations. On the one hand, trading paradigm. See also Aloud et al (2013) for a modeling attempt in the same direction.
high rates of order cancellation imply higher volatility and more frequent ﬂash crashes.
On the other hand, they also lead to faster price-recoveries, which reduce the duration of ﬂash crashes.
Overall, our results validate the hypothesis that HFT exacerbates asset price volatility, generates ﬂash crashes and periods of market illiquidity (as measured by large bidask spreads). At the same time, consistent with the recent academic and public debates about HFT, our ﬁndings highlight the complex eﬀects of HF traders’ order cancellation on price dynamics.3 The rest of the paper is organized as follows. Section 2 describes the model. In Section 3, we present and discuss the simulation results. Finally, Section 4 concludes.
2 The Model We model a stock market populated by heterogeneous, boundedly-rational traders.
Agents trade an asset for T periods and transactions are executed through a limit-order book (LOB) where the type, the size and the price of all agents’ orders are stored.4 Agents are classiﬁed in two groups according to their trading frequency, i.e., the average amount of time elapsed between two order placements. More speciﬁcally, the market is populated by NL low-frequency (LF) and NH high-frequency (HF) traders (N = NL + NH ). Note that, even if the number of agents in the two groups is kept ﬁxed over the simulations, the proportion of low- and high-frequency traders changes over time as some agents may not be active in each trading session. Moreover, agents in the two groups are diﬀerent not only in terms of trading frequencies, but also in terms of strategies and activation rules. A detailed description of the behavior of LF and HF traders is provided in Sections 2.2 and 2.3. We ﬁrst present the timeline of events of a representative trading session (cf. Section 2.1).
2.1 The Timeline of Events At the beginning of each trading session t, active LF and HF agents know the past closing price as well as the past and current fundamental values According to the foregoing See Hasbrouck and Saar (2009) for an empirical investigation of the importance of order cancellation in current ﬁnancial markets and of its determinants. See, among others, the articles in Economist (2012);
Brundsen (2012); Patterson and Ackerman (2012) for the importance of HFT order cancellation in the public debate.
See Maslov (2000); Zovko and Farmer (2002); Farmer et al (2005); Avellaneda and Stoikov (2008);
Pellizzari and Westerhoﬀ (2009); Bartolozzi (2010); Cvitanic and Kirilenko (2010). For a detailed study of the statistical properties of the limit order book cf. Bouchaud et al (2002); Luckock (2003); Smith et al (2003).
information set, in each session t, trading proceeds as follows:
1. Active LF traders submit their buy/sell orders to the LOB market, specifying their size and limit price.
2. Knowing the orders of LF traders, active HF agents start trading sequentially and submit their buy/sell orders. The size and the price of their orders are also listed in the LOB.
3. LF and HF agents’ orders are matched and executed5 according to their price and then arrival time. Unexecuted orders rest in the LOB for the next trading session.
5. Given Pt, all agents compute their proﬁts and LF agents update their strategy for the next trading session (see Section 2.2 below).
2.2 Low-Frequency Traders In the market, there are i = 1,..., NL low-frequency agents who take short or long positions on the traded asset. The trading frequency of LF agents is based on chronological time, i.e. it is exogenous and constant over time. In particular, LF agents’ trading speed is drawn from a truncated exponential distribution with mean θ and bounded between θmin and θmax minutes.
In line with most heterogeneous-agent models of ﬁnancial markets, LF agents determine the quantities bought or sold (i.e., their orders) according to either a fundamentalist ¯ or a chartist (trend-following) strategy.6 More precisely, given the last closing price Pt−1, c
orders under the chartist strategy (Di,t ) are determined as follows:
with i.i.d. yt ∼ N (0, σ y ) and a constant term δ 0. After γ L periods, unexecuted orders expire, i.e. they are automatically withdrawn from the LOB. Finally, the limit-order
price of each LF trader is determined by:
2.3 High-Frequency Traders As mentioned above, the market is also populated by j = 1,..., NH high-frequency agents who buy and sell the asset.7 HF agents diﬀer from LF ones not only in terms of trade speed, but also in terms of activation and trading rules. In particular, contrary to LF strategies, which are based on chronological time, the algorithmic trading underlying the implementation of HFT naturally leads HF agents to adopt trading rules framed in event time (see e.g., Easley We assume that NH NL. The proportion of HF agents vis-`-vis LF ones is in line with empirical a evidence (Kirilenko et al, 2011; Paddrik et al, 2011).
et al, 2012).8 More precisely, we assume that the activation of HF agents depends on the extent of price ﬂuctuations observed in the market. As a consequence, HF agents’ trading speed is endogenous. Each HF trader has a ﬁxed price threshold ∆xj, drawn from a uniform distribution with support bounded between ηmin and ηmax. This determines
whether she will participate or not in the trading session t:9
Active HF agents submit buy or sell limit orders with equal probability p = 0.5 (Maslov, 2000; Farmer et al, 2005).
Furthermore, HF traders adopt directional strategies that try to proﬁt from the anticipation of price movements (see SEC, 2010; Aloud et al, 2011). To do this, HF agents exploit the price and order information released by LF agents.