Selling a big order: the Almgren–Chriss trade-off
A fund needs to sell a million shares by the close. Dump them all at once and the price collapses under the order. Spread them evenly over the day and the price can drift a long way before you finish. Almgren and Chriss (2000) wrote this down as a trade-off between expected cost and risk, and the optimal schedule turns out to be a hyperbolic sine.
Two costs pulling in opposite directions
Let x(t) be the shares you still hold, starting at X and ending at 0 at time T, and let be how fast you sell. Two things cost you money.
Market impact. Selling fast pushes the price down while you trade. The simplest model says the price you get is lower than the market price by , linear in your trading rate. Over a short interval you sell shares at that discount, so the impact cost is . Because it’s quadratic in v, it pays to spread trading out: selling twice as fast for half as long doubles the cost.
Price risk. While you hold x shares, the price moves by , so your proceeds move by . That has mean zero but variance . The longer you hold inventory, the more uncertain the final proceeds.
Putting them together, the expected cost and variance of a schedule are
Selling evenly (TWAP, ) gives the smallest possible expected cost, , but variance . Selling everything immediately has no risk but infinite impact in this model. Everything else lies in between.
A permanent impact term (each share sold moves the price down permanently by γ per share) adds to the cost whatever the schedule is, as long as it’s linear. So it doesn’t change the optimal schedule, and it’s left out here.
The calculus of variations gives a sinh
Minimise , which is the integral of the “Lagrangian” . The Euler–Lagrange equation gives
The general solution is . Fitting x(0) = X and x(T) = 0 gives step 4. The answer depends on the parameters only through κT, a dimensionless urgency number:
- κT ≈ 0 (risk-neutral, or impact very expensive): a straight line, TWAP.
- κT around 1–3: front-loaded. Sell faster early, while there’s lots of inventory at risk, and slow down as the risk shrinks.
- κT large: . Inventory decays exponentially with half-life , and the deadline barely matters.
Shares still to sell, x(t) / X
Efficient frontier: expected cost vs risk
The frontier on the right is every schedule you could choose, traced out as κT goes from 0 to 8. Starting from TWAP (grey dot), a little urgency buys a lot of risk reduction for very little cost: at κT = 1, risk drops 6% for a 2% increase in cost. Further along, each unit of risk costs more. At κT = 3 you pay 55% more impact to cut the risk by 30%. Which point is best depends on λ, and nothing else.
import numpy as np
def ac_schedule(X, T, sigma, eta, lam, n=100):
"""Almgren–Chriss optimal liquidation. Returns times, holdings, expected cost, s.d. of cost."""
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, n + 1)
if kappa * T < 1e-8:
x = X * (1 - t / T) # TWAP
else:
x = X * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
dt = T / n
v = -np.diff(x) / dt # selling rate in each slice
exp_cost = eta * np.sum(v**2) * dt
sd_cost = sigma * np.sqrt(np.sum(x[:-1]**2) * dt)
return t, x, exp_cost, sd_costReading κ = √(λσ²/η)
- More volatile stock → larger κ → trade faster. Doubling σ doubles κ.
- More risk-averse trader → larger κ, but only as √λ. Four times the risk aversion doubles the urgency.
- More expensive impact (illiquid stock, larger η) → smaller κ → spread the order out.
- Longer horizon → larger κT, so a schedule that was nearly linear over an hour becomes very front-loaded over a week.
For large κT the cost and risk relative to TWAP have simple limits: cost ≈ κT/2 × TWAP, and risk ≈ × TWAP.
What the simple model leaves out
- Impact isn’t linear. Empirically, impact grows roughly like the square root of the order size relative to volume. That changes the shape of the optimal schedule, but not the basic trade-off.
- Volume isn’t flat. Real days have a U-shaped volume profile, so practical schedules trade in proportion to expected volume (VWAP) and tilt from there.
- Alpha. If you expect the price to fall, you sell faster than the risk alone justifies. A drift term adds a linear piece to the Lagrangian.
- Static vs adaptive. With mean–variance and this model, the optimal static schedule is close to optimal. With other objectives, updating as prices move can do better.
Where people slip in interviews
- “TWAP is optimal.” It minimises expected cost, but only for a risk-neutral trader. Any risk aversion front-loads the schedule.
- Wrong scaling of impact cost. Temporary impact per share is ηv, and you trade v dt shares, so the cost rate is ηv², not ηv.
- Forgetting the boundary condition. The solution must hit zero exactly at T. That’s what picks sinh over a pure exponential.
- Thinking permanent impact changes the schedule. With linear permanent impact it adds a constant ½γX², whatever you do.
Try these before you open the answer
Warm-upShow that TWAP minimises expected impact cost for a fixed T.Show answer
Minimise subject to x(0) = X, x(T) = 0. By Cauchy–Schwarz, , so , with equality when is constant. That is TWAP.
VarianceWhat is the variance of the TWAP cost?Show answer
ScalingA trader doubles their risk aversion and the stock's volatility doubles too. What happens to κ?Show answer
, so it goes up by .
Half-lifeWith κ = 2 per hour and a long horizon, roughly how long does it take to sell the first half of the order?Show answer
For large κT, , so half is gone after hours, about 21 minutes.
ExactWith κT = 2, what fraction of the order is still unsold at the halfway point t = T/2?Show answer
TWAP would still hold 50%.
Permanent impactEach share sold moves the price down permanently by γ per share. Show that this adds ½γX² to the cost for every schedule.Show answer
When x shares are left, the price has been pushed down by γ(X − x). Selling the next shares at that depressed price costs . Integrating from x = X down to 0 gives , which doesn’t depend on the path.
StretchAdd a known downward drift: the price falls at rate μ per unit time. How does the Euler–Lagrange equation change?Show answer
Holding x shares now loses in expectation, so the Lagrangian gains a term : . The equation becomes , so . The solution is the sinh schedule shifted down by a constant, , before the boundary conditions are fitted, which sells even faster early on.
The closed-form schedule, cost and risk were checked against a direct numerical optimisation over 100 trading slices.