Basic Execution Algorithms (TWAP, VWAP)

An institution wanting to buy a million shares cannot simply send a market order. It would walk the book, move the price against itself, and announce its intention to everyone watching. Instead the order is worked over time by an algorithm.

The tradeoff being managed

Two costs pull in opposite directions:

Market impact falls the slower you trade. Small slices absorb available liquidity without pushing price.

Timing risk rises the slower you trade. Spend all day buying and the price may move away for reasons unrelated to you.

Total cost=market impact+timing risk\text{Total cost} = \text{market impact} + \text{timing risk}

Every execution algorithm is a particular answer to where the optimum sits, and urgency is the parameter that moves it.

TWAP

Time-weighted average price splits the order evenly across a time window. Buy a million shares over four hours and it trades roughly 250,000 per hour, in smaller slices within that.

TWAP=1Tt=1TPt\text{TWAP} = \frac{1}{T}\sum_{t=1}^{T} P_t

Simple and predictable. That predictability is also its weakness: a pattern of same-sized trades at regular intervals is detectable, and once detected it can be traded against.

VWAP

Volume-weighted average price distributes the order in proportion to expected market volume, trading more when the market is busy.

VWAP=iPiViiVi\text{VWAP} = \frac{\sum_i P_i V_i}{\sum_i V_i}

Since volume follows a reliable intraday shape in most markets, heavy at the open and close and quiet mid-session, VWAP trades more at the ends of the day. Trading in proportion to everyone else means your order is a roughly constant fraction of volume, which both reduces impact and makes you harder to spot.

VWAP is also the standard benchmark for execution quality. A buy filled below the day's VWAP beat the market; above it underperformed.

Key takeaway

TWAP spreads evenly over time; VWAP spreads in proportion to volume. VWAP usually has lower impact because it trades when liquidity is there, and it is the more common benchmark.

Implementation shortfall

The more honest measure of execution cost compares the fill against the price when the decision was made:

Shortfall=average fill priceprice at decision time\text{Shortfall} = \text{average fill price} - \text{price at decision time}

This captures everything: spread paid, impact caused, and the price drift while you were working the order. Beating VWAP while the price ran away from you all day is not a good outcome, and shortfall is the measure that says so.

Why a market maker cares

You are not running these algorithms, but you are trading against them constantly, and recognising them is valuable.

Algorithmic flow is usually uninformed. An index fund rebalancing is not trading on a view. This is profitable flow to take the other side of, which is why identifying it matters.

It is predictable. Steady same-sized buying at regular intervals suggests a worked order. Knowing more buying is coming changes how you quote, and how much inventory you are willing to accumulate against it.

It creates temporary pressure. A large worked buy order pushes price up during execution and it often reverts afterwards, since the move was liquidity-driven rather than informational. That reversion is exactly the mean reversion a market maker relies on.

Tip

Distinguishing a worked institutional order from genuinely informed buying is one of the more valuable inferences on a desk. The tell is usually regularity: information arrives in bursts, algorithms arrive on a schedule.

Test your knowledge

A trader works a large buy over a three-hour window. Hour 1 traded at $100 on 1,000 shares, hour 2 at $102 on 2,000, and hour 3 at $101 on 3,000. What is the VWAP over the window?
Every execution algorithm answers the same question. What are the two costs it trades off, and how does each respond to trading more slowly?