# Generative models of limit order books

**Time: **
Thu 2021-06-10 13.00

**Location: **
Via Zoom: https://kth-se.zoom.us/webinar/register/WN_ELZ61ZbqSNKq_c7ShhtAqA, (English)

**Subject area: **
Mathematics

**Doctoral student: **
Hanna Hultin
, Matematisk statistik

**Opponent: **
Professor Erik Lindström, Lund University

**Supervisor: **
Professor Henrik Hult, Matematisk statistik

## Abstract

In this thesis generative models in machine learning are developed with the overall aim to improve methods for algorithmic trading on high-frequency electronic exchanges based on limit order books. The thesis consists of two papers.

In the first paper a new generative model for the dynamic evolution of a limit order book, based on recurrent neural networks, is developed. The model captures the full dynamics of the limit order book by decomposing the probability of each transition of the limit order book into a product of conditional probabilities of order type, price level, order size, and time delay. Each such conditional probability is modeled by a recurrent neural network. In addition several evaluation metrics for generative models related to order execution are introduced. The generative model is successfully trained to fit both synthetic data generated by a Markov model and real data from the Nasdaq Stockholm exchange.

The second paper explores reinforcement learning methods to find optimal policies for trading execution in Markovian models. A number of different approaches are implemented and compared, including a baseline time-weighted average price (TWAP) strategy, tabular Q-learning, and deep Q-learning based on predefined features as well as with the entire limit order book as input. The results indicate that it is preferable to use deep Q-learning with the entire limit order book as input to design efficient execution policies. In order to improve the understanding of the decisions taken by the agent, the learned action-value function for the deep Q-learning with predefined features is visualized as a function of selected features.