5.7 Optimal execution: Almgren–Chriss
Motivation
Trading fast reduces exposure to price moves during execution but increases impact; trading slowly does the opposite. Almgren and Chriss (2000) formulate this as a mean–variance problem and solve it in closed form under linear impact. The solution, a -shaped trajectory, is the backbone of institutional execution algorithms and a clean example of a constrained quadratic optimisation with a linear-recurrence solution.
5.7.1The execution problem#
Setup
Liquidate shares over in intervals of length , at times . Holdings , ; the -th child order sells . The unaffected price evolves as
with i.i.d. , so is price volatility in ₹ per , and is permanent impact (₹ per share sold). The -th child order executes at
where is a fixed cost (half-spread plus fees) and the temporary impact coefficient: trading at rate shares per unit time costs per share, and the effect does not persist. Implementation shortfall is . The trader minimises
5.7.2The optimal trajectory#
Proposition 5.5Almgren–Chriss, 2000
(a) For any deterministic schedule,
(b) If and , the unique minimiser of over schedules is
For the minimiser is the straight line (TWAP).
(c) As , and the trajectory converges to the solution of the continuous problem , , :
Proof
(a) Iterating (5.16), . Then
using and . With (5.17),
For the permanent-impact term, , so . Summing and telescoping, . Substituting gives (5.18). The are independent with mean 0 and variance 1 and the schedule is deterministic, so (5.19) and (5.20) follow.
(b) For a sell programme with non-increasing, , and does not depend on the schedule. So we minimise
with , . is a strictly convex quadratic when (the first sum is a positive definite quadratic form in the interior variables given fixed endpoints, and the second is positive semi-definite), so its unique minimiser is the solution of the first-order conditions. Differentiating with respect to , :
This is a linear second-order recurrence with constant coefficients. Trying gives . Writing , , so solves , which has a unique positive solution . The general solution is , equivalently . The boundary condition forces (since ), and gives , which is (5.21). The trajectory is strictly decreasing because is increasing, which confirms the assumption used to treat as constant. For , (5.22) becomes , whose solution with the boundary conditions is linear.
(c) As , , and from the defining equation gives . Independently, the Euler–Lagrange equation for is , i.e. , with solution (5.23) under the boundary conditions. (The continuous objective is the limit of : and .)∎
5.7.3Half-life and the efficient frontier#
Reading the solution
- is the trade's half-life scale: with the holdings decay roughly like , so most of the order is done within a few multiples of .
- : more risk aversion or more volatility means faster trading; more temporary impact means slower.
- The efficient frontier: as rises from 0, rises and falls. At the frontier has zero slope, so a small move away from TWAP reduces variance at second-order cost in expectation. Every risk-averse trader should front-load at least a little.
- In continuous time, for the solution (5.23), and (Problem 5.10).
5.7.4Liquidating 5 lakh shares in a day#
Worked example
Sell lakh shares of a ₹1,500 stock over one trading day (), in slices of about 29 minutes. Daily volatility 1.8%, so per share per . Take ₹ per share per (share/day), so that selling at a rate of 5 lakh shares a day costs per share (8.3 bp), and (the whole order moves the price permanently by ₹0.125). Results from ac_trajectory and ac_cost_mean_var:
| Risk aversion (per ₹) | First slice | Holdings after 6 of 13 slices () | sd(IS) | ||
|---|---|---|---|---|---|
| 0 (TWAP) | 0 | 7.7% | 53.8% | ₹6.5 lakh (8.7 bp) | ₹73.4 lakh (98 bp) |
| 1.71 | 13.2% | 39.5% | ₹7.3 lakh (9.7 bp) | ₹61.2 lakh (82 bp) | |
| 5.37 | 33.9% | 8.4% | ₹16.8 lakh (22.4 bp) | ₹33.0 lakh (44 bp) | |
| 16.07 | 70.9% | 0.1% | ₹44.8 lakh (59.7 bp) | ₹11.4 lakh (15 bp) |
Basis points are of the initial value ₹75 crore. The trade-off is stark: halving the risk from TWAP (98 bp sd to 44 bp) multiplies the expected cost by about 2.6 (8.7 to 22.4 bp). With this volatility, the risk of a slow execution is far larger than its expected cost; which point to choose depends on , i.e. on how much the desk dislikes a bad day relative to an expected cost.
Code Exercise m05_almgren_chriss (in the app: Exercises → m05_almgren_chriss) implements (5.19)–(5.22), and ac_numerical minimises directly with scipy.optimize.minimize (BFGS with an analytic gradient). The tests require the closed form and the numerical optimum to agree to of for several , check that gives TWAP, that random perturbations of the closed form always increase , that the frontier is monotone, and that with the discrete solution matches the continuous one (5.23) to .
Practitioner notes
- The parameters , and must be estimated, and impact is concave rather than linear (5.5). Practitioners use the AC structure with a power-law temporary impact and solve numerically, and they re-optimise during the day as prices and volumes arrive.
- Volume is not uniform. A practical schedule blends the AC urgency with the VWAP volume profile.
- The model assumes no alpha. If you expect the price to drift against you (you are buying because you expect a rise), add a linear drift term; the optimal schedule becomes more front-loaded (Almgren and Chriss 2000 treat drift as an extension; Problem 5.11 asks you to derive it).