Learning to simulate realistic limit order book markets from data as a World Agent

2025-05-02 0 0 3.48MB 9 页 10玖币
侵权投诉
Learning to simulate realistic limit order book markets from
data as a World Agent
Andrea Coletta
andrea.coletta@jpmchase.com
J.P. Morgan AI Research
New York, USA
Aymeric Moulin
amoulin@bamfunds.com
Balyasny Asset Management, L.P.
New York, USA
Svitlana Vyetrenko
svitlana.s.vyetrenko@jpmchase.com
J.P. Morgan AI Research
New York, USA
Tucker Balch
tucker.balch@jpmchase.com
J.P. Morgan AI Research
New York, USA
ABSTRACT
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 con-
clusions, potentially causing severe loss when employed by invest-
ment 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 and
calibrate trader population, as historical labeled data with details
on each individual trader strategy is not publicly available. Our
approach proposes to learn a unique "world" agent from historical
data. It is intended to emulate the overall trader population, without
the need of making assumptions about individual market agent
strategies. We implement our world agent simulator models as a
Conditional Generative Adversarial Network (CGAN), as well as a
mixture of parametric distributions, and we compare our models
against previous work. Qualitatively and quantitatively, we show
that the proposed approaches consistently outperform previous
work, providing more realism and responsiveness.
KEYWORDS
GANs, synthetic data, time-series, nancial markets
ACM Reference Format:
Andrea Coletta, Aymeric Moulin, Svitlana Vyetrenko, and Tucker Balch.
2022. Learning to simulate realistic limit order book markets from data as a
World Agent. In 3rd ACM International Conference on AI in Finance (ICAIF
’22), November 2–4, 2022, New York, NY, USA. ACM, New York, NY, USA,
9 pages. https://doi.org/10.1145/3533271.3561753
The research work was carried out when Aymeric Moulin was employed at J.P. Morgan
AI Research.
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
for prot or commercial advantage and that copies bear this notice and the full citation
on the rst page. Copyrights for components of this work owned by others than the
author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or
republish, to post on servers or to redistribute to lists, requires prior specic permission
and/or a fee. Request permissions from permissions@acm.org.
ICAIF ’22, November 2–4, 2022, New York, NY, USA
©2022 Copyright held by the owner/author(s). Publication rights licensed to ACM.
ACM ISBN 978-1-4503-9376-8/22/10. . . $15.00
https://doi.org/10.1145/3533271.3561753
(A)
(B)
Figure 1: World Model (A) vs Multi-Agent (B) Simulator.
1 INTRODUCTION
Financial markets are among the most complex systems in exis-
tence. Naturally described as multi-agent systems, they comprise
thousands of interacting heterogeneous participants. Nowadays,
both researchers and traders heavily rely on articial market mod-
els, to support the design of algorithms, as well as testing novel
trading strategies. Articial market models can help to isolate and
study the impact of new algorithms to the price and volume of
the stocks [
19
]; they can explain the nature of some rare nancial
market phenomena, such as bubbles and crashes [
22
]; or they can
just be used to study and test trading strategies, before approaching
the real market [6].
Previous work mostly focuses on multi-agent modeling, which is
a natural bottom-up approach to emulate nancial markets [
8
]. In
these models, a number of decision-makers (agents or traders) and
institutions, interact through prescribed rules to build the market.
Several multi-agent simulators have been developed, by traders
and researchers [
3
,
4
,
23
]. However, modeling a realistic market
through a multi-agent simulation is still a major challenge [
8
,
18
].
In fact, specifying how the agents should behave and interact in
the simulation is not obvious. While some agents can be modeled
following a common sense or historical analysis [
9
,
24
], in general
market participants adopt unknown proprietary trading strategies.
Moreover, public available historical data does not include attribu-
tion to the various market participants, which makes the calibration
of the agents challenging.
To overcome this challenge, learning to simulate from the data
as a world model was introduced in [
6
]. This approach assumed a
arXiv:2210.09897v1 [q-fin.TR] 26 Sep 2022
ICAIF ’22, November 2–4, 2022, New York, NY, USA Colea et al.
Figure 2: Order book denitions
unique agent trained as a conditional generative adversarial Net-
work (CGAN) [
17
] from historical data, without the need of making
assumptions about the individual market agent strategies.
The world agent was simplistic: it was only capable of placing limit
orders which usually account for just 50% of all trading actions.
Nevertheless, it was shown in [
6
] that this model could reproduce
stylized facts as well as some form of market impact of trading -
hence, this work provides a rst attempt to a realistic and respon-
sive world model. Figure 1 shows a classic multi-agent simulator
compared to the World Model, in which all the background agents
are represented with a unique World Agent.
In this paper, we improve the design of the CGAN-based world
model by extending it to support all main market actions (i.e., mar-
ket order, add limit order, cancel order, and replace order), and we
describe it alongside another world model constructed explicitly as
a mixture of parametric distributions. Moreover, we improve the
CGAN robustness and stability by unrolling the model during the
training.
We demonstrate that both approaches presented in this paper
outperform previous work on world model construction by pro-
viding higher degree of simulation realism. We also emphasize
and experimentally demonstrate that the GAN-based model ap-
plies to dierent heterogeneous stocks, as it does not make explicit
assumptions about the data distributions.
2 BACKGROUND
In this section we introduce the readers to limit order book markets,
with a brief introduction to market structure and mechanisms.
2.1 Limit Order Book (LOB)
Financial markets oer a place for buyers and sellers to meet and
trade on dierent assets. Modern electronic markets, such as NAS-
DAQ, provide ad-hoc message protocols to facilitate trades and pro-
vides real-time information about the market order ow and state.
In particular, the ITCH [
13
] protocol provides access to anonymized
market data with highest granularity, including all the orders in the
market. The main four fundamental orders are: Market orders,Add
limit orders,Cancel orders, and Replace orders. They respectively
indicate the intention of trading a given amount of shares at any
price; the intention of trading shares at a xed limit price; a cancel-
lation of a previous limit order; and a modication to a previous
limit order (e.g., a change in the price or quantity).
Most equity markets employ a continuous-time double auction
mechanism to handle the stream of orders, and to execute a trans-
action whenever a buyer and seller agree on the price [
2
]. To store
the supply and demand for each asset, the market exchange uses
an electronic record called limit order book (LOB). The LOB keeps
record of all outstanding limit orders into dierent levels, organized
by price, and it continuously updates them according to incoming
orders. Figure 2 shows a snapshot of a LOB with the available supply
(red bars) and demand (green bars). The rst bars (L1) represent the
rst level, the second bars (L2) the second level, and so on. Each bar
keeps the outstanding orders into a queue structure. An add limit
order to buy will update the existing demand, increasing the queue
size (see Figure 2 light green); while a cancel order will decrease the
queue size, and consequently reduce supply or demand.
2.2 Articial Market properties
Realism.
Evaluating trading strategies against poorly calibrated
market models can lead to poor and misleading conclusions, po-
tentially causing severe loss when we employ these strategies on
real markets. To assess the realism of articial models, researchers
commonly evaluate their ability to reproduce statistical properties
of real markets called stylized facts [
2
,
7
,
24
]. For example, as as-
set daily returns usually have fat tail distribution and long-range
dependence, we expected the same properties (or stylized facts)
from articial markets. In Section 5 we show that our approach
outperforms existing work under a wide range of stylized facts. In
particular, we consider auto-correlations,heavy tails distribution,
and long range dependence to evaluate asset return properties. While
we consider order volumes,time to rst ll,depth and market spread
distributions, to evaluate the volumes and order ow. 1
Responsiveness.
Another desirable property of articial market
models is the responsiveness to exogenous trading orders: the model
should emulate the market reaction to new orders, providing a tool
to investigate strategies’ impact on the market. For example, the
arrival of several buy (sell) market orders commonly causes the rise
(fall) of the price. This phenomenon is called price impact, and it
desirable that a responsive model exhibit this behavior.
In section 5 we evaluate the responsiveness of our model by
simulating the arrival of a burst of buy/sell orders [1].
2.3 Generative Models and CGANs
In the last years generative models have been successfully employed
in a wide range of scenarios, ranging from images to time-series.
A generative model is any model able to learn a probability distri-
bution
𝑝model
resembling the real data distribution
𝑝data
, from a
set of real samples. Among generative models, we can identify two
major approaches: a) models that explicitly estimate the probability
density function; b) and models that implicitly learn to generate
samples without the need of an explicit density function [10].
Generative Adversarial Networks (GANs)
.GANs are power-
ful generative models that consider two adversarial neural networks,
which implicitly learn to generate data samples [
11
]. In particular,
a generator
𝐺
and a discriminator
𝐷
are trained simultaneously to
1We refer the reader to the work in [24] for a detailed introduction to stylized facts.
摘要:

LearningtosimulaterealisticlimitorderbookmarketsfromdataasaWorldAgentAndreaColettaandrea.coletta@jpmchase.comJ.P.MorganAIResearchNewYork,USAAymericMoulin∗amoulin@bamfunds.comBalyasnyAssetManagement,L.P.NewYork,USASvitlanaVyetrenkosvitlana.s.vyetrenko@jpmchase.comJ.P.MorganAIResearchNewYork,USATucker...

展开>> 收起<<
Learning to simulate realistic limit order book markets from data as a World Agent.pdf

共9页,预览2页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!

相关推荐

分类:图书资源 价格:10玖币 属性:9 页 大小:3.48MB 格式:PDF 时间:2025-05-02

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 9
客服
关注