mr.piron.Back to the research desk
EXECUTION RESEARCH

Adaptive execution has to earn its complexity.

Reinforcement learning, order allocation, and the practical importance of realistic fills.

TECHNICAL RESEARCHAdvanced3 primary sources266 words
MR. PIRON / RESEARCH DESK2 min read
0102123ARTICLE, IN READING ORDER →↑ NUMBERED SOURCES0102123ARTICLE, IN READING ORDER →↑ NUMBERED SOURCES0102123ARTICLE, IN READING ORDER →↑ SOURCES
FIG. 0 EVIDENCE MAP · 2 SECTIONS · 2/3 SOURCES CITED · 5 CITATIONS · 1 EQUATION · 1 CODE LISTINGComputed from this article. Each bar is a section, as long as its share of the words. A curve joins a passage to a source it cites; a circle grows with the number of passages that cite it. Diamonds mark equations and squares mark code. 1 listed source is not cited in the text (dashed).
Sources cited, equations and code listings per section
SectionSources citedEquationsCode listings
1. Decompose implementation shortfall into spread, impact, and adverse selection1, 210
2. Enforce external risk envelopes and deterministic fallbacks1, 201

01 /Decompose implementation shortfall into spread, impact, and adverse selection

The path from a portfolio target to an executed position contains its own optimization problem. Order size, book depth, bid-ask spread, queue priority, and venue rules can alter or reverse the expected value of a strategy. Execution design must be evaluated alongside signal discovery under a unified cost ledger.

Recent reinforcement learning research studies how agents allocate between market and limit orders in simulated limit order books [1]. While these experiments clarify optimal state-dependent routing under stylized fill intensities, simulation results do not establish live outperformance unless passive queue priority and post-fill adverse selection are modeled explicitly.

A rigorous engagement begins with deterministic baselines such as TWAP and closed-form Almgren–Chriss trajectories [1, 2]. Every candidate policy is evaluated on identical parent-order mandates Q0Q_0 over horizon TT, measuring expected implementation shortfall and variance alongside terminal unexecuted inventory penalties.

Discrete implementation shortfall with terminal sweep penaltyEQ. 1.1
IS(π)=∑t=0T−1qt(pexec,t−p0)+qT(pT+ξqT−p0),∑t=0Tqt=Q0\mathrm{IS}(\pi)=\sum_{t=0}^{T-1}q_t\left(p_{\mathrm{exec},t}-p_0\right)+q_T\left(p_T+\xi q_T-p_0\right),\qquad \sum_{t=0}^T q_t=Q_0

Child fills q_t incur temporary impact and spread costs, while any leftover inventory q_T at the deadline T is forced through a penalty sweep ξ.

02 /Enforce external risk envelopes and deterministic fallbacks

We compare implementation costs, passive fill probabilities, order rejection behavior, and participation caps across calm and stressed liquidity regimes [1, 2]. Any adaptive policy requires evaluation on unseen volatility episodes where historical spread relationships widen.

In production, the execution service must also reconcile partial fills asynchronously, handle interrupted socket connections, and enforce hard exposure limits outside the learned policy. Intelligence is useful only when the complete order state machine remains observable and bounded.

  • Benchmark adaptive routing policies against TWAP and Almgren–Chriss schedules on identical parent orders.
  • Penalize unexecuted deadline inventory explicitly so policies cannot game cost metrics by withholding trades.
  • Maintain external participation caps and kill-switch state machines independent of the policy network.
python15 LINESILLUSTRATIVE · NOT EXECUTED
# Illustrative only; compares front-loaded risk-averse trajectory against uniform TWAP.
import numpy as np

Q0, T = 10_000.0, 10
eta, sigma, lam = 2.5e-6, 0.012, 1e-4
kappa = np.arccosh(1.0 + 0.5 * (lam * sigma**2) / eta)
t_grid = np.arange(T + 1, dtype=float)
ac_inventory = Q0 * np.sinh(kappa * (T - t_grid)) / np.sinh(kappa * T)
ac_trades = -np.diff(ac_inventory)
twap_trades = np.full(T, Q0 / T)

assert np.isclose(np.sum(ac_trades), Q0)
assert np.all(ac_trades >= 0.0) and np.isclose(ac_inventory[-1], 0.0)
assert ac_trades[0] > twap_trades[0]
print(f"first_slice_ac={ac_trades[0]:.1f}, first_slice_twap={twap_trades[0]:.1f}")
∎

Research is complete only when the assumptions, experiment, and limitations can be reconstructed.

This perspective is research commentary. It does not constitute investment advice or evidence of live strategy performance. Experimental methods require project-specific testing. Equations and code illustrate research formulations, not measured live returns.

More perspectivesExplore the engineering atlas