# Adaptive Market Making Strategy: An Extended Study of the Avellaneda-Stoikov Framework Based on Machine Learning

> This is a quantitative finance research project that explores integrating short-term volatility and direction predictions into the Avellaneda-Stoikov market making framework. Backtesting is conducted using the XGBoost model and AAPL high-frequency limit order book data to compare the performance of the baseline strategy with the machine learning-enhanced strategy.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-04-30T00:15:50.000Z
- 最近活动: 2026-04-30T02:11:19.319Z
- 热度: 153.1
- 关键词: 做市策略, Avellaneda-Stoikov, 机器学习, XGBoost, 高频交易, 限价订单簿, 波动率预测, 方向预测, 量化金融, AAPL
- 页面链接: https://www.zingnex.cn/en/forum/thread/avellaneda-stoikov
- Canonical: https://www.zingnex.cn/forum/thread/avellaneda-stoikov
- Markdown 来源: floors_fallback

---

## Introduction: Core Overview of the Extended Study on the Avellaneda-Stoikov Framework Based on Machine Learning

This study explores integrating short-term volatility and direction predictions into the classic Avellaneda-Stoikov market making framework. Backtesting is performed using the XGBoost model and Apple Inc. (AAPL) high-frequency limit order book data to compare the performance of the baseline strategy and the machine learning-enhanced strategy. The core objective is to improve market making strategy performance while maintaining model interpretability, providing a new approach for adaptive market making in quantitative finance.

## Research Background and Core Questions

The Avellaneda-Stoikov model is a widely used market making framework in quantitative finance, based on stochastic optimal control theory. It balances spread income and inventory risk by adjusting quotes. However, its assumption of constant volatility or simple stochastic processes fails to capture rapid market changes. Core question: If short-term price direction and volatility can be accurately predicted, can we improve strategy performance while preserving the framework structure? This study uses AAPL high-frequency limit order book data for empirical analysis.

## Methodological Framework

**Design Principles**: Predictions only modify specific model parameters (volatility predictions adjust the inventory pressure term, direction predictions shift the reservation price, spread anchors to baseline volatility), ensuring interpretability and robustness.

**Strategy Comparison**: Constant spread strategy (basic control), baseline Stoikov strategy (fixed volatility), ML extended strategy (introducing predictions), oracle extended strategy (theoretical upper bound).

**Data Source**: AAPL LOBSTER-format high-frequency data (order book snapshots and event files), divided into training and testing periods chronologically.

**Feature Engineering**: Covers order book status (imbalance, depth, etc.), market activity (events, order flow, etc.), and technical indicators (realized volatility, etc.).

**Label Construction**: Direction labels are classified based on future midpoint prices; volatility labels use forward realized log volatility; leakage-proof design ensures backtest authenticity.

**Model Selection**: XGBoost (efficient, interpretable, regularized), with training divided into exploration and final training phases.

## Strategy Implementation and Backtesting

**Core Modules**: stoikov.py (baseline strategy), stoikov_extension.py (ML-enhanced strategy), constant_spread.py (control strategy).

**Backtesting Engine**: Handles details like tick rounding, no-cross constraints, queue approximation, trade simulation, capital/inventory accounting, and period closing.

**Backtesting Process**: Load data → Construct features → Generate labels → Load model → Run backtests for four strategies → Report metrics.

## Evaluation Metrics and Research Findings

**Core Metrics**: Final profit and loss (pnl_final), P&L standard deviation (pnl_std), Sharpe ratio (sharpe_1s), average absolute inventory, fill rate, trading volume.

**Expected Findings**: The baseline Stoikov strategy outperforms the constant spread strategy (reflecting inventory management value); the ML extended strategy has better risk-adjusted returns (verifying prediction effectiveness); the gap between the oracle and ML strategies reveals room for prediction improvement; the ML extended strategy balances performance and interpretability.

## Research Contributions and Limitations

**Key Contributions**: Methodological innovation (integrating ML into the classic framework while maintaining interpretability), empirical validation (comparison using real high-frequency data), reproducibility (open-source code and documentation), feature engineering reference (interpretable high-frequency feature set).

**Limitations**: Single-asset study (generalizability to be verified), simplified assumptions (trade simulation differs from real trading), no market impact consideration, insufficient cost assumptions.

## Extension Directions and Application Prospects

**Potential Improvements**: Multi-asset extension (stocks, futures, cryptocurrencies), complex models (deep learning, reinforcement learning), real-time deployment, more complex risk management.

**Industry Applications**: High-frequency market maker strategy optimization, short-term prediction applications for quantitative hedge funds, academic research reference, intelligent market making tool development for fintech companies.
