Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceProbability & MeasureStochastic ModelsMarket MicrostructureGuide
Guide
Derivatives pricing0 / 17
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Options on dividend-paying stocks, indices, currencies and futures14Implied volatility and the volatility smile15Stochastic volatility and the Heston model16Static replication: Breeden–Litzenberger and Carr–Madan17Exotic options: barriers, Asians and digitals
Portfolio & risk0 / 12
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08The Fama–French factor models09Value at Risk and expected shortfall10Systemic risk and contagion11Portfolio constraints and the no-short-sales frontier12Estimating expected returns and covariances
Fixed income0 / 10
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Non-parallel curve moves and key-rate durations06Bond futures and the cheapest-to-deliver07Interest rate swaps08Callable bonds and negative convexity09Credit risk: default probabilities and credit spreads10Real rates, inflation and inflation-linked bonds
Corporate finance0 / 10
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04Project risk: sensitivity, scenarios and Monte Carlo NPV05The weighted average cost of capital06Capital structure and the Modigliani–Miller theorems07Dividends, payout policy and the dividend discount model08Discounted cash flow valuation09Relative valuation with multiples10Real options: the value of flexibility
Probability and measure0 / 13
01Measuring the size of sets02σ-algebras and Borel sets03Lebesgue measure and null sets04Measurable functions05The Lebesgue integral06Convergence theorems07Probability spaces and Kolmogorov's axioms08Random variables and their distributions09Expectation, variance and inequalities10Independence and product measures11Modes of convergence and the law of large numbers12Conditional probability and conditional expectation13Measure theory in option pricing
Stochastic models0 / 17
01Random walks and Brownian motion02The law of large numbers and the central limit theorem03Probability spaces, σ-algebras and random variables04Filtrations, adapted processes and stopping times05Conditional expectation and martingales06Properties of Brownian motion07The reflection principle and first passage times08The Brownian bridge09The Itô integral10Itô's lemma11Kolmogorov equations and the Feynman–Kac formula12Change of measure and Girsanov's theorem13Monte Carlo option pricing14Simulating SDEs: the Euler–Maruyama scheme15Correlated Brownian motions and multi-asset models16Mean reversion: Ornstein–Uhlenbeck and Vasicek17Jumps and the Merton jump-diffusion model
Market microstructure0 / 11
01Market makers and liquidity02The limit order book03Queue position and fill probability04Adverse selection and informed trading05The Glosten–Milgrom model06Measuring and decomposing the bid–ask spread07Informed trading and Kyle's lambda08Price impact and optimal execution09Inventory risk and quote skewing10Optimal quoting: the Avellaneda–Stoikov model11Market making profit and loss attribution
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guides/Market microstructure/08

Price impact and optimal execution

Lesson 8 of 11 · 1 min read

A large order moves the price against itself: the more you buy, the higher the price you pay, and the more you sell, the lower. This lesson separates the two ways this happens, gives the empirical rule of thumb for how big the move is, and derives how to split an order over time. It builds on "The limit order book", where a market order walks through the queue of resting orders, and on "Informed trading and Kyle's lambda", where trades move the price because they carry information.

Prices are measured as fractions of the stock's price and quantities as multiples of the order itself, so a cost of 0.00250.00250.0025 means 25 basis points (bp) of the order's value.

Temporary and permanent impact

Temporary impact is what you pay for demanding liquidity quickly. A buy market order eats through the asks in the book, so its average price is above the quote before the trade. A few moments later new orders refill the book and the quote returns to roughly where it was. The cost is real, but it does not last.

Permanent impact is the part of the move that stays. If the market learns something from the trade, the price should move for good, which is exactly the linear price response λ\lambdaλ of Kyle's model. In a clean data set both are read off prices before the order, during it and some time after: the move that has disappeared after a while was temporary, the move that is still there is permanent.

Permanent impact is the same for every way of executing the order, because it depends only on the total traded. Temporary impact is not, and that is what execution is about: trading slowly keeps it small.

The square-root rule

Empirical studies of large equity orders find that the price move is not proportional to the order size but grows roughly with its square root:

ΔPP≈Y σQV.\frac{\Delta P}{P} \approx Y\,\sigma \sqrt{\frac{Q}{V}}.PΔP​≈YσVQ​​.

Here σ\sigmaσ is the daily volatility, QQQ the number of shares in the order, VVV the average daily volume, and YYY a constant of order 1. A stock with 2% daily volatility and an order of 5% of daily volume moves by about 2%×0.05≈0.447%2\% \times \sqrt{0.05} \approx 0.447\%2%×0.05​≈0.447%, or 44.7 bp, with Y=1Y = 1Y=1.

Concavity has a consequence: doubling the order does not double the impact per share, it only multiplies it by 2\sqrt 22​. The total cost of QQQ shares grows as Q3/2Q^{3/2}Q3/2, still faster than linearly, so splitting a big order over several days or hours lowers the cost per share.

Splitting an order

The rule says what an order costs when done at once; the Almgren–Chriss model says how to spread it out. A trader must sell XXX shares within a horizon TTT (one trading day below). Time is cut into NNN intervals of length τ=T/N\tau = T/Nτ=T/N, with times tj=jτt_j = j\tautj​=jτ. Let xjx_jxj​ be the number of shares still held at tjt_jtj​, so x0=Xx_0 = Xx0​=X and xN=0x_N = 0xN​=0, and let nj=xj−1−xjn_j = x_{j-1} - x_jnj​=xj−1​−xj​ be the number sold in interval jjj.

Between trades the price follows a random walk with volatility σ\sigmaσ per square-root day, and both impacts are assumed linear. Selling njn_jnj​ lowers the price for good by γ nj\gamma\,n_jγnj​ (permanent impact), and the trade itself is executed η nj/τ\eta\,n_j/\tauηnj​/τ below the price before it (temporary impact, which depends on the trading rate nj/τn_j/\taunj​/τ). A fixed fee per share is left out, since it is the same for every schedule.

Expected cost and risk

The cost of the liquidation is the initial value of the position minus the money collected. Adding up the two impacts gives two pieces, plus a random one from the price moves. Permanent impact costs γ nj\gamma\,n_jγnj​ on every share still held after trade jjj, and temporary impact costs η nj2/τ\eta\,n_j^2/\tauηnj2​/τ. Since xj−12−xj2=2xjnj+nj2x_{j-1}^2 - x_j^2 = 2x_j n_j + n_j^2xj−12​−xj2​=2xj​nj​+nj2​, adding over jjj gives ∑jxjnj=12(X2−∑jnj2)\sum_j x_j n_j = \tfrac12\left(X^2 - \sum_j n_j^2\right)∑j​xj​nj​=21​(X2−∑j​nj2​), so the expected cost is

E=12 γX2+η~τ∑j=1Nnj2,η~=η−12 γτ.E = \tfrac12\,\gamma X^2 + \frac{\tilde\eta}{\tau}\sum_{j=1}^{N} n_j^2, \qquad \tilde\eta = \eta - \tfrac12\,\gamma\tau.E=21​γX2+τη~​​j=1∑N​nj2​,η~​=η−21​γτ.

The first term does not depend on the schedule. The second is smallest when the squares are small, which happens when the trades are equal: slow, even selling minimises temporary impact. The random part of the cost comes from the price moving while shares are still held: in interval jjj the position xjx_jxj​ is exposed to a price change of variance σ2τ\sigma^2\tauσ2τ, so

V=σ2 τ∑j=1Nxj2.V = \sigma^2\,\tau \sum_{j=1}^{N} x_j^2.V=σ2τj=1∑N​xj2​.

The variance is smallest when the shares are sold early, because the holdings xjx_jxj​ are then small. The two goals pull in opposite directions: cost wants an even schedule, risk wants a fast one. This is the same kind of conflict as between return and risk in "Risk aversion and the optimal complete portfolio".

The optimal schedule

A trader who dislikes risk minimises E+λriskVE + \lambda_{\text{risk}}VE+λrisk​V, where λrisk\lambda_{\text{risk}}λrisk​ is the risk aversion. (This is not Kyle's λ\lambdaλ, the price response to order flow; the subscript keeps them apart.) Setting the derivative with respect to each interior holding xjx_jxj​ to zero gives

2η~τ(xj−1−2xj+xj+1)=2λriskσ2τ xj  ⟹  xj−1−2xj+xj+1=κ~2τ2 xj,κ~2=λriskσ2η~.\frac{2\tilde\eta}{\tau}\left(x_{j-1} - 2x_j + x_{j+1}\right) = 2\lambda_{\text{risk}}\sigma^2\tau\,x_j \;\Longrightarrow\; x_{j-1} - 2x_j + x_{j+1} = \tilde\kappa^2\tau^2\,x_j, \qquad \tilde\kappa^2 = \frac{\lambda_{\text{risk}}\sigma^2}{\tilde\eta}.τ2η~​​(xj−1​−2xj​+xj+1​)=2λrisk​σ2τxj​⟹xj−1​−2xj​+xj+1​=κ~2τ2xj​,κ~2=η~​λrisk​σ2​.

Trying xj∝e±κtjx_j \propto e^{\pm\kappa t_j}xj​∝e±κtj​ turns this into 2cosh⁡(κτ)−2=κ~2τ22\cosh(\kappa\tau) - 2 = \tilde\kappa^2\tau^22cosh(κτ)−2=κ~2τ2. With the boundary values x0=Xx_0 = Xx0​=X and xN=0x_N = 0xN​=0 the solution is

xj=X sinh⁡(κ (T−tj))sinh⁡(κT),cosh⁡(κτ)=1+12 κ~2τ2.x_j = X\,\frac{\sinh\big(\kappa\,(T - t_j)\big)}{\sinh(\kappa T)}, \qquad \cosh(\kappa\tau) = 1 + \tfrac12\,\tilde\kappa^2\tau^2.xj​=Xsinh(κT)sinh(κ(T−tj​))​,cosh(κτ)=1+21​κ~2τ2.

The parameter κ\kappaκ sets how fast the holding runs down. When λrisk→0\lambda_{\text{risk}} \to 0λrisk​→0, κ→0\kappa \to 0κ→0 and the formula becomes the straight line xj=X(T−tj)/Tx_j = X(T - t_j)/Txj​=X(T−tj​)/T, the even schedule. The larger λrisk\lambda_{\text{risk}}λrisk​ is, or the larger the volatility, or the smaller the temporary impact η\etaη, the larger κ\kappaκ is and the more of the order is sold at the start.

The efficient frontier of execution

Each value of λrisk\lambda_{\text{risk}}λrisk​ gives one schedule, with its own expected cost and standard deviation V\sqrt VV​. Plotting them gives a curve like the efficient frontier of a portfolio: no schedule has both a lower cost and a lower risk than a point on the curve, and the trader picks the point that suits the risk aversion. The even schedule is the end with the lowest cost and the highest risk; selling everything at once is the end with the highest cost and no risk from price moves.

The figure sells the order in 20 slices over one day. The left chart shows how much is still held at each time, for the chosen risk aversion (solid) and for the even schedule (dashed). The right chart is the frontier; drag the dot along it to change the risk aversion. At the defaults (λrisk=100\lambda_{\text{risk}} = 100λrisk​=100, 2% daily volatility, η=20\eta = 20η=20 bp) the expected cost is 49.3 bp with a standard deviation of 59.3 bp, and 67.5% of the order is sold in the first quarter of the day. The even schedule costs about 25 bp with a standard deviation of 111 bp, so the extra 24 bp of cost buys a cut in risk of almost half. Lower the risk aversion to see the schedule straighten, and raise the volatility to see it bend again.

Execution frontier: cost against riskOpen in Order Book
100.0
-23
2.0%
0.54
20 bp
550

The whole order is sold within one day in 20 slices; cost and standard deviation in basis points of the order value. Left: the remaining holding. Right: the cost-risk frontier; drag the dot along it.

Even schedule (λ_risk = 0)Risk-averse schedule
Expected cost
49.3 bp
Standard deviation
59.3 bp
Sold in the first quarter
67.5%

A worked example

First the rule of thumb, then the smallest possible schedule that shows the trade-off. In the toy case, X=2X = 2X=2 shares are sold in N=2N = 2N=2 intervals of length τ=1\tau = 1τ=1, with σ=1\sigma = 1σ=1, η~=1\tilde\eta = 1η~​=1 and no permanent impact.

Worked example

Square-root impact and a two-interval schedule

  1. Square-root rule for a 2% daily volatility stock and an order of 5% of daily volume, in per cent.

    2%×0.05\displaystyle 2\% \times \sqrt{0.05}2%×0.05​=0.447
  2. Sell 1 then 1: the holdings are x=(2,1,0)x = (2, 1, 0)x=(2,1,0) and n=(1,1)n = (1, 1)n=(1,1). The cost is η~∑nj2/τ\tilde\eta\sum n_j^2/\tauη~​∑nj2​/τ.

    E=12+12\displaystyle E = 1^2 + 1^2E=12+12=2
  3. The variance of the even schedule counts the holdings after trading, x1=1x_1 = 1x1​=1 and x2=0x_2 = 0x2​=0.

    V=σ2τ (12+02)\displaystyle V = \sigma^2\tau\,(1^2 + 0^2)V=σ2τ(12+02)=1
  4. Sell 2 then 0: the whole order goes in the first interval, so n=(2,0)n = (2, 0)n=(2,0) and the cost is higher.

    E=22+02\displaystyle E = 2^2 + 0^2E=22+02=4
  5. Nothing is held after the first interval, so there is no price risk.

    V=1⋅1⋅(02+02)\displaystyle V = 1\cdot 1\cdot(0^2 + 0^2)V=1⋅1⋅(02+02)=0
  6. The two schedules are equally good when 2+λrisk⋅1=4+λrisk⋅02 + \lambda_{\text{risk}}\cdot 1 = 4 + \lambda_{\text{risk}}\cdot 02+λrisk​⋅1=4+λrisk​⋅0.

    λrisk=2\displaystyle \lambda_{\text{risk}} = 2λrisk​=2=2

A trader with λrisk<2\lambda_{\text{risk}} < 2λrisk​<2 prefers to sell evenly, and one with λrisk>2\lambda_{\text{risk}} > 2λrisk​>2 prefers to sell at once. The sinh formula is the same decision with many intervals, where the best answer lies in between.

Summary

  • Temporary impact fades after the trade and depends on how fast you trade; permanent impact stays and depends only on the total traded.
  • Empirically the price move of a large order is about YσQ/VY\sigma\sqrt{Q/V}YσQ/V​, concave in the order size.
  • With linear impact the expected cost is 12γX2+(η~/τ)∑nj2\tfrac12\gamma X^2 + (\tilde\eta/\tau)\sum n_j^221​γX2+(η~​/τ)∑nj2​ and the variance is σ2τ∑xj2\sigma^2\tau\sum x_j^2σ2τ∑xj2​; the first prefers even trading, the second fast trading.
  • Minimising cost plus λrisk\lambda_{\text{risk}}λrisk​ times variance gives xj=Xsinh⁡(κ(T−tj))/sinh⁡(κT)x_j = X\sinh(\kappa(T - t_j))/\sinh(\kappa T)xj​=Xsinh(κ(T−tj​))/sinh(κT): a straight line for a risk-neutral trader and more front-loading as risk aversion or volatility grows.
  • The (risk, cost) pairs of all schedules form an efficient frontier, like the one for portfolios.
Try itWalk the book with market orders in the Order Book lab
3 questions on this lesson at the end of the series
Previous · 07Informed trading and Kyle's lambdaNext · 09Inventory risk and quote skewing
Connections

Price impact and optimal execution

Open the full graph
Builds on
07.07Informed trading and Kyle's lambda07.02The limit order book02.04Risk aversion and the optimal complete portfolio
Leads to
07.09Inventory risk and quote skewing
See it in the knowledge graph
Labs for this lesson
Order Book