Neural stochastic agent‐based limit order book simulation with neural point process and diffusion probabilistic model
| Published date | 01 June 2024 |
| Author | Zijian Shi,John Cartlidge |
| Date | 01 June 2024 |
| DOI | http://doi.org/10.1002/isaf.1553 |
RESEARCH ARTICLE
Neural stochastic agent-based limit order book simulation with
neural point process and diffusion probabilistic model
Zijian Shi | John Cartlidge
Department of Computer Science, University
of Bristol, Bristol, UK
Correspondence
John Cartlidge, Department of Computer
Science, University of Bristol, Bristol, UK.
Email: john.cartlidge@bristol.ac.uk
Funding information
China Scholarship Council; University of
Bristol; UKRI, Grant/Award Number: EP/
Y028392/1
Summary
Modern financial exchanges use an electronic limit order book (LOB) to store bid and
ask orders for a specific financial asset. As the most fine-grained information depict-
ing the demand and supply of an asset, LOB data are essential in understanding mar-
ket dynamics. Therefore, realistic LOB simulations offer a valuable methodology for
explaining the empirical properties of markets. Mainstream simulation models include
agent-based models (ABMs) and stochastic models (SMs). However, ABMs tend not
to be grounded on real historical data, whereas SMs tend not to enable dynamic
agent-interaction. More recently, deep generative approaches have been successfully
implemented to tackle these issues, whereas its black-box essence hampers the
explainability and transparency of the system. To overcome these limitations, we pro-
pose a novel hybrid neural stochastic agent-based model (NS-ABM) for LOB simula-
tion that incorporates a neural stochastic trader in agent-based simulation,
characterised by (1) representing the aggregation of market events' logic by a neural
stochastic background trader that is pre-trained on historical LOB data through a
neural point process model; (2) learning the complex distribution for order-related
attributes conditioned on various market indicators through a non-parametric diffu-
sion probabilistic model; and (3) embedding the background trader in a multi-agent
simulation platform to enable interaction with other strategic trading agents. We
instantiate this hybrid NS-ABM model using the ABIDES platform. We first run the
background trader in isolation and show that the simulated LOB can recreate a com-
prehensive list of stylised facts that demonstrate realistic market behaviour. We then
introduce a population of ‘trend’and ‘value’trading agents, which interact with the
background trader. We show that the stylised facts remain and we demonstrate
order flow impact and financial herding behaviours that are in accordance with
empirical observations of real markets.
KEYWORDS
deep diffusion probabilistic, limit order book, market simulation, neural point process, model;
agent-based model
Received: 3 July 2023 Revised: 29 December 2023 Accepted: 24 February 2024
DOI: 10.1002/isaf.1553
This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium,
provided the original work is properly cited.
© 2024 The Authors. Intelligent Systems in Accounting, Finance and Management published by John Wiley & Sons Ltd.
Intell Sys Acc Fin Mgmt. 2024;31:e1553. wileyonlinelibrary.com/journal/isaf 1of29
https://doi.org/10.1002/isaf.1553
1|INTRODUCTION
Modern financial exchanges (e.g., London Stock Exchange) and online
commodity auction platforms (e.g., StockX) use the continuous double
auction (CDA) mechanism to determine the price of assets. Buyers
and sellers continuously submit orders to a limit order book (LOB),
where order matching takes place and transactions result. Formally,
an LOB is a continuously updating queueing system for limit orders.
Bid orders (i.e., orders to buy) and ask orders (i.e., orders to sell) are
queued on two sides of the book by price-time priority. Whenever
order prices cross (i.e., the price of the new bid order is higher than
the lowest ask price or the price of the new ask order is lower
than the highest bid price), orders are matched into transactions.
Whenever a new order is submitted or an existing order is cancelled,
the LOB will update. These updates happen continuously and time
intervals between events can be in the order of nanoseconds. In this
sense, the LOB depicts the most fundamental and fine-grained level
of demand and supply information concerning a specific financial
asset. Therefore, the LOB is often used as a primary data source in
financial microstructure studies to investigate topics such as the price
formation mechanism (Næs & Skjeltorp, 2006), stochastic properties
of the market (Bouchaud et al., 2002) and the influence of high-
frequency trading (Nolte et al., 2016).
However, although the LOB is of critical importance in research,
using historical LOB data suffers from two major problems. First, as
one cannot interact with historical data, it cannot be used to conduct
‘what if’counterfactual analysis. Therefore, back-testing a trading
algorithm on historical data suffers from the unrealistic assumption
that the market will not react. This is a particularly dangerous assump-
tion when trading large volumes that will ‘move’the market. Second,
the availability of historical LOB data is limited and expensive.
1
Simu-
lations and synthetically generated data, respectively, can help to
overcome these problems.
Two mainstream models for LOB simulation and synthetic data
generation are agent-based models (ABMs) and stochastic models
(SMs). ABMs construct an interactive trading environment containing
heterogeneous agents with behavioural logic that is human-defined.
While defined agents are often modelled as simplifications of real-
world actors such as market makers, momentum traders and liquidity
providers, the objectivity of ABMs can be doubted as one cannot
guarantee that the simulation will behave in the same manner as the
real world (Gould et al., 2013). On the other hand, SMs learn stochas-
tic properties directly from historical data and so are objectively
grounded in reality. Prior studies have shown that market characteris-
tics, such as price and volume distributions and the arrival of market
events, can be captured using SMs, and this learnt knowledge can be
used to generate realistic synthetic data. However, SMs have the limi-
tation of not being interactive. Therefore, although SMs can generate
endless amounts of synthetic data, the problems associated with
back-testing on real data remain. Most recently, deep generative
models have been attempted to simulate the LOB. The main idea
behind this methodology is to use deep generative models as non-
parametric ways to learn the underlying distribution of market events
(including event type, arrival time, price and volume) conditioned on
historical market events and state streams. One characteristic study
by Shi and Cartlidge (2022) utilised a neural Hawkes process to learn
the intensity rate curves for different types of market events, of which
the methodology was deeply rooted in traditional stochastic LOB
studies. The simulated LOB was shown to exhibit multiple stylised
facts observed in real financial markets. However, this study did not
include a methodfor interacting with the model, and therefore, investi-
gations on modelresponse to events (e.g., studies of price impact)were
not performed. Recently, generative adversarial networks (GANs) have
also been successfullyused for LOB simulation by Coletta et al. (2022).
Embedded in an ABM framework, the model of Coletta et al. (2022)
was able to exhibita range of stylised facts and also allowedinteractive
investigations on model response to events. However, as GANs are
intrinsicallyblack-box, it can be difficult to validate andinterpret model
results. In the contextof LOB simulation, this lack of transparency may
hinder the ability to gain insights into the underlying dynamics of the
order book or explainthe generated samples.
This paper presents a neural stochastic agent-based model
(NS-ABM) to simulate the LOB. NS-ABM is a novel hybrid methodol-
ogy that combines the two general approaches of ABM and SM. Our
primary contributions are summarised as follows:
1. We introduce a neural stochastic background trader (BT) whose
actions mimic the aggregation of order events posed by the whole
market. The BT utilises an advanced state-dependent parallel neu-
ral Hawkes process (sd-PNHP) to learn the behavioural pattern of
the whole market from historical real-world level-2 LOB data and
its affiliated message books. When turned to sampling mode, the
BT can iteratively sample the type and arrival time of the next
event according to the knowledge learnt. The model uses neural
methods to model the intensity rate curves of different types of
events, achieving a balance between model expressiveness and
interpretability.
2. We utilise the deep diffusion probabilistic model (DDPM), a non-
parametric method for learning data distributions, to learn the
order-related attributes (e.g., price and volume) conditioned on
various market indicators. As observed in the empirical data, order-
related attributes have significant dependency on various market
indicators (e.g., bid–ask spread and market imbalance). The
DDPM's learnt conditional distributions provide auxiliary informa-
tion for the BT.
3. We incorporate the BT that is equipped with sd-PNHP and DDPM
modules into the open-source agent-based interactive discrete
event simulation (ABIDES) (Byrd et al., 2020) simulation frame-
work. The BT is shown to produce LOB dynamics that reproduce a
comprehensive list of more than 10 stylised facts about real-world
LOBs. Such high fidelity has not been shown in previous LOB sim-
ulation studies. We also concentrate on the interpretability of the
results produced by the BT, by looking deep into the mechanism
producing those results.
4. We introduce a population of trading agents with various ‘trend’
and ‘value’trading strategies within the simulation and
2of29 SHIand CARTLIDGE
Get this document and AI-powered insights with a free trial of vLex and Vincent AI
Get Started for FreeStart Your Free Trial of vLex and Vincent AI, Your Precision-Engineered Legal Assistant
-
Access comprehensive legal content with no limitations across vLex's unparalleled global legal database
-
Build stronger arguments with verified citations and CERT citator that tracks case history and precedential strength
-
Transform your legal research from hours to minutes with Vincent AI's intelligent search and analysis capabilities
-
Elevate your practice by focusing your expertise where it matters most while Vincent handles the heavy lifting
Start Your Free Trial of vLex and Vincent AI, Your Precision-Engineered Legal Assistant
-
Access comprehensive legal content with no limitations across vLex's unparalleled global legal database
-
Build stronger arguments with verified citations and CERT citator that tracks case history and precedential strength
-
Transform your legal research from hours to minutes with Vincent AI's intelligent search and analysis capabilities
-
Elevate your practice by focusing your expertise where it matters most while Vincent handles the heavy lifting
Start Your Free Trial of vLex and Vincent AI, Your Precision-Engineered Legal Assistant
-
Access comprehensive legal content with no limitations across vLex's unparalleled global legal database
-
Build stronger arguments with verified citations and CERT citator that tracks case history and precedential strength
-
Transform your legal research from hours to minutes with Vincent AI's intelligent search and analysis capabilities
-
Elevate your practice by focusing your expertise where it matters most while Vincent handles the heavy lifting
Start Your Free Trial of vLex and Vincent AI, Your Precision-Engineered Legal Assistant
-
Access comprehensive legal content with no limitations across vLex's unparalleled global legal database
-
Build stronger arguments with verified citations and CERT citator that tracks case history and precedential strength
-
Transform your legal research from hours to minutes with Vincent AI's intelligent search and analysis capabilities
-
Elevate your practice by focusing your expertise where it matters most while Vincent handles the heavy lifting
Start Your Free Trial of vLex and Vincent AI, Your Precision-Engineered Legal Assistant
-
Access comprehensive legal content with no limitations across vLex's unparalleled global legal database
-
Build stronger arguments with verified citations and CERT citator that tracks case history and precedential strength
-
Transform your legal research from hours to minutes with Vincent AI's intelligent search and analysis capabilities
-
Elevate your practice by focusing your expertise where it matters most while Vincent handles the heavy lifting