Objective
Derive the Almgren–Chriss optimal liquidation schedule, compute its cost and risk for a concrete order, explain what the urgency parameter does, and show when TWAP and VWAP are the optimal answers. The order-flow lesson introduced temporary and permanent impact and the square-root law; here we turn those into a schedule.
Intuition
You must sell shares by time . Selling fast pushes the price down (temporary impact grows with trading rate). Selling slowly leaves you holding shares while the price wanders (risk grows with inventory held over time). A risk-neutral trader minimises expected cost and spreads trades evenly. A risk-averse trader accepts a little more expected cost to cut the variance, which means selling more at the start, when inventory is largest.
The model
Let be shares still held, with , , and trading rate . The unaffected price follows arithmetic Brownian motion with volatility (dollars per share per ).
- Permanent impact: each share sold lowers the price by for good. Its total cost is whatever the schedule, so it does not affect the optimisation.
- Temporary impact: shares sold at rate receive less per share, so the cost per unit time is . (A fixed half-spread cost per share adds , also schedule-independent.)
Measured against the arrival price, the cost of the schedule (its implementation shortfall) has
the variance coming from price moves on the shares not yet sold. Minimise the mean-variance objective , where is risk aversion in units of 1/dollars.
The solution
The integrand is . The Euler–Lagrange equation gives
and with the boundary conditions,
- is urgency, in units of 1/time; is the time scale over which the position decays. Everything depends on the single number .
- (risk-neutral, or tiny volatility, or very expensive impact) gives : TWAP, constant-rate selling.
- Large gives roughly exponential decay : sell most of it early.
- A handy check: the fraction still held at the halfway point is , which is for TWAP and falls as urgency rises.
The closed forms for the schedule's cost and risk (excluding the fixed permanent term) are
which reduce to and for TWAP. Tracing from 0 upwards gives the efficient frontier of execution: the lowest expected cost for each level of risk.
The original paper works in discrete time with trades; the schedule has the same sinh form with a slightly adjusted , and converges to this one as the intervals shrink.
Worked example
liquidating a million shares in a day
Sell shares of a 50-dollar stock over day. Daily volatility is 2%, so dollar per share per . Temporary impact is dollars per share per (share per day), so selling at a million shares a day costs 10 cents a share. Compute cost, risk and the schedule for , 1, 2 and 4, and find the risk aversion that gives each.
Show solutionHide solution
TWAP (): expected temporary cost $100,000 (20 bps on $50m). Risk: $577,000 standard deviation. Note the imbalance: the risk is almost six times the expected cost, which is why risk-averse desks front-load.
Urgency. , so correspond to , and per dollar.
import math
def ac_schedule(X, T, sigma, eta, risk_aversion, n_steps=10):
"""Almgren-Chriss (continuous time, linear temporary impact): holdings path, expected cost, cost st. dev."""
kappa = math.sqrt(risk_aversion * sigma**2 / eta)
if kappa == 0:
hold = lambda t: X * (1 - t / T)
cost = eta * X**2 / T
var = sigma**2 * X**2 * T / 3
else:
s = math.sinh(kappa * T)
hold = lambda t: X * math.sinh(kappa * (T - t)) / s
cost = eta * X**2 * kappa * (math.sinh(2 * kappa * T) / 4 + kappa * T / 2) / s**2
var = sigma**2 * X**2 * (math.sinh(2 * kappa * T) / (4 * kappa) - T / 2) / s**2
path = [hold(T * k / n_steps) for k in range(n_steps + 1)]
return kappa, path, cost, math.sqrt(var)
X, T, sigma, eta = 1_000_000, 1.0, 1.0, 1e-7
for kT in (0, 1, 2, 4):
lam = (kT / T) ** 2 * eta / sigma**2
kappa, path, cost, sd = ac_schedule(X, T, sigma, eta, lam)
held = [round(p / X, 2) for p in path[::2]]
print(f"kappa*T={kT} lambda={lam:.1e} cost={cost:,.0f} sd={sd:,.0f} held at t=0,.2,..,1: {held}")
Output:
kappa*T=0 lambda=0.0e+00 cost=100,000 sd=577,350 held at t=0,.2,..,1: [1.0, 0.8, 0.6, 0.4, 0.2, 0.0]
kappa*T=1 lambda=1.0e-07 cost=101,855 sd=542,666 held at t=0,.2,..,1: [1.0, 0.76, 0.54, 0.35, 0.17, 0.0]
kappa*T=2 lambda=4.0e-07 cost=118,936 sd=470,444 held at t=0,.2,..,1: [1.0, 0.65, 0.42, 0.24, 0.11, 0.0]
kappa*T=4 lambda=1.6e-06 cost=201,208 sd=352,722 held at t=0,.2,..,1: [1.0, 0.45, 0.2, 0.09, 0.03, 0.0]
(A direct numerical integration of and along each path reproduces these figures.)
Reading the frontier. At the desk sells 35% of the order in the first fifth of the day instead of 20%, paying about $19,000 more in expected impact to cut the standard deviation by about $107,000. At it sells 55% in the first fifth and doubles the expected cost. Near TWAP the frontier is flat: the first bit of front-loading reduces risk almost for free ( costs $1,855 more for $35,000 less standard deviation). That is the general shape: at the risk-neutral optimum, the marginal cost of reducing variance is zero.
Midpoint check for : of the order is still held at noon, against 0.5 for TWAP.
What moves the schedule
- Higher volatility or higher risk aversion: rises, trade faster.
- Higher temporary impact (illiquid name, wide spread): falls, trade more evenly.
- Longer horizon: TWAP's impact cost falls as but its variance grows with . Picking the horizon is itself a cost-risk decision.
- Alpha: if you expect the price to drift against you (you are selling and expect it to fall, or your signal decays), add a drift term and the optimum front-loads even when risk-neutral. If it drifts in your favour, back-load.
The linear-impact assumption is what makes the solution clean. Empirically impact is concave in size (the square-root law); with power-law temporary impact the Euler–Lagrange equation is nonlinear, but the qualitative trade-off is unchanged.
VWAP: optimal when impact depends on participation
Volume is not flat through the day: in most equity markets it is high at the open, low at midday and highest into the close. Impact depends on how large you are relative to the market, so a more realistic temporary cost uses the participation rate: per-share cost , where is market volume rate. For a risk-neutral trader:
The Lagrangian's first-order condition is , so : trade in proportion to market volume, which is the VWAP schedule, at a constant participation rate. TWAP is the special case of flat volume. In practice VWAP algorithms trade to a forecast volume curve; risk aversion and alpha tilt the schedule away from it in the same way as above.
Worked example
TWAP against VWAP on a U-shaped day
Split the day into four buckets with market volume shares 40%, 20%, 15% and 25%. Temporary cost in bucket is proportional to , where is the amount you trade in it. How much more does TWAP cost than VWAP?
Show solutionHide solution
VWAP: , so the cost is .
TWAP: , so the cost is .
TWAP is about 13.5% more expensive, almost all from trading a quarter of the order in the 15% midday bucket, where it is a much larger share of the market. By Cauchy–Schwarz, whenever four shares sum to one, with equality only for flat volume, so TWAP can never beat VWAP under this cost model.
Implementation shortfall and benchmarks
The Almgren–Chriss cost is implementation shortfall: the difference between the paper portfolio traded at the arrival (decision) price and what you actually achieved. A full decomposition (Perold) separates:
- delay cost: the price move between the decision and the start of execution;
- execution cost: impact and spread on the shares traded, plus drift during execution;
- opportunity cost: the move on shares you never traded;
- fees and commissions.
Execution desks are measured against a benchmark, and the benchmark shapes behaviour:
- Arrival price (IS) rewards balancing impact against risk and against alpha decay; it is what a portfolio manager actually experiences.
- VWAP rewards matching the volume curve. It is easy to achieve and hard to game against, but it hides cost: if your own order is a large share of the day's volume, it moves the VWAP itself, and on a trending day you can "beat VWAP" while paying a large shortfall.
- Close suits index funds that are marked at the close and drives volume into the closing auction.
How this comes up in interviews
- "Derive the optimal liquidation schedule." Write expected cost and variance, form the mean-variance objective, get , apply the boundary conditions. Then interpret and the two limits.
- "Why does a risk-averse trader front-load?" Variance accrues on inventory held; selling early cuts it, at the price of a faster (more expensive) rate.
- "When is VWAP optimal?" When temporary impact depends on participation rate and you are risk-neutral with no alpha.
- "Your algo beat VWAP by 5 bps but the PM is unhappy. Why?" The price fell all day while you sold; your shortfall against arrival was large, and possibly your own selling drove the VWAP.
Knowledge check
An Almgren–Chriss schedule has . What fraction of the order is still held at ?
Knowledge check
A risk-neutral trader executes by TWAP and doubles the horizon. What happens to the expected temporary impact cost and to the variance of the cost?
Knowledge check
Which change makes the Almgren–Chriss optimal schedule closer to TWAP?
Knowledge check
Temporary impact per share is proportional to your trading rate divided by market volume. You are risk-neutral with no view on price. Which schedule minimises expected cost?
Key takeaways
- Almgren–Chriss: minimise ; the solution is with urgency .
- gives TWAP (cost , variance ); larger front-loads. Permanent impact does not depend on the schedule.
- Near TWAP, reducing risk is almost free; far from it, it is expensive. Trace the efficient frontier, do not pick one point blindly.
- With participation-based impact, the risk-neutral optimum is VWAP.
- Implementation shortfall against arrival price is the cost that matters; VWAP benchmarks can hide it.
Finished reading?
Answer the 4 knowledge checks to complete this lesson (0 done).