logo SBA

ETD

Archivio digitale delle tesi discusse presso l’Università di Pisa

Tesi etd-10032022-210418


Tipo di tesi
Tesi di laurea magistrale
Autore
SPINA, PAOLO
URN
etd-10032022-210418
Titolo
The Deep Ratio Model: Using Neural Networks To Create A Realistic Limit Order Book Simulator
Dipartimento
FISICA
Corso di studi
FISICA
Relatori
relatore Mannella, Riccardo
relatore Lillo, Fabrizio
Parole chiave
  • limit order book
Data inizio appello
24/10/2022
Consultabilità
Non consultabile
Data di rilascio
24/10/2092
Riassunto
The Limit Order Book is a digital queuing system in which buy and sell orders
are stored, with the aim to facilitate trades between market participants. It is an
example of a dynamical complex system and it has been a subject of many studies
by economists, mathematicians, and physicists for the past twenty years. The aim
of this thesis is to create a realistic Limit Order Book simulator, able to reproduce
its empirical properties.
In the first part of this work I explain what is a Limit Order Book and how it works,
then I present a brief overview of the literature focused on its mathematical modeling
and numerical simulations. After that I present an original work, in which I analyze
and compare the empirical properties of the Limit Order Book of Tesla stocks traded
in the NASDAQ exchange and electrical power futures from the European energy
market, focusing on highlighting the differences between the two assets.
Following that I present one of the first statistical LOB models called the Zero
Intelligence model, which assumes no rationality behind traders actions, being a
purely mechanistic model in which the arrival of orders is described by independent
Poisson processes. Through numerical simulations of the model, I show that some
properties of empirical Limit Order Books, namely the spread (i.e. the difference
between the buy order with the highest price and the sell order with the lowest
price) and the volatility can be reproduced quite well by the model, meaning that
that they can be traced to the stochastic nature of the Limit Order Book. The
model though is based on many simplifying assumptions, such as the complete lack
of correlation of the order-flow, i.e. the arrival of different type of orders, and the
independence of the probability of placing and order at a certain price level from
its distance from the best prices. Both of those assumptions are not verified in
empirical data, therefore the ZI model is only a first order approximation to build
a Limit Order Book simulator.
For this reason, I develop an original LOB model called the Ratio model that tries to
overcome the above limitations of the ZI model, using some regularities of the order
flow that have been observed in the literature. In particular I use the fact that orders
are placed according to a bi-modal distribution centered around the best prices, that
orders closer to the best prices are more likely to be canceled, that the spread greatly
affects what type of order is placed and that orders have long range correlations in
their sign (+1 for buy orders and -1 for sell orders ). Through numerical simulations
I show that the Ratio model is able to reproduce some properties of empirical Limit
Order Books with high fidelity and that it outperforms the ZI model in almost every
aspect. On the other hand since the model uses solely the precedent state of the
book to simulate the arrival of a new order, it is not able to faithfully reproduce
temporal dependencies of empirical Limit Order Books.
To create a Limit Order Book simulator that can replicate the correlations in the
order-flow, I used Recurring Neural Networks to build a predictor that guesses the
next order type given the recent past history of the book. Adding this predictor to
the Ratio model I create an original Limit Order Book simulator, called the Deep
Ratio model, that retains all the properties of the previous model and it is able to
reproduce temporal dependencies in the book. Comparing the Deep Ratio model
to the ZI and Ratio models, I show that the former has better performances and
that, apart from the spread distribution, it is able to replicate many properties of
empirical Limit Order Books.
File