Table of Contents
Fetching ...

Limit Order Book Simulation and Trade Evaluation with $K$-Nearest-Neighbor Resampling

Michael Giegrich, Roel Oomen, Christoph Reisinger

TL;DR

It is demonstrated that in a benchmark comparison, the off-policy evaluation method applied to simulate limit order book (LOB) markets and how it can be used to evaluate and calibrate trading strategies outperforms a deep learning-based algorithm for several key statistics.

Abstract

In this paper, we show how $K$-nearest neighbor ($K$-NN) resampling, an off-policy evaluation method proposed in \cite{giegrich2023k}, can be applied to simulate limit order book (LOB) markets and how it can be used to evaluate and calibrate trading strategies. Using historical LOB data, we demonstrate that our simulation method is capable of recreating realistic LOB dynamics and that synthetic trading within the simulation leads to a market impact in line with the corresponding literature. Compared to other statistical LOB simulation methods, our algorithm has theoretical convergence guarantees under general conditions, does not require optimization, is easy to implement and computationally efficient. Furthermore, we show that in a benchmark comparison our method outperforms a deep learning-based algorithm for several key statistics. In the context of a LOB with pro-rata type matching, we demonstrate how our algorithm can calibrate the size of limit orders for a liquidation strategy. Finally, we describe how $K$-NN resampling can be modified for choices of higher dimensional state spaces.

Limit Order Book Simulation and Trade Evaluation with $K$-Nearest-Neighbor Resampling

TL;DR

It is demonstrated that in a benchmark comparison, the off-policy evaluation method applied to simulate limit order book (LOB) markets and how it can be used to evaluate and calibrate trading strategies outperforms a deep learning-based algorithm for several key statistics.

Abstract

In this paper, we show how -nearest neighbor (-NN) resampling, an off-policy evaluation method proposed in \cite{giegrich2023k}, can be applied to simulate limit order book (LOB) markets and how it can be used to evaluate and calibrate trading strategies. Using historical LOB data, we demonstrate that our simulation method is capable of recreating realistic LOB dynamics and that synthetic trading within the simulation leads to a market impact in line with the corresponding literature. Compared to other statistical LOB simulation methods, our algorithm has theoretical convergence guarantees under general conditions, does not require optimization, is easy to implement and computationally efficient. Furthermore, we show that in a benchmark comparison our method outperforms a deep learning-based algorithm for several key statistics. In the context of a LOB with pro-rata type matching, we demonstrate how our algorithm can calibrate the size of limit orders for a liquidation strategy. Finally, we describe how -NN resampling can be modified for choices of higher dimensional state spaces.
Paper Structure (24 sections, 20 equations, 22 figures, 2 tables, 1 algorithm)

This paper contains 24 sections, 20 equations, 22 figures, 2 tables, 1 algorithm.

Figures (22)

  • Figure 1: LOB snapshot $S^5_{p^*}(t)$ at time $t$ with dividing price $p^*$, $5$ levels on each market side and tick size $\delta$.
  • Figure 2: LOB snapshot $S^3_{p^*}(t)$ at time $t$ with dividing price $p^*$, mid-price $p_m$ and weighted mid-price $p_v$.
  • Figure 3: This figure gives an example for the incorporation of actions from a trading agent into the LOB (cf. line $7$ in Algorithm \ref{['alg:matchingSim']}). In the first plot, the trader cancels a buy limit order and a sell limit order. Then, in the second plot, a buy market order is placed depleting some of the liquidity in the LOB. In the third plot, the trading agent then places a new buy limit order and a new sell limit order in the LOB.
  • Figure 4: Monthly trade count for different active contracts in data collection (left); Minute-by-minute trading volume on 02/11/2023 (right); Normalized cumulative trading volume and count on 02/11/2023 (bottom)
  • Figure 5: Resampling statistics: Distances distribution (left); distances dynamics (right)
  • ...and 17 more figures

Theorems & Definitions (2)

  • Remark 1
  • Remark 2: Event time vs. real time