Almgren-Chriss Optimal Execution Calculator
Compute the optimal trade schedule for a large order with the Almgren-Chriss model: hyperbolic trajectory, trading half-life, expected cost, and the risk frontier.
Optimal Execution Almgren Chriss Protocol
A clear path from inputs to results.
Compute the optimal schedule for liquidating (or accumulating) a large position using the Almgren-Chriss model, which trades off market-impact cost against timing risk. It returns the exact hyperbolic trading trajectory, the trading-urgency parameter kappa and its half-life, the expected implementation shortfall, and the variance of that cost, for execution traders, quants, and finance students.
How to use
- Enter the number of shares X to execute and the horizon T (in years) over which you want to complete the program.
- Set the number of intervals N that discretize the schedule.
- Enter the annualized volatility sigma of the stock, which drives the timing risk.
- Set the risk-aversion lambda: higher lambda means you fear price risk more and trade faster; lambda near zero gives near-linear (TWAP-like) execution.
- Enter the temporary-impact coefficient eta, the permanent-impact coefficient gamma, the half-spread epsilon, and any price drift alpha.
- Read the optimal trajectory x(t), the urgency kappa = sqrt(lambda*sigma^2/eta) and its half-life, the expected cost, and the cost variance; sweep lambda to trace the efficient frontier of cost versus variance.
The formula
Reference: Almgren, R. & Chriss, N. (2000/2001), "Optimal Execution of Portfolio Transactions," Journal of Risk 3(2), 5-39; the continuous-time hyperbolic-sine liquidation trajectory with linear temporary and permanent impact.
Worked example
Liquidating one million shares over a trading month
- X = 1,000,000 shares; horizon T = 1/12 year (about one month); N = 60 intervals; volatility sigma = 30%; risk aversion lambda = 1e-5; temporary impact eta = 1e-8; permanent impact gamma = 0; half-spread epsilon = 0.01; drift alpha = 0.
- 1
The urgency parameter is kappa = sqrt(lambda*sigma^2/eta) = sqrt(1e-5 * 0.30^2 / 1e-8) = 9.486833 per year, so the half-life is 1/kappa = 0.105409 year, about 1.265 months - longer than the horizon, meaning the schedule is only mildly front-loaded. The optimal path x(t) = X * sinh(kappa(T-t))/sinh(kappa*T) leaves 71.76%, 46.33%, and 22.72% of the position outstanding at one quarter, one half, and three quarters of the horizon (versus 75%, 50%, 25% for a straight-line TWAP), confirming modest front-loading. The expected cost is the spread term epsilon*X = 10,000 plus the accumulated temporary-impact term of 120,928.03, totaling 130,928.03, i.e. about 0.1309 per share. The cost variance from price risk is 2.3086e9, a standard deviation of roughly 48,048. The schedule ends with x(T) = 0 exactly.
kappa = 9.4868 per year, half-life 1.265 months, expected cost 130,928.03 (about 0.131 per share, of which 10,000 is spread and 120,928 is temporary impact), cost standard deviation about 48,048, and a trajectory that front-loads only slightly relative to TWAP given the long half-life.
Interpreting the result
The key output is kappa and its half-life: they summarize how aggressively you should trade. A short half-life relative to T means heavy front-loading - you pay more impact to cut risk; a long half-life (as here) means a nearly linear schedule because the position is not risky enough, or you are not risk-averse enough, to justify rushing. Raising lambda or volatility sigma, or lowering the impact coefficient eta, all increase kappa and pull trading earlier. The expected cost and its variance are the two axes of the Almgren-Chriss efficient frontier: every choice of lambda is a point on that curve, and there is no single right answer - only the trade-off between paying impact now and bearing price risk later.
Assumptions & limitations
- Price impact is linear: temporary impact is proportional to the trade rate (coefficient eta) and permanent impact proportional to volume (coefficient gamma), plus a fixed half-spread epsilon.
- The mid-price follows arithmetic Brownian motion with constant volatility sigma and optional constant drift; there is no mean reversion or intraday seasonality.
- Parameters are constant over the horizon and known in advance; the schedule is static (set once), not re-optimized as the market moves.
- The trajectory is the continuous-time hyperbolic-sine solution; the reported cost and variance come from the component's discrete N-interval integration, so very small N introduces minor discretization error.
- Impact coefficients must be calibrated to the specific stock and venue; the illustrative values here are chosen for clarity, not fitted to any particular security, and real costs depend heavily on that calibration.
Frequently asked questions
What problem does the Almgren-Chriss model solve?
It answers how fast to trade a large order. Trade too quickly and you move the price against yourself (market impact); trade too slowly and you are exposed to random price moves (timing risk). Almgren-Chriss finds the schedule that minimizes expected cost plus a risk penalty, producing a smooth trajectory between the extremes of immediate execution and slow TWAP.
How does risk aversion lambda change the schedule?
Lambda is the weight on cost variance in the objective E + lambda*V. A larger lambda means you dislike price risk more, so kappa rises and you trade earlier to reduce exposure, accepting higher impact cost. As lambda approaches zero the schedule approaches a straight line (minimum-impact TWAP). Sweeping lambda traces the entire efficient frontier.
Why is the trajectory a hyperbolic sine curve?
Minimizing a quadratic cost-plus-risk objective with linear impact leads to a linear second-order condition whose solution is sinh(kappa(T-t))/sinh(kappa*T). This curve equals X at t=0, decays to exactly 0 at t=T, and is convex, so inventory is reduced faster early and tapers near the end. When lambda is tiny, kappa approaches 0 and the curve flattens to the straight TWAP line.
What is kappa and the trading half-life?
kappa = sqrt(lambda*sigma^2/eta) is the urgency parameter, with units of inverse time. Its reciprocal 1/kappa is the trading half-life - the characteristic time over which the position is wound down. A short half-life relative to the horizon means aggressive front-loading; a long half-life means a near-linear schedule. In the worked example the half-life is about 1.265 months, slightly longer than the one-month horizon.
What is the efficient frontier here?
It is the set of achievable (variance, expected cost) pairs as lambda varies. Each lambda gives one optimal schedule, one expected cost, and one cost variance. The frontier is downward-sloping: you can only lower expected cost by accepting more variance, and vice versa. Choosing a point on it is a risk-preference decision, not a purely mathematical one.
Can I use this to buy as well as sell?
Yes. The model is symmetric: for a buy program the same trajectory describes how the to-be-acquired quantity is scheduled over time, with impact pushing the price up instead of down. The cost and risk trade-off is identical in structure; only the sign of the impact and any drift term flips.
Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.