A portfolio manager needs to sell X shares of a stock over a time horizon [0,T]. Selling too fast incurs large market impact costs (moving the price against themselves). Selling too slowly leaves the position exposed to price risk for longer. This is the optimal execution problem: find a trading schedule that balances market impact against timing risk.
This is a ubiquitous problem in practice: unwinding a large position post-trade decision, rebalancing a portfolio after a factor model update, or executing a delta hedge for a large options position. The Almgren-Chriss (2001) framework is the standard model for this problem on institutional trading desks.
Conventions and Assumptions
Initial position:X>0 shares to sell, X0=X.
Time grid: discrete times 0=t0<t1<⋯<tN=T with equal spacing τ=T/N.
Shares sold in period k:nk=Xk−1−Xk≥0 (non-negative, selling only).
Trade rate:vk=nk/τ (shares per unit time).
Mid-price dynamics in the absence of trading: Sk0=Sk−10+στξk where ξk∼i.i.d.N(0,1).
Volatility σ: annualised. Daily vol is σ1/252 for equities.
Rates are zero (P&L is measured in dollar terms, no discounting).
Market Impact Model
Permanent and Temporary Impact
Almgren-Chriss decompose market impact into two components:
Permanent impact: trades shift the mid-price permanently. Every share sold at time k reduces the mid-price for all future periods. The cumulative permanent impact of selling n1,…,nk shares is:
ΔSkperm=−g(τnk)⋅τ=−g(vk)⋅τ,
where g(v) is the permanent impact function (shares per time → price change). For the linear model: g(v)=γv, so selling at rate v permanently moves the price by −γv⋅τ per period.
Temporary impact: the execution price in period k differs from the (already impacted) mid by an additional amount due to consuming liquidity immediately. This cost is paid once and does not affect future mid-prices:
Pkexec=S~k−h(τnk),
where S~k is the mid-price at time k (already shifted by permanent impact), and h(v) is the temporary impact function. For the linear model: h(v)=ϵsgn(v)+ηv, where ϵ is a fixed half-spread cost and ηv is the linear temporary impact.
The Full Price Process
Let S~k be the mid-price after permanent impact. Starting from S0:
The first two terms are deterministic costs; the last is random (timing risk from mid-price moves while the position is open).
Theory: Optimal Execution
Objective Function
Almgren-Chriss optimise the mean-variance objective over the implementation shortfall:
U=E[IS]+2λVar[IS],
where λ≥0 is the risk-aversion parameter (units: inverse variance, or equivalently, the penalty per unit of variance). Large λ penalises timing risk heavily, favouring fast execution; small λ accepts more risk in return for lower market impact costs.
using the identity ∑knk∑j=1knj=21[(∑knk)2+∑knk2]−21∑knk2 and noting ∑knk=X. The first term is a constant (independent of schedule), so minimising expected shortfall alone reduces to minimising ∑knk2, which favours spreading trades as evenly as possible (TWAP).
Variance of shortfall:
Var[IS]=σ2τ∑k=1NXk2,
where Xk=X−∑j=1knj is the remaining inventory after period k. This follows because the timing risk is στ∑knk∑j=1kξj=στ∑jξjXj, and the ξj are independent.
Continuous-Time Formulation
In continuous time with selling rate v(t) (shares per unit time):
E[IS]=2γX2+η∫0Tv(t)2dt,
Var[IS]=σ2∫0Tx(t)2dt,
where x(t)=X−∫0tv(s)ds is the remaining inventory. The objective is:
minv(⋅){η∫0Tv(t)2dt+2λσ2∫0Tx(t)2dt},
subject to x(0)=X, x(T)=0, v(t)=−x˙(t)≥0.
Closed-Form Solution via Calculus of Variations
The Euler-Lagrange equation for the functional ∫0T[ηv2+2λσ2x2]dt is:
2ηx¨(t)=λσ2x(t),
The full lesson requires Premium
The complete derivation, the C++ / Python implementation, the validation tables, the quiz, and the interview-angle notes are part of Premium. Start a Premium plan to unlock every module in this track.