Introduction
In the domain of quantitative finance, the evaluation of trading strategies traditionally relies on "market replay" backtesting. While computationally efficient, this method is fundamentally non-reactive; it assumes that the market's state remains indifferent to the actions of the agent being tested. In reality, large orders consume liquidity, shift the best bid/ask prices, and trigger reactions from other market participants. To address this, researchers have turned to Conditional Generative Adversarial Networks (CGANs), such as LOBGAN, to create reactive simulators that generate the next state of a Limit Order Book (LOB) based on current conditions.
However, these generative models often operate as "black boxes." If a simulator possesses internal logical inconsistencies or over-relies on specific features, a trading agent—particularly one trained via Reinforcement Learning (RL)—may learn to exploit these quirks. This results in unrealistic "paper profits" that would not materialize in a live market. This paper investigates the robustness of LOBGAN through adversarial attacks and proposes iterative improvements to develop more reliable, unexploitable market environments.
Methodology
The research utilizes high-fidelity historical order data from the LOBSTER database, focusing on major stocks to ensure the ground truth reflects actual market microstructures. The study evaluates the LOBGAN framework through three primary methodological pillars:
- Feature Sensitivity Analysis: The researchers systematically perturbed input features, such as
BookImbalanceandSpread, to their 5th and 95th percentiles. By observing the resulting changes in the model's output, they mapped the internal dependencies of the generator. - Adversarial Attacks: To stress-test the environment, the authors designed two types of exploits:
- Hand-crafted Strategies: Specific order sequences designed to manipulate features like book imbalance to force the CGAN into favorable price movements.
- RL-based Attacks: Training RL agents specifically to maximize profit within the simulator, effectively automating the discovery of the model's logical vulnerabilities.
- Iterative Model Development: Based on the vulnerabilities identified, the authors developed successive versions of the model (v1 through v3), focusing on feature diversification and training-time randomization.
Vulnerabilities in Generative Simulators
The investigation revealed two critical vulnerabilities in the baseline LOBGAN (v0) model:
The "Puppet" Problem
The original model generated new LOB states relative to the "touch" (the best bid or ask price). This created a feedback loop where an agent could place an aggressive order to move the touch, and the CGAN would blindly adjust its generated state to follow that move. This allowed agents to "lead" the market in any direction, creating a puppet-like relationship between the agent and the simulator.
Feature Over-reliance
The model exhibited an excessive sensitivity to BookImbalance. By flooding one side of the book with limit orders—without actually executing trades—an agent could trick the CGAN into "hallucinating" a price trend. The simulator interpreted the artificial imbalance as a signal of imminent price movement, allowing the agent to profit from a move it had artificially induced.
Model Evolution and Results
The authors addressed these vulnerabilities through iterative refinement:
- LOBGAN v1 (Representativeness): This version introduced a broader set of features, including 10-level imbalance and time-based returns. While this increased the realism of the market dynamics, the model remained partially vulnerable to sophisticated exploits.
- LOBGAN v3 (Randomization and Robustness): The most robust iteration utilized randomization of the levels used for the imbalance feature during the training phase. This prevented the model from overfitting to specific shortcuts.
Results showed that while "naive" market-making strategies were consistently profitable in LOBGAN v0, they became significantly less effective in subsequent versions. In LOBGAN v3, these previously successful exploit strategies actually resulted in financial losses, indicating that the model had successfully moved beyond easily manipulated logic.
Discussion and Future Work
A central theme of this research is the tension between reactivity and robustness. While a reactive model is necessary for realism, a model that reacts too predictably becomes a "money printer" for RL agents. The authors argue that a high-quality simulator should be "conservative"—ideally harder to trade in than the real market. If a strategy cannot maintain profitability in a conservative simulator, it is unlikely to succeed in actual market conditions.
Future research directions include moving away from hand-crafted features toward raw market features using architectures like CNNs or Transformers. Additionally, the authors propose a roadmap for integrating RL-based adversarial agents directly into the training loop, ensuring that robustness is a primary objective from the outset rather than a post-hoc correction.
Summary updated