Liquidity-Aware Execution via Order Book Depth Integration
Incorporate order book depth into financial agent toolchains to calculate market impact and split large trades into liquidity-aware execution chunks.
Time
Compute level
Resources
Prerequisites
Scope
The Gap
The Performance analysis (Section 4.3, page 8) highlights that GPT-5 suffered heavy losses due to a 'rigid adherence to target weights without liquidity awareness,' attempting to rebalance portfolios regardless of the market's ability to absorb the trades.
Limitation
The current toolset lacks visibility into market depth and slippage, causing agents to propose execution strategies that are technically impossible or prohibitively expensive in low-liquidity regimes.
Proposed Solution
Expand the 'Check Price' and 'Trade' tool interfaces to include Level 2 market data (order book depth). Integrate a 'Slippage Estimation' function into the agent's toolchain that forces the LLM to calculate the cost of market impact and potentially break large orders into smaller, time-weighted chunks (TWAP/VWAP).
Why This Matters
Real-world trading requires understanding 'market impact'; without this, agents cannot operate in volatile or low-volume markets like specific altcoins or small-cap stocks.
How to Get Started
- Access historical or live Level 2 market data APIs to retrieve order book depth information.
- Extend the existing Check Price and Trade tool interfaces to ingest order book snapshots.
- Implement a slippage estimation algorithm that computes market impact costs for large order sizes.
- Integrate TWAP and VWAP execution logic into the agent loop and backtest performance against rigid-weight baselines.
Code linked to this paper on Hugging Face: github.com/HKUDS/AI-Trader
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Works like 'Reinforcement Learning for Liquidity-Weighted Optimal Trade Execution strategies' and 'Optimal Trading Strategies in a Limit Order Market with Imperfect Liquidity' explore optimal execution and market impact considering limit order books and liquidity. However, they do not specifically examine expanding LLM agent tool interfaces to enforce slippage estimation and TWAP/VWAP chunking based on Level 2 depth.
- Reinforcement Learning for Liquidity-Weighted Optimal Trade Execution strategies · 2026 · 0 citations
- Optimal Trading Strategies in a Limit Order Market with Imperfect Liquidity · 2012 · 6 citations
We searched OpenAlex for “Incorporate order book depth into financial agent toolchains to calculate market impact and split large trades into liquidity-aware execution chunks.” and “Liquidity-Aware Execution via Order Book Depth Integration” and an AI compared the idea with the top 6 results. A small search can miss relevant work.
Source Paper
AI-Trader: Benchmarking Autonomous Agents in Real-Time Financial MarketsTianyu Fan, Yuhao Yang, Yangqin Jiang +3 more · 2025
AI-Trader is a benchmarking platform designed to evaluate autonomous LLM agents in real-time, dynamic financial environments across U.S. stocks, A-shares, and cryptocurrencies. The study finds that high general intelligence does not equate to trading proficiency, as most mainstream LLMs fail to achieve positive returns or manage risk effectively without human intervention.
Related Ideas
- Latency-Aware Execution SimulationTradingAgents: Multi-Agents LLM Financial Trading Framework🟡Fairly easy
- Closed-Loop State-Conditioned Flow-Matching Portfolio PolicyAllocFlow: End-to-End Portfolio Trading Action Generation from Raw Market Data🟡Fairly easy
- Longitudinal Validation via Student-Teacher DistillationTradingAgents: Multi-Agents LLM Financial Trading Framework🟠Medium
- End-to-End Market Encoder Adaptation via Low-Rank Reinforcement LearningAllocFlow: End-to-End Portfolio Trading Action Generation from Raw Market Data🟠Medium
- Differentiable Factor-Neutral Constrained Flow-Matching PolicyAllocFlow: End-to-End Portfolio Trading Action Generation from Raw Market Data🟡Fairly easy