There is a pervasive assumption that low latency access to an exchange is a key factor in the profitability of many high-frequency trading strategies. This belief is evidenced by the "arms race" undertaken by certain financial firms to co-locate with exchange servers. To the best of our knowledge, our study is the first to validate and quantify this assumption in a continuous double auction market with a single exchange similar to the New York Stock Exchange. It is not feasible to conduct this exploration with historical data in which trader identity and location are not reported. Accordingly, we investigate the relationship between latency of access to order book information and profitability of trading strategies exploiting that information with an agent-based interactive discrete event simulation in which thousands of agents pursue archetypal trading strategies. We introduce experimental traders pursuing a low-latency order book imbalance (OBI) strategy in a controlled manner across thousands of simulated trading days, and analyze OBI trader profit while varying distance (latency) from the exchange. Our experiments support that latency is inversely related to profit for the OBI traders, but more interestingly show that latency rank, rather than absolute magnitude, is the key factor in allocating returns among agents pursuing a similar strategy.
We empirically study the trading activity in the electronic on-book segment and in the dealership off-book segment of the London Stock Exchange, investigating separately the trading of active market members and of other market participants which are non-members. We find that (i) the volume distribution of off-book transactions has a significantly fatter tail than the one of on-book transactions, (ii) groups of members and non-members can be classified in categories according to their trading profile (iii) there is a strong anticorrelation between the daily inventory variation of a market membe…
Informed traders need to trade fast in order to profit from their private information before it becomes public. Fast electronic markets provide such liquidity. Slow markets provide execution in an auction based trading floor. Hybrid markets combine both execution venues. In its main result, the paper shows that to compensate for their slow and risky executions, trading floors need to be at least twice as deep as the sweeping facility. Furthermore, when a stand-alone trading floor is enhanced with the addition of a sweeping facility, overall informed trading will decline because it is easier fo…
In this paper, we employ the Heston stochastic volatility model to describe the stock's volatility and apply the model to derive and analyze the optimal trading strategies for dealers in a security market. We also extend our study to option market making for options written on stocks in the presence of stochastic volatility. Mathematically, the problem is formulated as a stochastic optimal control problem and the controlled state process is the dealer's mark-to-market wealth. Dealers in the security market can optimally determine their ask and bid quotes on the underlying stocks or options con…
We examine the dynamics of the bid and ask queues of a limit order book and their relationship with the intensity of trade arrivals. In particular, we study the probability of price movements and trade arrivals as a function of the quote imbalance at the top of the limit order book. We propose a stochastic model in an attempt to capture the joint dynamics of the top of the book queues and the trading process, and describe a semi-analytic approach to calculate the relative probability of market events. We calibrate the model using historical market data and discuss the quality of fit and practi…
In this paper, we build on the analysis of Muni Toke and Yoshida (2020) and conduct several empirical studies using high-frequency financial data. Muni Toke and Yoshida (2020) showed the consistency and asymptotic behavior of the Cox-type model estimators for relative intensities of orders in the limit order book, and then by using high-frequency trading data for 36 stocks traded on the Paris Stock Exchange, they carry out model selection and trading sign prediction. In this study, we add new covariates and carry out model selection and trading sign prediction using high-frequency trading data…
We analyze a tractable model of a limit order book on short time scales, where the dynamics are driven by stochastic fluctuations between supply and demand. We establish the existence of a limiting distribution for the highest bid, and for the lowest ask, where the limiting distributions are confined between two thresholds. We make extensive use of fluid limits in order to establish recurrence properties of the model. We use the model to analyze various high-frequency trading strategies, and comment on the Nash equilibria that emerge between high-frequency traders when a market in continuous t…
We investigate whether the bid/ask queue imbalance in a limit order book (LOB) provides significant predictive power for the direction of the next mid-price movement. We consider this question both in the context of a simple binary classifier, which seeks to predict the direction of the next mid-price movement, and a probabilistic classifier, which seeks to predict the probability that the next mid-price movement will be upwards. To implement these classifiers, we fit logistic regressions between the queue imbalance and the direction of the subsequent mid-price movement for each of 10 liquid s…
We present a class of macroscopic models of the Limit Order Book to simulate the aggregate behaviour of market makers in response to trading flows. The resulting models are solved numerically and asymptotically, and a class of similarity solutions linked to order book formation and recovery is explored. The main result is that order book recovery from aggressive liquidity taking follows a simple $t^{1/3}$ scaling law.
We propose a static equilibrium model for limit order book where profit-maximizing investors receive an information signal regarding the liquidation value of the asset and execute via a competitive dealer with random initial inventory, who trades against a competitive limit order book populated by liquidity suppliers. We show that an equilibrium exists for bounded signal distributions, obtain closed form solutions for Bernoulli-type signals and propose a straightforward iterative algorithm to compute the equilibrium order book for the general case. We obtain the exact analytic asymptotics for …
We consider a limit order book, where buyers and sellers register to trade a security at specific prices. The largest price buyers on the book are willing to offer is called the market bid price, and the smallest price sellers on the book are willing to accept is called the market ask price. Market ask price is always greater than market bid price, and these prices move upwards and downwards due to new arrivals, market trades, and cancellations. We model these two price processes as "bouncing geometric Brownian motions (GBMs)", which are defined as exponentials of two mutually reflected Browni…
Optimal order execution is widely studied by industry practitioners and academic researchers because it determines the profitability of investment decisions and high-level trading strategies, particularly those involving large volumes of orders. However, complex and unknown market dynamics pose significant challenges for the development and validation of optimal execution strategies. In this paper, we propose a model-free approach by training Reinforcement Learning (RL) agents in a realistic market simulation environment with multiple agents. First, we configure a multi-agent historical order …
Understanding the emergence of universal features such as the stylized facts in markets is a long-standing challenge that has drawn much attention from economists and physicists. Most existing models, such as stochastic volatility models, focus mainly on price changes, neglecting the complex trading dynamics. Recently, there are increasing studies on order books, thanks to the availability of large-scale trading datasets, aiming to understand the underlying mechanisms governing the market dynamics. In this paper, we collect order-book datasets of Bitcoin platforms across three countries over m…
This paper studies four trading algorithms of a professional trader at a multilateral trading facility, observing a realistic two-sided limit order book whose dynamics are driven by the order book events. The identity of the trader can be either internalizing or regular, either a hedge fund or a brokery agency. The speed and cost of trading can be balanced by properly choosing active strategies on the displayed orders in the book and passive strategies on the hidden orders within the spread. We shall show that the price switching algorithms provide lower and upper bounds of the mixed trading a…
University of Liverpool(利物浦大学);King’s College London(伦敦国王学院);University of Warwick(华威大学)
Within the mathematical finance literature there is a rich catalogue of mathematical models for studying algorithmic trading problems -- such as market-making and optimal execution -- in limit order books. This paper introduces \mbtgym, a Python module that provides a suite of gym environments for training reinforcement learning (RL) agents to solve such model-based trading problems. The module is set up in an extensible way to allow the combination of different aspects of different models. It supports highly efficient implementations of vectorized environments to allow faster training of RL a…
We present an agent based model of a single asset financial market that is capable of replicating several non-trivial statistical properties observed in real financial markets, generically referred to as stylized facts. While previous models reported in the literature are also capable of replicating some of these statistical properties, in general, they tend to oversimplify either the trading mechanisms or the behavior of the agents. In our model, we strived to capture the most important characteristics of both aspects to create agents that employ strategies inspired on those used in real mark…
We propose a microstructural modeling framework for studying optimal market making policies in a FIFO (first in first out) limit order book (LOB). In this context, the limit orders, market orders, and cancel orders arrivals in the LOB are modeled as Cox point processes with intensities that only depend on the state of the LOB. These are high-dimensional models which are realistic from a micro-structure point of view and have been recently developed in the literature. In this context, we consider a market maker who stands ready to buy and sell stock on a regular and continuous basis at a public…
In this paper we develop a model of an order-driven market where traders set bids and asks and post market or limit orders according to exogenously fixed rules. Agents are assumed to have three components to the expectation of future asset returns, namely-fundamentalist, chartist and noise trader. Furthermore agents differ in the characteristics describing these components, such as time horizon, risk aversion and the weights given to the various components. The model developed here extends a great deal of earlier literature in that the order submissions of agents are determined by utility maxi…
We develop a new market-making model, from the ground up, which is tailored towards high-frequency trading under a limit order book (LOB), based on the well-known classification of order types in market microstructure. Our flexible framework allows arbitrary order volume, price jump, and bid-ask spread distributions as well as the use of market orders. It also honors the consistency of price movements upon arrivals of different order types. For example, it is apparent that prices should never go down on buy market orders. In addition, it respects the price-time priority of LOB. In contrast to …
We investigate the behavior of limit order books on the meso-scale motivated by order execution scheduling algorithms. To do so we carry out empirical analysis of the order flows from market and limit order submissions, aggregated from tick-by-tick data via volume-based bucketing, as well as various LOB depth and shape metrics. We document a nonlinear relationship between trade imbalance and price change, which however can be converted into a linear link by considering a weighted average of market and limit order flows. We also document a hockey-stick dependence between trade imbalance and one…
This work's purpose is to understand the dynamics of limit order books in order-driven markets. We try to illustrate a dynamical trading mechanism attached to the microstructure of limit order markets. We capture the iterative nature of trading processes, which is critical in the dynamics of bid-ask pairs and the switching laws between different traders' types and their orders. In general, after introducing the atomic trading scheme, we study a general iterated trading process in both combinatorial and stochastic ways, and state a few results on the stability of a dynamical trading system. We …
Market making is one of the most important aspects of algorithmic trading, and it has been studied quite extensively from a theoretical point of view. The practical implementation of so-called "optimal strategies" however suffers from the failure of most order book models to faithfully reproduce the behaviour of real market participants. This paper is twofold. First, some important statistical properties of order driven markets are identified, advocating against the use of purely Markovian order book models. Then, market making strategies are designed and their performances are compared, based…
We study the multi-level order-flow imbalance (MLOFI), which is a vector quantity that measures the net flow of buy and sell orders at different price levels in a limit order book (LOB). Using a recent, high-quality data set for 6 liquid stocks on Nasdaq, we fit a simple, linear relationship between MLOFI and the contemporaneous change in mid-price. For all 6 stocks that we study, we find that the out-of-sample goodness-of-fit of the relationship improves with each additional price level that we include in the MLOFI vector. Our results underline how order-flow activity deep into the LOB can in…
We model the behavior of three agent classes acting dynamically in a limit order book of a financial asset. Namely, we consider market makers (MM), high-frequency trading (HFT) firms, and institutional brokers (IB). Given a prior dynamic of the order book, similar to the one considered in the Queue-Reactive models [14, 20, 21], the MM and the HFT define their trading strategy by optimizing the expected utility of terminal wealth, while the IB has a prescheduled task to sell or buy many shares of the considered asset. We derive the variational partial differential equations that characterize th…
We consider an agent who needs to buy (or sell) a relatively small amount of asset over some fixed short time interval. We work at the highest frequency meaning that we wish to find the optimal tactic to execute our quantity using limit orders, market orders and cancellations. To solve the agent's control problem, we build an order book model and optimize an expected utility function based on our price impact. We derive the equations satisfied by the optimal strategy and solve them numerically. Moreover, we show that our optimal tactic enables us to outperform significantly naive execution str…
Motivated by the literature on investment flows and optimal trading, we examine intraday predictability in the cross-section of stock returns. We find a striking pattern of return continuation at half-hour intervals that are exact multiples of a trading day, and this effect lasts for at least 40 trading days. Volume, order imbalance, volatility, and bid-ask spreads exhibit similar patterns, but do not explain the return patterns. We also show that short-term return reversal is driven by temporary liquidity imbalances lasting less than an hour and bid-ask bounce. Timing trades can reduce execut…
We present results demonstrating that an appropriately configured deep learning neural network (DLNN) can automatically learn to be a high-performing algorithmic trading system, operating purely from training-data inputs generated by passive observation of an existing successful trader T. That is, we can point our black-box DLNN system at trader T and successfully have it learn from T's trading activity, such that it trades at least as well as T. Our system, called DeepTrader, takes inputs derived from Level-2 market data, i.e. the market's Limit Order Book (LOB) or Ladder for a tradeable asse…
A quasi-centralized limit order book (QCLOB) is a limit order book (LOB) in which financial institutions can only access the trading opportunities offered by counterparties with whom they possess sufficient bilateral credit. We perform an empirical analysis of a recent, high-quality data set from a large electronic trading platform that utilizes QCLOBs to facilitate trade. We find many significant differences between our results and those widely reported for other LOBs. We also uncover a remarkable empirical universality: although the distributions describing order flow and market state vary c…
High Frequency Trading (HFT) represents an ever growing proportion of all financial transactions as most markets have now switched to electronic order book systems. The main goal of the paper is to propose continuous time equations which generalize the self-financing relationships of frictionless markets to electronic markets with limit order books. We use NASDAQ ITCH data to identify significant empirical features such as price impact and recovery, rough paths of inventories and vanishing bid-ask spreads. Starting from these features, we identify microscopic identities holding on the trade cl…
An agent-based model for financial markets has to incorporate two aspects: decision making and price formation. We introduce a simple decision model and consider its implications in two different pricing schemes. First, we study its parameter dependence within a supply-demand balance setting. We find realistic behavior in a wide parameter range. Second, we embed our decision model in an order book setting. Here we observe interesting features which are not present in the equilibrium pricing scheme. In particular, we find a nontrivial behavior of the order book volumes which reminds of a trend …
The imbalance of buying and selling functions profoundly in the formation of market trends, however, a fine-granularity investigation of the imbalance is still missing. This paper investigates a unique transaction dataset that enables us to inspect the imbalance of buying and selling on the man-times level at high frequency, what we call 'trading polarity', for a large cross-section of stocks from Shenzhen Stock Exchange. The trading polarity measures the market sentiment toward stocks from a view of very essence of trading desire. When using the polarity to examine market crash, we find that …
We study the price impact of order book events - limit orders, market orders and cancelations - using the NYSE TAQ data for 50 U.S. stocks. We show that, over short time intervals, price changes are mainly driven by the order flow imbalance, defined as the imbalance between supply and demand at the best bid and ask prices. Our study reveals a linear relation between order flow imbalance and price changes, with a slope inversely proportional to the market depth. These results are shown to be robust to seasonality effects, and stable across time scales and across stocks. We argue that this linea…
This paper describes the design, implementation, and successful use of the Bristol Stock Exchange (BSE), a novel minimal simulation of a centralised financial market, based on a Limit Order Book (LOB) such as is common in major stock exchanges. Construction of BSE was motivated by the fact that most of the world's major financial markets have automated, with trading activity that previously was the responsibility of human traders now being performed by high-speed autonomous automated trading systems. Research aimed at understanding the dynamics of this new style of financial market is hampered…
Order positions are key variables in algorithmic trading. This paper studies the limiting behavior of order positions and related queues in a limit order book. In addition to the fluid and diffusion limits for the processes, fluctuations of order positions and related queues around their fluid limits are analyzed. As a corollary, explicit analytical expressions for various quantities of interests in a limit order book are derived.
We present a simple order book mechanism that regulates an artificial financial market with self-organized criticality dynamics and fat tails of returns distribution. The model shows the role played by individual imitation in determining trading decisions, while fruitfully replicates typical aggregate market behavior as the "self-fulfilling prophecy". We also address the role of random traders as a possible decentralized solution to dampen market fluctuations.
Financial markets populated by human traders often exhibit "market impact", where the traders' quote-prices move in the direction of anticipated change, before any transaction has taken place, as an immediate reaction to the arrival of a large (i.e., "block") buy or sell order in the market: e.g., traders in the market know that a block buy order will push the price up, and so they immediately adjust their quote-prices upwards. Most major financial markets now involve many "robot traders", autonomous adaptive software agents, rather than humans. This paper explores how to give such trader-agen…
Recent technological developments have changed the fundamental ways stock markets function, bringing regulatory instances to assess the benefits of these developments. In parallel, the ongoing machine learning revolution and its multiple applications to trading can now be used to design a next generation of financial models, and thereby explore the systemic complexity of financial stock markets in new ways. We here follow on a previous groundwork, where we designed and calibrated a novel agent-based model stock market simulator, where each agent autonomously learns to trade by reinforcement le…
We build an agent-based model to study how the interplay between low- and high-frequency trading affects asset price dynamics. Our main goal is to investigate whether high-frequency trading exacerbates market volatility and generates flash 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 fluctuations. High-frequency traders use directional strategies to exploit market information produced by low-frequen…
One popular approach to model the limit order books dynamics of the best bid and ask at level-1 is to use the reduced-form diffusion approximations. It is well known that the biggest contributing factor to the price movement is the imbalance of the best bid and ask. We investigate the data of the level-1 limit order books of a basket of stocks and study the numerical evidence of drift, correlation, volatility and their dependence on the imbalance. Based on the numerical discoveries, we develop a nonparametric discrete model for the dynamics of the best bid and ask, which can be approximated by…
The distribution of returns in financial time series exhibits heavy tails. In empirical studies, it has been found that gaps between the orders in the order book lead to large price shifts and thereby to these heavy tails. We set up an agent based model to study this issue and, in particular, how the gaps in the order book emerge. The trading mechanism in our model is based on a double-auction order book, which is used on nearly all stock exchanges. In situations where the order book is densely occupied with limit orders we do not observe fat-tailed distributions. As soon as less liquidity is …
Recurrent neural networks (RNNs) are types of artificial neural networks (ANNs) that are well suited to forecasting and sequence classification. They have been applied extensively to forecasting univariate financial time series, however their application to high frequency trading has not been previously considered. This paper solves a sequence classification problem in which a short sequence of observations of limit order book depths and market orders is used to predict a next event price-flip. The capability to adjust quotes according to this prediction reduces the likelihood of adverse price…
A great deal of academic and theoretical work has been dedicated to optimal liquidation of large orders these last twenty years. The optimal split of an order through time (`optimal trade scheduling') and space (`smart order routing') is of high interest \rred{to} practitioners because of the increasing complexity of the market micro structure because of the evolution recently of regulations and liquidity worldwide. This paper translates into quantitative terms these regulatory issues and, more broadly, current market design. It relates the recent advances in optimal trading, order-book simula…
We show that wealth processes in the block-shaped order book model of Obizhaeva/Wang converge to their counterparts in the reduced-form model proposed by Almgren/Chriss, as the resilience of the order book tends to infinity. As an application of this limit theorem, we explain how to reduce portfolio choice in highly-resilient Obizhaeva/Wang models to the corresponding problem in an Almgren/Chriss setup with small quadratic trading costs.
Machine learning (especially reinforcement learning) methods for trading are increasingly reliant on simulation for agent training and testing. Furthermore, simulation is important for validation of hand-coded trading strategies and for testing hypotheses about market structure. A challenge, however, concerns the robustness of policies validated in simulation because the simulations lack fidelity. In fact, researchers have shown that many market simulation approaches fail to reproduce statistics and stylized facts seen in real markets. As a step towards addressing this we surveyed the literatu…