Optimal Execution Algorithms: TWAP, VWAP & Market Impact › The Execution Problem

Michael BrenndoerferJanuary 20, 20255 min read
Quantitative FinanceAll chapters
Part 12 of 15Market Making and High-Frequency Trading
Chapter 68Optimal Execution Algorithms: TWAP, VWAP & Market Impact › The Execution Problem
Reading section 2 of 10 · The Execution Problem · 5 minSection 2 of 10 · 5 min

Book contents

Section 2 of 10 · 5 min read

Optimal Execution Algorithms: TWAP, VWAP & Market Impact › The Execution ProblemOne section · Sections in this chapter2 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Consider an institutional trader who needs to sell 500,000 shares of a stock that trades approximately 2 million shares per day. Selling the entire position immediately would require crossing roughly 25% of the daily volume in a single burst, almost certainly moving the price against you and resulting in poor execution.

The alternative is for you to spread the execution over time, but this introduces a new risk. The price might move unfavorably while you wait. This tension between market impact and timing risk lies at the heart of optimal execution.

Market Impact vs. Timing Risk

Market impact is the adverse price movement caused by your trading activity. Timing risk (also called price risk or volatility risk) is the risk that the asset price moves unfavorably while waiting to complete execution. Aggressive execution minimizes timing risk but maximizes impact, while patient execution minimizes impact but maximizes timing risk.

Out[2]:
Visualization
Line chart showing market impact cost declining hyperbolically, timing risk rising linearly, and total cost forming a U-shape with a minimum at the optimal execution horizon.
Execution cost trade-off between market impact and timing risk. Market impact costs decline with longer execution duration as lower trading rates consume less liquidity, while timing risk costs increase with duration due to prolonged exposure to price volatility. The total execution cost reaches its minimum at the optimal horizon, balancing the marginal reduction in impact against the marginal increase in timing risk.

Understanding why this fundamental tension exists requires us to think carefully about the mechanics of trading. When a trader submits a large buy order, the immediate effect is to consume available liquidity on the ask side of the order book. As the order depletes offers at the best price, subsequent fills occur at increasingly worse prices. This is market impact in its most direct form. The trader's own activity causes the execution price to deteriorate. The more aggressively the trader buys, the more liquidity is consumed in a short window, and the more severe the impact.

Conversely, if the trader waits patiently, spreading the order over hours or even days, each individual trade is small enough to have minimal impact. However, during this extended waiting period, the underlying price is free to move based on market forces entirely unrelated to the trader's activity. Perhaps unfavorable news arrives, or the broader market sells off, or other participants independently decide to sell the same stock. This is timing risk, the random price movement that accumulates while the trader waits to complete execution.

Let's formalize the execution problem mathematically. You need to execute a position of XX shares over a time horizon TT. At any time tt, let xtx_t denote the remaining inventory. The execution schedule specifies the trading rate vt=−dxt/dtv_t = -dx_t/dt, which represents how quickly shares are being executed at each moment. The negative sign appears because inventory decreases as trading proceeds. This trading rate must satisfy the fundamental constraint that execution completes by the horizon:

∫0Tvt dt=X\int_0^T v_t \, dt = X

where:

  • vtv_t: trading rate at time tt measured in shares per unit time
  • TT: execution time horizon
  • XX: total shares to be executed

This integral constraint simply states that the cumulative amount traded over all time must equal the total order size. It ensures that the trader neither under-executes, leaving inventory unfinished, nor over-executes, trading beyond the intended position.

The trader's objective is to choose the trajectory {vt}\{v_t\} that minimizes some cost function, typically involving both expected execution cost and its variance. The expected cost captures the average amount paid above the initial price, while the variance captures the uncertainty around that average. Different algorithms embody different trade-offs between these objectives, and different traders may prefer different points along the efficiency frontier depending on their risk tolerance and urgency.