Market Making with Deep Reinforcement Learning from Limit Order Books

—

Market Making with Deep Reinforcement Learning from Limit Order Books

Hong Guo
Jianwu Lin
Fanlin Huang
Published on 5/25/2023
Equities
Derivatives
Reinforcement learning
Deep learning
High frequency trading
Machine learning

This paper presents a deep reinforcement learning approach for market making that leverages limit order book (LOB) data. The authors propose Attn-LOB, a CNN-Attention network pre-trained on mid-price direction prediction, to automatically extract informative features from the high-dimensional, noisy LOB. The RL agent uses a novel continuous action space that outputs a bias and spread to compute bid and ask prices, allowing flexible quoting. A hybrid reward function combines dampened PnL, trading PnL, and inventory punishment to encourage spread capturing while controlling inventory risk. Experiments on three Chinese stocks from the Shenzhen Stock Exchange show that the proposed agent (C-PPO) significantly outperforms traditional models like Avellaneda-Stoikov and RL baselines in terms of normalized PnL, PnL per unit inventory, and Sharpe ratio. The agent also demonstrates robustness to latency and interpretability through attention weights, which show it focuses on recent market events and adapts to market conditions. The work highlights the effectiveness of automatic feature extraction from LOB and the continuous action space for market making.

Highlights

  • 1Proposes a deep reinforcement learning framework for market making that automatically extracts features from limit order book (LOB) data using a CNN-Attention network (Attn-LOB).
  • 2Introduces a novel continuous action space that allows flexible quoting of bid and ask prices, outperforming discrete action spaces.
  • 3Designs a hybrid reward function combining dampened PnL, trading PnL, and inventory punishment to control risk and encourage spread capturing.
  • 4Demonstrates robustness to latency and provides interpretability via attention visualization, showing the agent focuses on recent market events.
  • 5Achieves superior performance over traditional models (e.g., Avellaneda-Stoikov) and RL baselines on three Chinese stocks in a simulated environment.

Methods

  • M
    Attn-LOB: A neural network with convolutional filters, inception modules, and multi-head self-attention for extracting features from LOB data, pre-trained on mid-price direction prediction.
  • M
    Continuous action space: Agent outputs two continuous actions (bias and spread) to compute reservation price and quote prices, with inventory-based constraints.
  • M
    Hybrid reward function: Combines dampened PnL (penalizing speculative holding), trading PnL (rewarding advantageous trades), and inventory punishment (L2 norm) to balance profit and risk.
  • M
    Training algorithms: Proximal Policy Optimization (PPO) for continuous actions and Dueling DQN for discrete actions.

Results

  • R
    C-PPO (continuous PPO) achieves the highest ND-PnL (9.3e5), PnLMAP (117.2), and Sharpe ratio (12.3) on Ping An Bank, outperforming all baselines including AS and fixed strategies.
  • R
    Ablation studies show that removing LOB state or Attn-LOB significantly degrades performance, while dynamic market states provide marginal improvement.
  • R
    The agent maintains profitability under latency up to 10 events, outperforming fixed strategies and AS which suffer from latency.
  • R
    Attention visualization reveals the agent focuses on recent events in stable markets and also earlier changes during rapid price movements, indicating adaptive behavior.
  • R
    The agent learns human-like market making skills: in range-bound markets it captures spreads with low inventory, while in trending markets it widens quotes to avoid risk.
0/5

Analyze Paper

Generate insights from "Market Making with Deep Reinforcement Learning from Limit Or...".

Suggested Actions