Selling a large position is a mechanics problem
Sell too fast and you pay the market to absorb you; sell too slowly and the price wanders away. Almgren and Chriss turned the trade-off into a variational problem whose answer is a hyperbolic sine.
You hold a position you need to get rid of: a fund rebalancing, a desk unwinding inventory, a liquidation. Sell it all at once and you eat through the order book, paying a worse price on every unit. Sell it slowly and the price has time to move against you. Somewhere between “now” and “eventually” is a best schedule. Almgren and Chriss [1] showed that finding it is the same kind of problem as finding the path of a particle.
Two costs pulling in opposite directions
Let be the inventory still to sell, from to , so the selling rate is .
Impact. Trading fast moves the price you get. The simplest model charges a concession proportional to the rate, per unit, so the expected cost of the schedule is
Risk. Inventory you still hold is exposed to the price, which moves with volatility . The variance of the proceeds is
A trader who dislikes risk with aversion minimizes :
The Euler–Lagrange equation
That integral is an action. The Euler–Lagrange equation for it is
It is the equation of motion of a harmonic oscillator in imaginary time, or the temperature profile along a cooling fin. With the boundary conditions , the solution is
A single number controls the shape: , the horizon measured in units of the trader’s natural time scale . As (no risk aversion, or a short horizon) the hyperbolic sine becomes a straight line and the schedule is a constant-rate sale, TWAP. As grows, the schedule front-loads: sell hard early, then taper off exponentially with time constant .
What the urgency buys
Integrating the solution gives the cost and the risk relative to TWAP in closed form:
| Expected cost (× TWAP) | Risk, std. dev. (× TWAP) | Inventory left at | |
|---|---|---|---|
| 0 (TWAP) | 1.00 | 1.00 | 50% |
| 1 | 1.02 | 0.94 | 44% |
| 2 | 1.19 | 0.81 | 32% |
| 3 | 1.55 | 0.70 | 21% |
| 5 | 2.50 | 0.55 | 8% |
The first row of that table is the useful one. Going from TWAP to cuts risk by 6% for 2% more expected cost. Near TWAP the frontier is flat, for the same reason the Kelly parabola is flat at its top: at an optimum, a small step away costs nothing to first order. The price of urgency rises steeply after that.
Code
import numpy as np
def schedule(k_T, n=11): """Fraction of the position left at n evenly spaced times, for urgency k_T = kappa * T.""" t = np.linspace(0, 1, n) if k_T < 1e-9: return 1 - t return np.sinh(k_T * (1 - t)) / np.sinh(k_T)
def cost_and_risk(k_T): """Expected impact cost and standard deviation, both relative to TWAP.""" s2, q = np.sinh(k_T) ** 2, np.sinh(2 * k_T) / (4 * k_T) return k_T**2 / s2 * (0.5 + q), np.sqrt(3 / s2 * (q - 0.5))
for k_T in (1, 2, 3, 5): cost, risk = cost_and_risk(k_T) print(f"kT={k_T}: cost x{cost:.2f}, risk x{risk:.2f}, left at T/2 {schedule(k_T, 3)[1]:.0%}")What the model leaves out
Impact here is linear and instantaneous; in real markets it grows roughly like the square root of the traded size [2] and decays over time after you trade. Volatility is constant, and the price has no drift, so the schedule never tries to time the market. Each of these has its own literature, but the core result survives: the optimal schedule balances a cost that punishes speed against a risk that punishes delay, and the balance point is a hyperbolic sine.
References
- R. Almgren and N. Chriss, “Optimal execution of portfolio transactions,” Journal of Risk 3(2), 5–39 (Winter 2000). doi:10.21314/JOR.2001.041
- B. Tóth, Y. Lempérière, C. Deremble, J. de Lataillade, J. Kockelkoren and J.-P. Bouchaud, “Anomalous price impact and the critical nature of liquidity in financial markets,” Physical Review X 1, 021006 (2011). doi:10.1103/PhysRevX.1.021006