Skip to main content
Selected work

2026Co-Author

Latency-Aware Execution Engine

Breaking a large crypto order into child trades is a losing game against your own market impact: trade too fast and you push the price against yourself, trade too slow and you drift from your target, and the naive schedules most people fall back on bleed cost the whole way.

The result

Beat TWAP by 10.2 basis points on Bitcoin in walk-forward testing, and cut execution cost 96.7% versus naive execution.

An end-to-end trade-execution engine that decides how to slice a large order over time to keep cost low. It pairs classical forecasting models (Linear Regression, Random Forest, XGBoost) with a QR-DQN reinforcement-learning agent, and it prices the cost of its own trading through the Almgren-Chriss market-impact model. Everything is validated against 98 million real market trades across three assets.

vs TWAP (BTC)
+10.2 bps
Cost reduction
96.7%
Validation
98M trades
Tests / Ablations
176 / 17

Architecture

Market data

98M real trades, 3 assets

Forecast layer

Linear Regression, Random Forest, XGBoost

QR-DQN agent

risk-sensitive, tunable risk aversion

Execution schedule

Walk-forward evaluation

vs TWAP, vs naive

An Almgren-Chriss market-impact estimate feeds the agent's state, so it trades against an honest cost rather than the quoted price.

Market data feeds a forecast layer where the classical models estimate short-horizon price and cost. Those forecasts, together with an Almgren-Chriss estimate of how much the engine's own trading will move the price, become the state the QR-DQN agent reads. The agent chooses a child-order schedule, and every run is scored with walk-forward validation against TWAP and a naive baseline, so the numbers reflect trades the model never saw during training.

Key decisions and trade-offs

Classical models plus a QR-DQN agent, not one or the other

Linear Regression, Random Forest, and XGBoost are cheap, stable, and easy to sanity-check for short-horizon forecasting, but they do not plan a sequence of dependent actions. The QR-DQN agent handles the sequential decision (how much to trade now versus later) while leaning on the classical forecasts as features, so the system gets interpretable signals and learned timing instead of having to choose between them.

Almgren-Chriss for market impact

Rather than assume trades fill at the quoted price, the engine prices its own footprint with a well-studied closed-form impact model. That gives the agent an honest cost to trade against and keeps it from learning schedules that only look good because they ignore slippage.

Risk-sensitive RL with tunable risk aversion

QR-DQN learns the distribution of returns, not just the mean, and execution cost has fat tails. On top of that distribution sits a single risk-aversion knob that trades expected cost against the variance of cost, so a desk that cannot stomach a bad tail can dial aversion up and accept slightly higher average cost for a tighter distribution.

Walk-forward validation on real trades

Results come from 98 million real trades across three assets, evaluated walk-forward so the model is always tested on the future relative to its training window. That is the difference between a backtest that flatters itself and one that survives contact with unseen data.

Results

  • Beats TWAP by 10.2 basis points on Bitcoin (walk-forward).
  • 96.7% cost reduction versus naive execution.
  • Validated on 98 million real market trades across 3 assets.
  • 17 ablation studies, 176-test suite.

Repository