Asymptotic Analysis of Optimal Execution under Heston Stochastic Volatility: Extending the Almgren-Chriss Framework
The classic Almgren-Chriss (AC) model is a cornerstone of optimal execution, providing a closed-form solution for trading trajectories under the assumption of constant market volatility. However, empirical market data consistently exhibits stochastic volatility and mean-reversion, rendering the constant-volatility assumption insufficient for high-fidelity execution strategies. This project relaxes this assumption by introducing Heston dynamics into the market environment. We derive and implement a modified trading strategy by solving the associated Hamilton-Jacobi-Bellman (HJB) equation via asymptotic perturbation methods. The codebase provides a robust Monte Carlo simulation suite and statistical evaluation framework to validate the Heston-corrected strategy against the baseline AC model.
We define the value function
The resulting Hamilton-Jacobi-Bellman equation for this system is a second-order nonlinear PDE:
By treating volatility-of-volatility (
Where
- Asymptotic Strategy Correction: Implementation of a first-order closed-form correction to the AC trajectory that dynamically adjusts to volatility-of-volatility and the leverage effect.
-
LOBSTER Data Calibration: A comprehensive
LobsterCalibratorthat estimates:-
Temporary impact (
eta) via book-walking simulations. -
Permanent impact (
gamma) via lagged signed order-flow regression. -
Heston parameters (
v0,theta,omega,xi,rho) from high-frequency mid-price returns and realized volatility series.
-
Temporary impact (
- Monte Carlo Engine: High-performance, multi-threaded simulation of paired price paths (Arithmetic Brownian Motion vs. Heston) to evaluate strategy performance under stochastic volatility.
-
Statistical Rigor: A full suite of hypothesis tests comparing "Superiority" of strategies:
- Paired T-Tests and Wilcoxon Signed-Rank tests for implementation shortfall (IS) means/medians.
- Levene's Test for variance (risk) comparison.
- Bootstrap-validated CVaR (Tail Risk) analysis at 95% and 99% levels.
- Regime Analysis: Evaluating performance across low, mid, and high-volatility buckets.
-
Lambda Optimization: Grid search and refined search tools to find the optimal risk-aversion parameter (
$\lambda$ ) for a given environment.
├── core/
│ ├── AlmgrenChrissModel.py # AC solution with Heston asymptotic correction
│ ├── Backtester.py # Single-path backtesting with optional correction flag
│ ├── MarketEnvironment.py # SDE Integrators for ABM and Heston dynamics
│ └── MonteCarloSimulator.py # Multi-threaded simulation engine with dynamic parameters
├── data/
│ ├── calibrator.py # LOBSTER message/orderbook calibration logic
├── evaluation/
│ ├── comparator.py # Orchestrates comparison between Classic AC and Heston-AC
│ └── statistics.py # Comprehensive statistical test suite and plotting
├── main.py # CLI interface for calibration, simulation, and analysis
└── README.md # Project documentation
The main.py script serves as the primary entry point, providing an interactive menu to:
- Calibrate parameters from LOBSTER datasets (CSV or ZIP format in the
data/directory). - Run single-path backtests to visualize trading trajectories (supports toggling the Heston correction).
- Execute Monte Carlo simulations for specific risk-aversion levels.
- Optimize
$\lambda$ using a two-stage grid search. - Run the full Model Comparison suite to evaluate the Classic AC baseline against the Heston-Corrected strategy.
- Perform a "Dataset Sweep" to aggregate results across multiple calibrated market samples.
-
Feller Condition: While the calibrator includes a "soft" Feller guard (adjusting
$\xi$ if$2\theta\omega < \xi^2$ ), more robust handling of near-zero variance in the Euler-Maruyama scheme could be implemented. - Higher-Order Corrections: The current implementation uses a first-order correction ($\mathcal{O}(\xi)$). Second-order terms ($\mathcal{O}(\xi^2)$) could further improve fidelity in high vol-of-vol environments.
This project was developed for MATH310: Introduction to Mathematical Modeling at the Colorado School of Mines. It represents a move away from heuristic-based trading toward a mathematically rigorous derivation of execution logic under stochastic regimes.