We present a reproducible research framework for market microstructure combining a deterministic C++ limit order book (LOB) simulator with stochastic order flow generated by multivariate marked Hawkes processes. The paper derives full stability and ergodicity proofs for both linear and nonlinear Hawkes models, implements time-rescaling and goodness-of-fit diagnostics, and calibrates exponential and power-law kernels on Binance BTCUSDT and LOBSTER AAPL datasets. Empirical results highlight the nearly-unstable subcritical regime as essential for reproducing realistic clustering in order flow. All code, datasets, and configuration files are publicly available at https://github.com/sohaibelkarmi/High-Frequency-Trading-Simulator
Hawkes processes have seen a number of applications in finance, due to their ability to capture event clustering behaviour typically observed in financial systems. Given a calibrated Hawkes process, of concern is the statistical fit to empirical data, particularly for the accurate quantification of self- and mutual-excitation effects. We investigate the application of a multivariate Hawkes process with a sum-of-exponentials kernel and piecewise-linear exogeneity factors, fitted to liquidity demand and replenishment events extracted from limit order book data. We consider one-, two- and three-e…
In this paper, we study various new Hawkes processes. Specifically, we construct general compound Hawkes processes and investigate their properties in limit order books. With regards to these general compound Hawkes processes, we prove a Law of Large Numbers (LLN) and a Functional Central Limit Theorems (FCLT) for several specific variations. We apply several of these FCLTs to limit order books to study the link between price volatility and order flow, where the volatility in mid-price changes is expressed in terms of parameters describing the arrival rates and mid-price process.
This article presents a Hawkes process model with Markovian baseline intensities for high-frequency order book data modeling. We classify intraday order book trading events into a range of categories based on their order types and the price changes after their arrivals. To capture the stimulating effects between multiple types of order book events, we use the multivariate Hawkes process to model the self- and mutually-exciting event arrivals. We also integrate a Markovian baseline intensity into the event arrival dynamic, by including the impacts of order book liquidity state and time factor t…
In this work we introduce two variants of multivariate Hawkes models with an explicit dependency on various queue sizes aimed at modeling the stochastic time evolution of a limit order book. The models we propose thus integrate the influence of both the current book state and the past order flow. The first variant considers the flow of order arrivals at a specific price level as independent from the other one and describes this flow by adding a Hawkes component to the arrival rates provided by the continuous time Markov "Queue Reactive" model of Huang et al. Empirical calibration using Level-I…
In this paper we introduce two new Hawkes processes, namely, compound and regime-switching compound Hawkes processes, to model the price processes in limit order books. We prove Law of Large Numbers and Functional Central Limit Theorems (FCLT) for both processes. The two FCLTs are applied to limit order books where we use these asymptotic methods to study the link between price volatility and order flow in our two models by using the diffusion limits of these price processes. The volatilities of price changes are expressed in terms of parameters describing the arrival rates and price changes. …
High frequency financial data is burdened by a level of randomness that is unavoidable and obfuscates the task of modelling. This idea is reflected in the intraday evolution of limit orders book data for many financial assets and suggests several justifications for the use of stochastic models. For instance, the arbitrary distribution of inter arrival times and the subsequent dependence structure between consecutive book events. This has lead to the development of many stochastic models for the dynamics of limit order books. In this paper we look to examine the adaptability of one family of su…
We show that multivariate Hawkes processes coupled with the nonparametric estimation procedure first proposed in Bacry and Muzy (2015) can be successfully used to study complex interactions between the time of arrival of orders and their size, observed in a limit order book market. We apply this methodology to high-frequency order book data of futures traded at EUREX. Specifically, we demonstrate how this approach is amenable not only to analyze interplay between different order types (market orders, limit orders, cancellations) but also to include other relevant quantities, such as the order …
We present a modified version of the non parametric Hawkes kernel estimation procedure studied in arXiv:1401.0903 that is adapted to slowly decreasing kernels. We show on numerical simulations involving a reasonable number of events that this method allows us to estimate faithfully a power-law decreasing kernel over at least 6 decades. We then propose a 8-dimensional Hawkes model for all events associated with the first level of some asset order book. Applying our estimation procedure to this model, allows us to uncover the main properties of the coupled dynamics of trade, limit and cancel ord…
It has been suggested that marked point processes might be good candidates for the modelling of financial high-frequency data. A special class of point processes, Hawkes processes, has been the subject of various investigations in the financial community. In this paper, we propose to enhance a basic zero-intelligence order book simulator with arrival times of limit and market orders following mutually (asymmetrically) exciting Hawkes processes. Modelling is based on empirical observations on time intervals between orders that we verify on several markets (equity, bond futures, index futures). …
We study statistical aspects of state-dependent Hawkes processes, which are an extension of Hawkes processes where a self- and cross-exciting counting process and a state process are fully coupled, interacting with each other. The excitation kernel of the counting process depends on the state process that, reciprocally, switches state when there is an event in the counting process. We first establish the existence and uniqueness of state-dependent Hawkes processes and explain how they can be simulated. Then we develop maximum likelihood estimation methodology for parametric specifications of t…
University of Zagreb(萨格勒布大学);Faculty of Electrical Engineering and Computing, University of Zagreb(萨格勒布大学电气工程与计算学院)
The stochastic control problem of optimal market making is among the central problems in quantitative finance. In this paper, a deep reinforcement learning-based controller is trained on a weakly consistent, multivariate Hawkes process-based limit order book simulator to obtain market making controls. The proposed approach leverages the advantages of Monte Carlo backtesting and contributes to the line of research on market making under weakly consistent limit order book models. The ensuing deep reinforcement learning controller is compared to multiple market making benchmarks, with the results…
We propose an actionable calibration procedure for general Quadratic Hawkes models of order book events (market orders, limit orders, cancellations). One of the main features of such models is to encode not only the influence of past events on future events but also, crucially, the influence of past price changes on such events. We show that the empirically calibrated quadratic kernel is well described by a diagonal contribution (that captures past realised volatility), plus a rank-one "Zumbach" contribution (that captures the effect of past trends). We find that the Zumbach kernel is a power-…
The Tick library allows researchers in market microstructure to simulate and learn Hawkes process in high-frequency data, with optimized parametric and non-parametric learners. But one challenge is to take into account the correct causality of order book events considering latency: the only way one order book event can influence another is if the time difference between them (by the central order book timestamps) is greater than the minimum amount of time for an event to be (i) published in the order book, (ii) reach the trader responsible for the second event, (iii) influence the decision (pr…
High-frequency market making is a liquidity-providing trading strategy that simultaneously generates many bids and asks for a security at ultra-low latency while maintaining a relatively neutral position. The strategy makes a profit from the bid-ask spread for every buy and sell transaction, against the risk of adverse selection, uncertain execution and inventory risk. We design realistic simulations of limit order markets and develop a high-frequency market making strategy in which agents process order book information to post the optimal price, order type and execution time. By introducing t…
A point process model for order flows in limit order books is proposed, in which the conditional intensity is the product of a Hawkes component and a state-dependent factor. In the LOB context, state observations may include the observed imbalance or the observed spread. Full technical details for the computationally-efficient estimation of such a process are provided, using either direct likelihood maximization or EM-type estimation. Applications include models for bid and ask market orders, or for upwards and downwards price movements. Empirical results on multiple stocks traded in Euronext …
We introduce a multivariate Hawkes process with constraints on its conditional density. It is a multivariate point process with conditional intensity similar to that of a multivariate Hawkes process but certain events are forbidden with respect to boundary conditions on a multidimensional constraint variable, whose evolution is driven by the point process. We study this process in the special case where the fertility function is exponential so that the process is entirely described by an underlying Markov chain, which includes the constraint variable. Some conditions on the parameters are esta…
We introduce a new non parametric method that allows for a direct, fast and efficient estimation of the matrix of kernel norms of a multivariate Hawkes process, also called branching ratio matrix. We demonstrate the capabilities of this method by applying it to high-frequency order book data from the EUREX exchange. We show that it is able to uncover (or recover) various relationships between all the first level order book events associated with some asset when mapped to a 12-dimensional process. We then scale up the model so as to account for events on two assets simultaneously and we discuss…
Empirical data reveals that the liquidity flow into the order book (depositions, cancellations andmarket orders) is influenced by past price changes. In particular, we show that liquidity tends todecrease with the amplitude of past volatility and price trends. Such a feedback mechanism inturn increases the volatility, possibly leading to a liquidity crisis. Accounting for such effects withina stylized order book model, we demonstrate numerically that there exists a second order phasetransition between a stable regime for weak feedback to an unstable regime for strong feedback,in which liquidit…
We present a measurement of price impact in order-driven markets that does not require averages across executions or scenarios. Given the order book data associated with one single execution of a sell metaorder, we measure its contribution to price decrease during the trade. We do so by modelling the limit order book using state-dependent Hawkes processes, and by defining the price impact profile of the execution as a function of the compensator of a stochastic process in our model. We apply our measurement to a data set from NASDAQ, and we conclude that the clustering of sell child orders has…
This paper extends the analysis of Muni Toke and Yoshida (2020) to the case of marked point processes. We consider multiple marked point processes with intensities defined by three multiplicative components, namely a common baseline intensity, a state-dependent component specific to each process, and a state-dependent component specific to each mark within each process. We show that for specific mark distributions, this model is a combination of the ratio models defined in Muni Toke and Yoshida (2020). We prove convergence results for the quasi-maximum and quasi-Bayesian likelihood estimators …
J.P. Morgan AI Research(摩根大通人工智能研究院);Balyasny Asset Management, L.P.(巴利亚斯尼资产管理有限合伙公司)
Multi-agent market simulators usually require careful calibration to emulate real markets, which includes the number and the type of agents. Poorly calibrated simulators can lead to misleading conclusions, potentially causing severe loss when employed by investment banks, hedge funds, and traders to study and evaluate trading strategies. In this paper, we propose a world model simulator that accurately emulates a limit order book market -- it requires no agent calibration but rather learns the simulated market behavior directly from historical data. Traditional approaches fail short to learn a…
We propose a general non-linear order book model that is built from the individual behaviours of the agents. Our framework encompasses Markovian and Hawkes based models. Under mild assumptions, we prove original results on the ergodicity and diffusivity of such system. Then we provide closed form formulas for various quantities of interest: stationary distribution of the best bid and ask quantities, spread, liquidity fluctuations and price volatility. These formulas are expressed in terms of individual order flows of market participants. Our approach enables us to establish a ranking methodolo…
Through the analysis of a dataset of ultra high frequency order book updates, we introduce a model which accommodates the empirical properties of the full order book together with the stylized facts of lower frequency financial data. To do so, we split the time interval of interest into periods in which a well chosen reference price, typically the mid price, remains constant. Within these periods, we view the limit order book as a Markov queuing system. Indeed, we assume that the intensities of the order flows only depend on the current state of the order book. We establish the limiting behavi…
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…
Generative AI for End-to-End Limit Order Book Modelling: A Token-Level Autoregressive Generative Model of Message Flow Using a Deep State Space Network
University of Oxford(牛津大学);Oxford-Man Institute of Quantitative Finance(牛津-曼量化金融研究院);Alan Turing Institute(艾伦·图灵研究所);Man Group(英仕曼集团);Foerster Lab for AI Research(福斯特人工智能研究实验室)
In an order-driven financial market, the price of a financial asset is discovered through the interaction of orders - requests to buy or sell at a particular price - that are posted to the public limit order book (LOB). Therefore, LOB data is extremely valuable for modelling market dynamics. However, LOB data is not freely accessible, which poses a challenge to market participants and researchers wishing to exploit this information. Fortunately, trades and quotes (TAQ) data - orders arriving at the top of the LOB, and trades executing in the market - are more readily available. In this paper, …