Act VI · Market Microstructure
Part 37 of 43Market Impact and Execution
Trading ten percent of a day's volume costs thirty basis points. What does forty percent cost, and how should the order be split?
Not four times as much: about twice. The cost of a large order grows like the square root of its size, in every market where it has been measured, and the part asks what kind of book produces that law. Impact is partly permanent and partly transient; a propagator model describes how each trade's effect decays, and the decay cannot be arbitrary or a round trip would make money. Almgren and Chriss trade the cost of going fast against the risk of going slow. When impact decays, the best schedule is a block, a trickle and another block. A reinforcement-learning executor is trained and compared with both.
What you need. Part 36; Part 8 for the control chapters.
What you will be able to do
Undergraduate
- State the square-root law of market impact and use it to estimate the cost of an order.
- Explain TWAP, VWAP and implementation shortfall.
Master's
- Derive Almgren-Chriss optimal schedules and their efficient frontier.
- Fit a propagator model to trade data and compute the cost of a schedule under transient impact.
PhD
- State the no-dynamic-arbitrage conditions on impact kernels (Gatheral) and derive the optimal schedule under transient impact, including Obizhaeva and Wang's solution.
Industry
- Read a transaction-cost report; choose an algorithm and a participation rate for a given order and urgency.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Undergraduate 18 min · Master's 47 min · PhD 60 min · Industry 28 min.
- 0Ten percent costs thirty basis points; what does forty cost?Undergraduate3 min
- 1MetaordersUndergraduate4 min
- 2The square-root lawUndergraduate7 min
- 3The propagatorMaster's4 min
- 4No dynamic arbitragePhD5 min
- 5Almgren and ChrissMaster's6 min
- 6A book that recoversMaster's5 min
- 7A learned executorMaster's4 min
- 8The algorithms, and the billIndustry6 min
- 9Rule 37: price the trade before you make itIndustry4 min
- For the researcher: the optimal schedule under transient impactPhD7 min
- Recap, desk questions, problemsAll tracks4 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Reading · 中文 · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.
Ten percent costs thirty basis points; what does forty cost?Undergraduate3 min
Market impact and execution: how much a large order moves the price against the trader who sends it, and how to send it so that it costs the least.
A question asked of execution traders. Suppose buying a tenth of a day's volume has thirty basis points of terminal impact. What would four tenths imply? Linear scaling says a hundred and twenty. Holding the empirical square-root prefactor and volatility fixed gives 60: twice the terminal price displacement for four times the size. This extrapolation is a model illustration, especially at such large participation. Terminal impact is different from the average execution shortfall paid while the order builds.
What this part finds. Across ten public Bitcoin trade-date files, the binned same-minute signed-volume association has slope 0.81; it does not identify a parent order's causal cost. In the chosen latent-book discretization, the fitted large-order slope is 0.42. Optimal schedules are theorems under specified models: Almgren and Chriss for mean-variance risk, and Obizhaeva and Wang for exponential resilience. In a separate random stream of the same fitted simulator, Q-learning costs 52.7 total half-ticks against TWAP's 50.7. This comparison is simulation, with no real-market deployment claim.
Why it matters. A strategy's capacity depends on the size at which execution costs consume expected alpha; earlier parts used a square-root approximation for that trade-off. For sufficiently large orders, impact can dominate fees and spreads, although this varies by market and regime. Brokers' algorithms, cost analysis and routing all try to manage this bill and the uncertainty around it.
Three beliefs to examine. Impact and spread are separate components, and their relative sizes depend on the order. Slicing always helps: a size-only square-root formula holds terminal impact fixed when duration changes, but actual rate dependence, information leakage, liquidity and risk still matter. And one cheap execution proves skill: random price moves can dominate one order's shortfall. Judge suitable groups of orders, preserving uncertainty and selection effects.
Where this sits. Part thirty-five asked who trades with whom; Part thirty-six opened the order book. This part sends a large order through it, and Part thirty-eight sits on the other side, as the market maker who absorbs it.
Fifty years of the subject. Alan Kraus and Hans Stoll measured the impact of block trades in 1972; André Perold defined implementation shortfall; Dimitris Bertsimas and Andrew Lo, then Robert Almgren and Neil Chriss, posed execution as optimal control. Then the propagator, Jim Gatheral's no-dynamic-arbitrage conditions, the square-root law measured across markets, and Obizhaeva and Wang's resilient book. And latent liquidity, microstructure invariance, and reinforcement learning.
The plan: metaorders and what public data shows; the square-root law and latent liquidity; the propagator; which impact models are allowed; Almgren and Chriss, then Obizhaeva and Wang; a learned executor, the algorithms brokers sell, and transaction-cost analysis; and the optimal schedule under transient impact, proved.
In the House, the execution desk opens: it receives every order the portfolio desks send, schedules it, and reports what it cost.
1MetaordersUndergraduate4 min
No institution buys a large position in one order. It splits the decision into hundreds or thousands of child orders over hours or days. The whole is called a metaorder, and its cost is the subject of this part.
The vocabulary. A parent order of total size Q is sent as child orders. Realized participation divides Q by the market volume during execution; specify whether that denominator includes our own trades. Signed terminal displacement is the end-minus-start price in the order's direction. That observable contains market news and other traders' flow as well as any mechanical impact, so displacement alone is not a causal estimate.
How cost is measured for a buy. Perold's implementation shortfall compares executed shares with a paper portfolio at the decision price, plus an explicitly chosen terminal mark for unfilled shares. The displayed formula excludes fees until added separately; sells require the signed convention. Delay, execution, timing and opportunity are accounting and modeling decompositions. A public tape does not separately identify mechanical impact from news. For large orders impact may dominate commissions, but the comparison must use consistent dollars or basis points.
An illustrative shape reported in some metaorder studies. During execution, average signed displacement can rise concavely. Afterwards it may partially revert. Moro and colleagues, and Bershova and Rakhlin, discuss such decay; the fraction and measurement horizon depend on conditioning and the sample. The two-thirds level here is illustrative, not a universal permanent fraction. The trader pays an average of fill prices rather than the terminal peak, and price reversion does not directly allocate a third of the order's total cost.
Who is on the other side. Sellers receive the transaction prices a buyer pays, but the difference from a benchmark is not automatically their net profit; hedging, inventory risk and subsequent prices matter. Reversion can be consistent with liquidity provision, while persistent displacement can reflect information or correlated future trading. This is an economic interpretation, not an identified decomposition. Kyle's specific equilibrium gives linear permanent pricing of order flow; richer models allow concavity and transience.
What we can measure. Parent-order links usually require brokers' or funds' records. The public aggregate-trade tape does not identify those parents. Here aggregate impact means the conditional association of a window's signed volume with its price change, using all traders together. Ten date files from May 2023 yield 14,390 one-minute intervals and mean recorded volume about 374 thousand bitcoin per file. These are recorded spans, not an assertion of complete daily coverage; partial files and gaps affect day normalization.
How researchers see metaorders at all. Proprietary records, a broker's or a fund's own child orders linked to their parents: the gold standard. Leaked account data, as from the Mt. Gox exchange. Or proxies from the tape, such as runs of same-sign trades or broker codes: noisy, and biased toward the orders that were easy to spot.
Aggregate flow and prices on Bitcoin. For ten-second, one-minute and five-minute windows, plot conditional mean price change against buy-minus-sell volume divided by their sum. Days are pooled with bin-count weights, using the nearest populated center. These finite bins suggest a saturating pattern; Patzelt and Bouchaud discuss related associations. The largest one-minute bin mean is about 101 ticks. This is same-window association with no causal intervention, held-out forecast or robust uncertainty band, and a flat conditional mean is not a hard limit on price moves.
And against absolute net volume. Group minutes by the magnitude of their signed volume, then show median magnitude and mean price change multiplied by its sign, on logarithmic scales. The smallest bin is excluded from the slope fit. The resulting finite-bin slope is 0.81, between one half and one in this sample. No parent orders are identified, and no confidence interval establishes a universal exponent. It is a descriptive contemporaneous association, distinct from the causal execution cost of one metaorder.
Quantitative pause one. One percent of daily volume has terminal displacement ten basis points. Keeping the model inputs fixed, compute the four-percent and nine-percent values under square-root and linear scaling.
2The square-root lawUndergraduate7 min
The pause answer. Four times the size gives twice the terminal displacement, twenty basis points. Linear scaling gives forty. Be careful with units: average price shortfall per share grows with the square root of total size. For a path c times root q, integrating execution prices gives total impact cost two-thirds c Q to the three-halves, and average cost two-thirds c root Q. It is displacement divided by total quantity that decreases, not cost per share.
Chapter two. The most robust empirical regularity in market microstructure, and a puzzle about why it holds. Then a model of hidden liquidity that explains it.
The empirical approximation. Terminal signed price impact is often modeled as Y times daily return volatility times the square root of order size over daily volume. Use matching base-volume units for Q and V. Loeb, Torre, Almgren and colleagues, and Toth and colleagues document related patterns. Y is calibrated for the measurement convention and sample; it is not a universal constant. The displayed size-only formula omits duration and participation. Those variables can matter in richer impact surfaces, and the same Y cannot be assumed for terminal displacement and average execution cost.
How universal. Across thousands of stocks and dozens of futures, exponents near one half over several decades of size. On Bitcoin, Jonathan Donier and Julius Bonart reconstructed about a million metaorders from the account-level records leaked from the Mt. Gox exchange, and found a square root there too. With limits: very small orders show linear impact, some data fit a logarithm better, and the prefactor varies.
An illustrative extrapolation for Bitcoin, setting Y to one. A tenth of a percent of mean recorded volume, about 10 million dollars at the reference price, gives terminal displacement about 5 basis points. One percent gives 17. Ten percent gives 54. The daily volatility here is a square-root-of-1440 extrapolation of minute volatility, while volume is mean recorded file volume; incomplete spans and intraday seasonality limit this calibration. These are model outputs, not measured executions or average shortfalls.
Why is it a puzzle? Kyle's model gives a straight line. A square root means the market absorbs large orders more cheaply than any fixed depth would. The visible book is no help: it holds a tiny fraction of a day's volume, and a metaorder of one percent would empty it many times over. So the liquidity must be latent: traders who would buy or sell at some price, and reveal it only when the price comes near.
Dimensions organize assumptions but do not determine a square-root law. If volume share and normalized duration are the only chosen variables, normalized impact can be a function of them; other liquidity and market scales may enter. Dropping duration is an empirical approximation, not a consequence of units. A heuristic adds both diffusive price risk and liquidity supply proportional to elapsed time, then eliminates time. Those added assumptions suggest a square root. Dimensional consistency alone leaves the function undetermined.
What the visible comparison actually measures. Ten bitcoin is a rounded illustrative scale for the two best queues, not full displayed depth across all levels. Against mean recorded trade-file volume of 374 thousand bitcoin, this is 0.003 percent. Quotes refresh and deeper orders may exist, so this ratio is not a count of how many times a metaorder must empty the full book. Latent liquidity is one model of replenishment and hidden intentions, not an inference established by the ratio alone.
The picture of latent liquidity. Hidden intentions to buy below the price and to sell above it. Jonathan Donier, Julius Bonart, Iacopo Mastromatteo and Bouchaud showed that if these latent orders keep arriving, being cancelled and revising their prices at random, the density near the price is a V: it grows linearly with the distance from the price. A buyer must eat the offers between the old price and the new one: a triangle.
A static triangular-book calculation. Assume nonnegative offer density L times distance from the old price. Buying every offer up to delta consumes one half L delta squared. Invert to obtain delta equal to the square root of two Q over L. This assumes a static linear profile over the whole consumed region; the dynamic latent model requires a separate argument. A proposed scaling L proportional to daily volume divided by daily variance introduces a calibration constant and matching time conventions. Units permit it but do not establish it.
Now the unchanged finite-difference latent-book simulation: fixed execution duration, diffusion, finite boundaries and a source near the zero of density. A log fit to the four smallest sampled orders gives slope 1.02. The four largest give 0.42. These are finite-grid fits, affected by source placement and boundaries, and are not a convergence proof of one half. The static triangle is a reference curve; the small-to-large crossover is qualitatively related to Bucci and colleagues' empirical discussion.
The same simulated order stops near time one. Its sampled price reaches 8.8, then falls to 3.7 by the end of the recorded path. A diffusion model on an effectively unbounded linear profile can have slow inverse-root decay; this finite horizon and fixed-boundary discretization do not establish that asymptotic rate. Persistent real-market displacement may involve information or future correlated trading, neither included in this illustration.
A conditional fair-pricing calculation. Assume an execution path c root q, with no separate spread or fees. Its quantity-weighted average displacement is two-thirds of the terminal peak. If one additionally imposes Farmer and colleagues' fair-pricing relation that the eventual conditional price equals this average fill price, two-thirds remains. That relation is an equilibrium modeling assumption; it is not implied by the square root alone or by a generic assertion that neither side profits.
A different scaling hypothesis. Trading activity W is volatility times dollar volume, with units and reference scales fixed. Kyle and Obizhaeva's invariance motivates a number B of bets per day proportional to relative activity to the two-thirds power. In a reduced business-time representation, order size in bets is Q B over V, and volatility per bet is daily volatility divided by root B. Thus normalized impact includes a B to the minus one-half prefactor as well as a function of size in bets. This schematic representation needs calibration; invariance alone does not force that function to be a square root.
Quantitative pause two. A static offer density is L times distance from the old price, with L equal to two units per tick squared. A buyer consumes nine units. Integrate the triangle and find the displacement in ticks.
3The propagatorMaster's4 min
A linear transient-impact model can reconcile persistent order signs with diffusive returns by a decaying kernel, under explicit scaling assumptions. That is one possible mechanism rather than a unique inference about efficient prices. We will distinguish the observed response function from a finite fitted projection and its illustrative superposition.
The model. Price is represented by a convolution of earlier trade signs with a lag kernel, plus noise under specified stationarity and convergence assumptions. The response is an unconditional signed average over all starting trades, not simply the conditional move after a buy unless additional symmetry holds. It includes correlated later flow and news. A theoretical long-memory sign process has autocorrelation proportional to lag to minus gamma, with gamma between zero and one. A short fitted range does not establish that asymptotic law.
Measured on 3,429,887 aggregate-trade records from four date files. The mid comes from a 100-millisecond quote grid: the code selects the second preceding grid index, clips at available boundaries, and concatenates days after removing overnight price jumps. The signed response reaches about 14 ticks at sampled lag 500. Later sampled values bend down. This is descriptive, with no robust uncertainty interval or causal intervention; stale snapshots, partial spans and joins can affect it.
A finite linear projection. The unchanged code uses centered signs, a thousand-lag Toeplitz correlation system and cumulative coefficients. The inferred kernel peaks at 0.72 ticks at lag 77. This projection does not causally isolate one trade. A log regression over lags one hundred to one thousand, flooring kernel values at a small positive number, gives decay estimate 0.17. Omitted state, finite truncation and regularity assumptions remain; no uncertainty interval or out-of-sample forecast is supplied.
An illustrative superposition through the fitted kernel. Add one positive impulse every five trade-clock units for six hundred units, then stop. Summing shifted sampled kernels gives the displayed normalized path; its final value is about 86 percent of the peak. This is an algebraic counterfactual holding the fitted kernel and other flow fixed. It does not simulate an interacting parent order, measure executable fills or establish a universal post-trade fraction.
Three limitations. Aggregate-trade records merge same-price taker fills; a multilevel sweep may produce several records. Several records can share a stale quote snapshot, and the lookup uses the second preceding grid index rather than a message-level pretrade quote. Four date files include a weekend, partial recorded spans and artificial event-time joins. One average fit can mix regimes, and it provides neither causal identification nor a robust confidence band.
The conditional scaling argument. Assume a stationary long-memory sign process with exponent gamma, a regular power-law propagator with beta, and a well-defined return construction. In the relevant scaling regime, the correlated-flow contribution has variance exponent two minus gamma minus two beta. Equating it to one gives beta equal to one minus gamma over two. Diffusive variance alone is weaker than a martingale or absence of predictability, and an additional noise term may matter. Our finite-lag estimates are 0.17 and 0.10. Their numerical proximity is not a statistical validation of asymptotic efficiency.
What this model can say. Past correlated flow can be encoded through a lag kernel, while surprise models encode unexpected signs directly. For a regular power-law kernel with beta between zero and one, a fixed-rate stream has impact growing roughly as time to one minus beta in its scaling range. At fixed duration a linear convolution is linear in the stream's amplitude, so it cannot by itself produce a square root in size across amplitudes. Changing duration along with quantity can change the apparent exponent; the experimental comparison must hold the right variables fixed.
Two ways to say it. The transient impact model of this chapter: every trade's impact decays by a fixed kernel. Or history-dependent impact: only the surprise in each sign moves the price, so an expected trade costs little. Lillo and Farmer called it asymmetric liquidity: the side that is expected to be hit fills up. Both reconcile predictable flow with unpredictable prices; they differ in what they predict for a single trader's metaorder.
Quantitative pause three. Assume sign exponent gamma equals point six and the flow variance scaling exponent is two minus gamma minus two beta. Find beta for linear variance growth, and explain why this alone does not prove unpredictable returns.
4No dynamic arbitragePhD5 min
A box-shaped decay kernel can give a suitably timed multi-leg round trip negative expected model cost. A simple buy, wait, sell pair is not enough for a nonincreasing kernel; the counterexample needs the interactions of several legs. The requirement is to examine the whole quadratic cost functional under the model's trading and self-impact conventions.
The setting is deterministic signed finite-variation trading against linear transient impact and a martingale unaffected price. The causal price contains earlier trades. Expected impact cost uses the symmetric double integral, including half the self-impact of a block. Spread, fees, risk and any predictive drift are omitted. A zero-total round trip should have nonnegative expected cost. This is a model consistency condition, distinct from an executable risk-free arbitrage in a market with frictions.
First, permanent impact. Suppose trading at rate v moves the price permanently by f of v. Gur Huberman and Werner Stanzl showed that unless f is linear, buying fast and selling slowly, or the reverse, makes money. And with linear permanent impact the cost is one half kappa X squared whatever the schedule: it cannot be optimised away. Only the transient part depends on how one trades.
An odd nonlinear permanent-rate illustration, f of v equals v times absolute v. Buys and sells therefore move prices in opposite directions. Buy one unit at rate one for time one: displacement rises from zero to one and average purchase displacement is one half. Sell it back at rate minus one tenth for time ten: displacement falls to point nine and average sale displacement is point nine five. With no spread, fees or noise, expected sale proceeds exceed purchase cost by point four five. Merely ending flat at a higher price would not have established profit; comparing the integrated cash flows does.
A box kernel lasting three-tenths of the horizon. The unchanged code takes its most negative eigenvector, removes the mean so the trades sum to zero, and normalizes total absolute turnover to one. This constructs a candidate; it does not solve the exact constrained cheapest-round-trip problem. The candidate cost is -0.06 per unit absolute turnover, negative in this frictionless linear model. Spread and other costs are omitted, but the kernel has failed this model consistency check.
Positive definiteness and round trips require a distinction. A nonnegative quadratic cost for every signed trading measure is the positive-definite condition. It is sufficient for nonnegative costs of zero-total round trips; the latter alone is conditional positive definiteness on the zero-mass subspace. For a continuous even kernel, Bochner's theorem represents positive definiteness by a nonnegative spectral measure. An ordinary Fourier density requires additional integrability or an appropriate generalized interpretation. The box transform changes sign, and our explicit zero-total candidate has negative cost. Decaying exponentials and shifted power laws with positive parameters provide useful positive-definite families.
A stronger schedule property. Under the relevant nonnegative, decreasing, convex-kernel hypotheses and well-posed trading problem, purchase optima can be chosen without intermediate sales. Positive definiteness alone does not guarantee this property. Some positive-definite kernels permit lower-cost purchases that include sales, called transaction-triggered manipulation. This differs from a negative-cost round trip. A Gaussian kernel is positive definite but concave near zero and illustrates the distinction on a finite grid; nonconvexity alone does not force every optimum to oscillate.
The Gaussian kernel on eleven grid dates. The unconstrained numerical optimizer buys 3.27 units and sells 2.27 back, net one. Its model cost is 0.129 versus the equal-slice cost 0.145. Intermediate sales show transaction-triggered manipulation in this model, not a negative round-trip cost. A desk that requires monotone execution needs suitable kernel assumptions or an explicit no-sales constraint.
Refining the Gaussian grid produces increasingly large cancelling trades. At twenty-one dates the largest computed trade is about 13,033 units for net quantity one. But fine Gaussian matrices are severely ill-conditioned: these floating-point solves are numerical illustrations, not a proof of the continuum infimum or nonexistence. Strict positivity on each distinct finite grid does not guarantee coercivity or attainment over all signed finite measures. Keep analytical existence results separate from this table.
Now a chosen positive-parameter surrogate, not the unrestricted measured kernel. Use one plus lag over the fitted peak scale, raised to minus the positive fitted exponent 0.17. This removes the initial rising section and imposes a functional family. That family is decreasing and convex for positive scale and exponent. Its even extension satisfies Polya's positive-definite criterion and appropriate no-intermediate-sale results. This validates properties of the chosen model, not a proof that the observed market or raw fitted kernel is free of manipulation.
Lessons for model use. Check the quadratic cost functional and distinguish round-trip positivity, strict convexity, existence and monotone execution. Positive-parameter exponential and shifted-power-law families satisfy useful sufficient conditions; that does not validate their empirical calibration. With nonlinear instantaneous impact inside a transient kernel, Gatheral's no-manipulation restrictions require explicit rate, decay and admissibility assumptions. They are not a license to combine arbitrary concave impact and exponential decay.
Quantitative pause four. A box kernel equals one for lags below tau and zero afterwards, with unit self-impact. Trade plus one, minus one, plus one, minus one, spaced point seven tau apart. Compute net quantity, absolute turnover and the quadratic cost. Ignore spread and fees.
5Almgren and ChrissMaster's6 min
A deterministic mean-variance execution model trades expected temporary cost against price risk. Its risk-averse seller front-loads relative to TWAP under the stated positive effective-cost coefficient. Robert Almgren and Neil Chriss made this trade-off explicit; the answer depends on the model's clock, risk preference and calibration.
The discrete model. Unaffected price innovations are independent, zero mean and unit variance, with sigma in price per square root of the chosen time unit. Sales add linear permanent displacement. Execution has linear temporary rate cost, and a specified interval convention for when noise is borne. Deterministic holdings fall from X to zero. The displayed mean-variance formulas match that convention; they are not identities for arbitrary adaptive execution or jump processes.
The objective. Expected shortfall has permanent term one half gamma X squared and temporary term eta-tilde over tau times squared trades, where eta-tilde equals eta minus gamma tau over two. Require eta-tilde positive for this strictly convex discrete problem. The variance uses post-trade holdings under the implemented noise convention, sigma squared tau times their squared sum. Minimize expected dollars plus lambda times squared-dollar variance, with nonnegative lambda. Lambda therefore has units inverse dollars.
The solution. Differentiation gives the displayed second-difference equation with coefficient lambda sigma squared over eta-tilde. Its exact grid solution is a hyperbolic sine with cosh kappa tau equal to one plus lambda sigma squared tau squared over twice eta-tilde. The continuous small-step approximation is kappa equal to root lambda sigma squared over eta. One over kappa is an e-folding time, not an exact half-life. In a long-horizon exponential approximation the half-life is log two over kappa; for a finite sinh path it must be solved from the path itself.
The same answer in continuous time, by Part eight's calculus of variations. Minimise the integral of the cost of speed, eta times the rate squared, plus the cost of risk, lambda sigma squared times the holding squared. The Euler-Lagrange equation is a particle pulled toward zero by a spring. With the order full at the start and empty at the end, the solution is the hyperbolic sine.
An illustrative sell of five thousand bitcoin over sixty one-minute intervals. Volatility is obtained from minute price changes in the recorded trade spans. Temporary eta is inferred from a contemporaneous signed-volume bin by a half-move heuristic, not causally estimated execution cost. With zero risk aversion the model gives TWAP. Increasing lambda front-loads the displayed schedules. The shapes illustrate this assumed model; they are not validated forecasts of market-order costs.
The model's efficient frontier. Each point is a deterministic schedule's expected temporary cost against its shortfall standard deviation. The plotted family begins at a very small positive lambda, not exact zero; exact TWAP is the lambda-zero reference. Front-loading exchanges higher modeled mean cost for lower modeled variance. Near the minimum-cost schedule the first cost change is second order, while risk can fall at first order. The conclusion holds within the stated deterministic mean-variance setting.
The model numbers. Equal slices cost 21 thousand dollars, 1.6 basis points, with standard deviation 267 thousand. At lambda ten to minus six, modeled cost is 35 thousand and standard deviation 178 thousand. The continuous urgency approximation has e-folding time 19 minutes. This is not the exact finite-horizon half-life; the exact path must be used to compute a fraction sold by any particular minute. All figures inherit the descriptive eta calibration and minute clock.
What lambda means. It has units: dollars of expected cost per squared dollar of uncertainty. At ten to the minus six, the schedule's risk term is worth about 32 thousand dollars. Read it as a certainty equivalent: what the desk would pay, in expected impact, to remove the uncertainty. Choosing lambda is choosing that price.
Compare two different quantities. The linear temporary-cost illustration gives average shortfall 1.6 basis points. A Y-equals-one square-root extrapolation gives terminal displacement 20 basis points for 1.3 percent of mean recorded volume. These use different calibration and measurement conventions. Under an ideal path c root q, average impact is two-thirds of terminal displacement, before spread and fees. Persistence, rate dependence and identification also differ. The numerical gap alone cannot attribute missing costs to persistence or validate either estimate.
A practical model template. An average-cost estimate may add half-spread, an average-impact coefficient times sigma root Q over V, and fees. Calibrate that coefficient for average shortfall; do not silently reuse a terminal-impact coefficient. Almgren and colleagues fitted rate-dependent temporary impact with exponent around three fifths under their data and conventions. A schedule and an empirical cost model can be combined, but their clocks, units, measurement targets and uncertainty must agree. The continuous shape is not automatically optimal for the empirical square-root surface.
Three extensions. With impact a power of the rate, Almgren showed the curve changes shape but still front-loads for risk. Bertsimas and Lo, earlier, minimised expected cost alone with a predictable drift: without one, the answer is TWAP. And the mean-variance schedule is static. Almgren and Julian Lorenz showed that re-optimising as prices move, selling faster after gains, does better, at the price of time-consistency.
Beyond variance. Alexander Schied and Torsten Schöneborn showed that with exponential utility the static schedule is optimal, and with other utilities the schedule adapts to wealth. Minimising a tail measure of the shortfall front-loads more when prices can jump. And in practice desks do not choose a lambda: they set an urgency, a half-life or a participation rate, from the signal's decay and the order's size.
Quantitative pause five. In continuous Almgren-Chriss, horizon sixty minutes and lambda sigma squared over eta equals point zero one per minute squared. Find kappa, the fraction held at twenty minutes, and the exact half-life using the sinh path.
6A book that recoversMaster's5 min
Almgren and Chriss's temporary impact vanishes the instant after each trade. Real books recover over time: liquidity taken is replaced at some rate. Anna Obizhaeva and Jiang Wang built the schedule for that world, and its answer surprises.
The model. A book with depth q: a buy of size x eats the offers and lifts the ask by x over q. The displacement then heals: new offers arrive and close the gap at a rate rho, the resilience. That is Chapter four's transient impact with an exponential kernel: convex, decreasing, and allowed.
The answer to the pause: blocks. Open with a block, while the book is undisturbed. Then trade at exactly the rate at which the book recovers, so the displacement stays constant. And close with another block of the same size: after the last trade there is no future left for its impact to cost you. The cost is X squared over the depth times two plus rho T. With rho T of ten, each block is 8.3 percent of the order.
On a grid of two hundred dates, the numerical optimum. Two spikes, at the ends, and a flat rate between, below the steady TWAP rate. As the grid refines, the blocks and the cost converge to the formula: on a thousand dates the cost differs from it by 0.001 percent.
By resilience. At exactly zero resilience, the constant kernel has the same cost for every schedule of fixed total quantity; two half-order endpoint blocks are just one limiting choice, and uniqueness fails. For positive rho, exponential-kernel strict positivity gives the unique measure-valued optimum. As rho T grows, blocks shrink and cost is asymptotic to X squared over q rho T. Matching a nonzero temporary-impact coefficient requires holding one over q rho fixed while taking the fast-recovery limit; fixed q and rho tending to infinity instead makes this cost vanish.
A tentative displayed-depth proxy, with important limits. The code converts the first two points of a median normalized depth curve into a one-step exponential rate, clipping the ratio and using a fallback if depth overshoots. The output is 30 per second. It is not a fitted lower confidence bound or identified causal resilience. Multiplying by an hour gives 108,832. Substituting this proxy into a distinct exponential-displacement model produces very small blocks. Median queue refilling and the decay of one trader's price displacement are different objects, so this substitution is only illustrative.
And with Bouchaud's power-law propagator instead of an exponential. The exponential keeps a flat rate between its blocks. The power law trades in a U: blocks at both ends, and a rate that dips in the middle, because old impact lingers longer. Against TWAP, the optimal schedule saves 10 percent of the cost under the exponential and 4 percent under the power law.
Selected quote-grid jumps in two date files. There are 2,419 events where the mid moves at least ten ticks in a 100-millisecond grid step, separated by over thirty seconds and away from boundaries. These need not be observed message-level sweeps. Median total best-queue depth, normalized by each event's preceding-depth median, starts near 71 percent. The displayed recovery statistic is a first threshold crossing, not proof of sustained recovery. Mean signed price displacement is about 46 ticks after two minutes. Overlapping later horizons, conditional event selection and future flow matter; drift does not identify news or rule out mechanical impact. Depth recovery and price recovery are distinct statistics.
Adding signals changes the optimization problem. Specify an adapted conditional price-drift forecast and its decay. Under particular linear-quadratic control assumptions, Cartea and Jaimungal, and Lehalle and Neuman, derive a base schedule plus a forecast-dependent tilt. There is no universal additive correction across all impact models. Part thirty-six's book variables are candidates for such forecasts; its contemporaneous OFI relation and limited microprice evaluation are not automatically deployable predictive alpha.
And other executors. When many funds trade the same way, each one's impact is everyone's cost: Pierre Cardaliaguet and Lehalle solved the equilibrium as a mean-field game, the tool of Part eight. Markus Brunnermeier and Lasse Pedersen showed how traders who learn of a forced seller sell first and buy back later: secrecy is part of execution. And public, crowded flows, like index changes, pay a recurring tax for trading with the crowd.
Quantitative pause six. Sell five thousand bitcoin uniformly over sixty minutes. Price volatility is twelve dollars per bitcoin per square root minute. Integrate the squared holdings times sigma squared, and give the shortfall standard deviation in dollars. This is the continuous benchmark; a discrete convention differs slightly.
7A learned executorMaster's4 min
A fitted queue simulator provides a separate numerical illustration. After sixty thousand training episodes, its learner costs 52.7 total half-ticks against 50.7 for TWAP on another simulator random stream. This is a comparison within one model and training seed, with no proof of optimality and no real-market test.
The literature. Yuriy Nevmyvaka, Yi Feng and Michael Kearns applied tabular reinforcement learning to Nasdaq order books in two thousand and six, and improved on simple strategies. Deep versions followed, such as Brian Ning, Franco Lin and Jaimungal's double deep Q-learning, with gains over TWAP and Almgren and Chriss reported. The catch: a learner is only as good as the market it practises in.
The environment. The market is Part thirty-six's queue-reactive book, fitted to the seventeenth of May. The task: sell 20 units in 20 steps, with the rest dumped at the end. A sale eats the bid queue; each time a queue is emptied the price falls half a tick and the order walks on. That is the impact. The cost is the implementation shortfall, in half-ticks.
The learner. It sees the step, the inventory left, and the queue imbalance in three buckets. Each step it sells nothing, one, two or four units. And it learns by Part eight's Q-learning, exploring less and less over sixty thousand episodes.
The training curve. Each point averages five hundred exploration episodes of the same fitted queue simulator. Costs are noisy and the curve approaches the TWAP reference. Training noise, finite learning and restricted state and actions can all matter. This curve alone does not show that there is nothing useful to learn, certify convergence to an optimum, or compare real-market execution quality.
Evaluation on five thousand episodes per policy, with a new simulator seed but the same fitted model. TWAP costs 50.7, Q-learning 52.7, front-loading 54.2, thin-bid selling 55.8, and immediate dumping 60.2 total half-ticks. The plus-minus values are individual Monte Carlo standard errors, not uncertainty in calibration, learning seeds or real-market performance. Reusing one starting seed does not align paths after different state-dependent actions consume different random draws; a paired-difference error is not available here.
What the profile records. Bars average the learner's chosen sales at each decision, capped by remaining inventory. The collection code does not add any forced final dump to these bars, although final liquidation is included in evaluation cost. The bar sum can therefore be below the twenty-unit parent order. The plot describes this trained policy's decisions; it does not prove that waiting is costless or the fitted market is conditionally driftless in every state.
Interpreting the result. This learner did not beat TWAP in this particular simulator run. A state-dependent queue model may have conditional imbalance drift even when an overall symmetric distribution has zero average drift; queue resets do not establish that no exploitable structure remains. Finite learning, coarse observations, restricted actions and noise are possible explanations; the result does not isolate their causes or prove TWAP near-optimal. Improving state, impact dynamics and evaluation is a research direction requiring fresh authorization for new experiments, not a new market trial performed here.
Possible evaluation improvements. Common random numbers require deliberately coupled exogenous innovations, not merely setting the same seed before policies that consume different numbers of draws. Measure the variance of paired differences rather than assuming cancellation. A learner may search residual decisions around a strong analytic baseline. Richer impact dynamics need empirical validation and genuine future-market tests. These are proposals; the current evidence comes only from the unchanged original simulator computation.
Designing a better experiment. A richer state: the spread, the recent imbalance, the microprice's lean, and short-term volatility. A reward with a risk penalty, so the learner faces Almgren and Chriss's trade-off. And comparisons on the same random paths with TWAP, with Almgren and Chriss at the same risk, and with a simple imbalance rule.
Quantitative pause eight. A VWAP plan allocates a thousand bitcoin according to an expected volume curve. One hour has seven point five percent expected share. Find the planned quantity and explain why forecast errors can change realized participation.
8The algorithms, and the billIndustry6 min
For the original empirical volume-curve example, a thousand-bitcoin plan allocates 74 bitcoin to the fourteen-to-fifteen UTC hour and 23 to the four-to-five UTC hour. The chosen-volume pause uses a seven-point-five-percent hour, giving seventy-five bitcoin. A VWAP plan follows expected volume. Realized participation changes when the forecast or total volume changes; following a forecast does not guarantee constant realized share.
Chapter eight. The theory becomes products: a handful of execution algorithms that every broker sells, the routers beneath them, and transaction-cost analysis, which tells the client what it all cost.
The menu. TWAP: equal slices in time, Bertsimas and Lo's answer for a risk-neutral trader. VWAP: slices in proportion to the volume expected at each time of day, so it tracks the volume-weighted price. POV: a fixed share of the volume actually traded, so the end time is uncertain. And IS, implementation shortfall: Almgren and Chriss's front-loaded schedule, set by an urgency.
Bitcoin's volume curve, from every minute of twenty twenty-three on the perpetual. Crypto never closes, but it has a day: a trough of 2.3 percent of the volume in the hour from 4:00, and a peak of 7.5 percent from 15:00, when New York opens and American data come out. TWAP is the dashed line, the same in every hour. VWAP follows the bars.
Two more calendars. The week: weekend minutes trade about 52 percent of the volume of weekday ones. So a VWAP algorithm is only as good as its volume forecast. And events, index rebalances, expiries and data releases, bend the curve; in American stocks the closing auction alone can hold a tenth of the day's volume.
Participation and duration. A size-only terminal-impact formula holds its prediction fixed as duration changes, because duration is absent by assumption. For constant market volume rate V-dot, trading at share pi gives rate pi V-dot and completion time Q over pi V-dot. A daily total volume must first be converted to a rate. Actual participation changes may affect impact, adverse selection and information leakage. In a diffusive constant-rate illustration, timing-risk scale grows with root T. These modeling assumptions explain the comparison; the size-only formula alone does not establish that slower execution is equally costly.
The close. Stock exchanges end the day with an auction, one price for every market-on-close and limit-on-close order; index funds rebalance there. The exchanges publish the auction's imbalance beforehand, and liquidity providers trade against it. Crypto has no close: its benchmarks are reference rates computed from several venues over a window, which an executor tracks like a short VWAP.
Beneath the schedule. A smart order router splits each child order across venues, by displayed size, fees, fill probability and the risk of being picked off. Each child chooses to rest, cheaper but slower and adversely selected, as Part thirty-six measured, or to cross and pay the spread. And dark pools hide the order, which helps only if the pool's other users are not reading it.
And in crypto. There is no consolidated quote and no order-protection rule: Bitcoin trades on dozens of exchanges, and routing among them is the trader's own problem. The same exposure trades as spot and as perpetual futures, and an executor can split across both, paying the basis and the funding. And every venue holds collateral, a counterparty risk that Part thirty-nine prices.
An illustrative average-cost estimate. A hundred and fifty million dollars is half a percent of thirty billion dollars of daily volume. Choose an average-impact coefficient of one and daily return volatility 1.2 percent; the impact estimate is 8.5 basis points. Half a point-three basis-point spread and point-two basis-point fees give 8.8 basis points total. This coefficient is explicitly for average shortfall, rather than a terminal peak. The figures are chosen inputs and omit estimation uncertainty and rate dependence.
Transaction-cost analysis. Fix decision and arrival timestamps and price sources in advance. The first fill is endogenous to an executor's choices and is not an immune benchmark. Report signed shortfall, fees and the convention for unfilled shares. Accounting decompositions do not separately identify news and mechanical impact. Use signed fill markouts with the same spread and fee convention. Compare costs across suitable orders with model uncertainty, dependence and selection in view. A large sample does not automatically remove systematic bias.
A worked example. A buy of a hundred thousand shares is decided at a hundred dollars. The algorithm starts five cents higher: delay. Ninety thousand shares are filled at an average of a hundred dollars thirty: the execution cost, spread, impact and timing together. Ten thousand are never filled, and the price ends at a hundred dollars sixty: the opportunity cost. In all, 33 basis points of the order. Notice that the unfilled tenth cost more than the delay.
And a warning about benchmarks. VWAP can be gamed: a large order moves the VWAP itself, so beating it can mean only that the order was big. A closing-price benchmark invites trading at the close, where the order helps set the price. And a broker judged against VWAP will trade VWAP even when the client's alpha decays fast. The benchmark should match the urgency.
Quantitative pause nine. The parent quantity is two percent of daily volume and the market volume rate is constant. Compare five-percent with twenty-percent participation. Compute the completion times in days and the ratio of square-root-time risk scales. State the size-only impact assumption separately.
9Rule 37: price the trade before you make itIndustry4 min
An execution-choice example. A fading signal can make delay costly, separately from price variance. Compare an urgency-based shortfall schedule or a higher participation target with the incremental rate-dependent costs. A size-only square-root formula cannot settle that choice. Fix a decision or arrival benchmark independently of the executor, and judge all costs and uncertainties against the same convention.
Chapter nine. Rule thirty-seven is a proposed execution research protocol. An order should carry a cost estimate, uncertainty, a schedule and a fixed benchmark, followed by an honest record of execution. This lesson does not deploy a trading system or approve a signal, capacity limit or broker.
The illustrative research sheet. A same-window aggregate-flow slope, finite-grid latent-book exponents, a descriptive propagator fit, assumed Almgren-Chriss costs, exponential-kernel blocks, and simulator-policy averages. They answer different questions with different clocks and uncertainties. Reading them together does not identify a causal cost model or validate an executable strategy.
A simplified break-even illustration. Assume ten basis points of expected alpha for one trading leg, before costs. Set an average-cost square-root coefficient to one, and omit spread, fees, other legs and uncertainty. The resulting threshold is about 35 million dollars under this recorded-volume and volatility calibration. It is not an optimal position size or an approved capacity limit; round-trip costs and a margin for error would lower the allowable scale.
A proposed order record. Before: expected volume, a convention-specific average-cost estimate with uncertainty, signal decay and schedule. During: participation and actual fills against plan; book features need separate predictive validation before use as alpha. After: fixed-benchmark signed shortfall, fees, unfilled-share marks and subsequent markouts. Pool appropriate samples with dependence and selection controls. This is a research protocol, not evidence that a live system currently records or trades this way.
The same illustrative one-leg break-even curve. Average impact under the assumed Y-equals-one convention rises with dollar order size. The ten-basis-point line crosses near 35 million dollars. This is a model threshold with fixed inputs, not a forecast that trades left of the dot profit or that any deployed portfolio has such a size. Net profitability also depends on all other costs, alpha estimation, exits and uncertainty.
Chapter two's latent book. Each step, the density diffuses by a discrete Laplacian; while the order runs, a source at the price removes offers; and the price is wherever the density crosses zero. Ten lines, and the square root comes out.
Chapter five's schedule: the urgency kappa from the hyperbolic cosine, the holdings as a hyperbolic sine, and the expected cost and variance of the shortfall.
Chapters four and six. Build the matrix of the kernel at every pair of dates, solve it against a vector of ones, and scale to the order's size: the discrete Fredholm condition. And the closed form it converges to for an exponential kernel, two lines.
And Chapter three's fit: the sign autocorrelation and the cross-correlation of price changes with past signs, a Toeplitz system solved, and a cumulative sum. The propagator is what remains of a trade's impact.
And Chapter seven's market order. While units remain, take what the best bid holds, at half a tick below the mid; when the queue is emptied the mid falls half a tick and new queues are drawn. Impact, in nine lines.
The tools this part adds. Measurement; the latent book; the schedules; and the learning environment. And the thirty-seventh rule. Every order reaches the market with a pre-trade cost from the square root, a schedule matched to its signal's urgency, and a benchmark at its arrival price. Every impact model is checked for no dynamic arbitrage. And every learned executor is judged first against TWAP.
Apply the protocol to three cases. A backtest without costs needs a calibrated cost convention, all trading legs and capacity uncertainty. An impact optimizer needs separate checks for positive costs, numerical conditioning, existence and intermediate sales. Sales in a purchase program do not by themselves prove negative round-trip costs. A broker reporting a VWAP win should also supply the independently fixed arrival benchmark, order participation, fill details, fees and markouts.
Quantitative pause ten. Alpha is ten basis points, daily return volatility two percent and dollar volume ten billion. Choose an average-impact coefficient of one. Solve the one-leg impact-less-than-alpha inequality, and identify the omitted costs and uncertainties. This threshold is neither an optimal position nor approved capacity.
For the researcher: the optimal schedule under transient impactPhD7 min
For the researcher. We first prove uniqueness and a necessary-and-sufficient variational condition, conditional on a solution for a general kernel. Strict positivity alone does not prove existence over all finite signed measures. Then we construct the exponential-kernel candidate explicitly, verify it and thereby prove both existence and uniqueness for positive rho, depth and horizon. Numerical grids and fitted-parameter surrogate examples remain separate illustrations.
The setting. Admissible strategies are finite signed Borel measures on a compact interval with fixed total mass. Their total variation is finite but not uniformly bounded over the admissible set. A continuous symmetric kernel makes each such measure's quadratic energy finite. Require integral strict positive definiteness on nonzero finite signed measures, or at least strict positivity on nonzero zero-mass directions for uniqueness. Strict positivity of every finite matrix on distinct points is not, by itself, the required measure-level existence or coercivity condition.
Lemma one, uniqueness. The cost is a quadratic form: move along any direction mu, and it changes by a linear term and a quadratic one. Strict positive definiteness makes the quadratic term positive. So the cost is strictly convex on a convex set, and two minimisers would have a cheaper midpoint: there is at most one.
Lemma two, conditional characterization. At an existing minimizer, perturb by a point mass at a minus a point mass at b. Both signs of this perturbation remain admissible. The derivative vanishes, giving equality of f at a and b. Here f integrates the symmetric kernel over the entire trading interval, including future trades: it is a marginal-cost potential, not the causal displacement left by past trades. Thus f is constant everywhere. Conversely a candidate of the required total mass with constant f minimizes cost by quadratic positivity. Integrating the potential against that candidate gives cost one half lambda X.
Lemma three, the exponential kernel. Guess the shape: equal blocks at the ends, a constant rate between. Integrate the kernel against it: each block contributes an exponential decaying from its end, and the steady flow contributes the complements. The exponentials cancel, and f is constant, exactly when each block equals the rate times the recovery time.
Solve. The order must be filled: two blocks plus the rate times T is X. With the block equal to the rate over rho, each block is X over two plus rho T. The constant impact is twice the block. And the cost, half of lambda times X, is X squared over two plus rho T.
For the positive-rho exponential kernel, the verified optimum has nonzero endpoint atoms. Restricting to integrable trading rates excludes that unique measure. The minimum is therefore not attained in the rate-only class. The displayed narrow bursts preserve total mass and approximate the atoms weakly; continuity of the kernel on the compact square and bounded total variation give convergence of their energies. This proves the same infimum for this explicit exponential case. It is not a general existence theorem for arbitrary continuous strictly positive-definite kernels.
The theorem, with its quantifiers. For a continuous kernel with integral strict positivity, there is at most one finite signed minimizer. A fixed-mass candidate is optimal exactly when its full symmetric marginal-cost potential is constant. Existence still requires a candidate or an additional theorem. For positive rho, q and T, the endpoint blocks plus constant rate are that verified candidate, so existence and uniqueness follow, with cost X squared over q times two plus rho T. At rho zero the cost becomes schedule-independent and uniqueness fails. The fast-recovery temporary-cost connection also requires matching eta equal to one over q rho.
Why the exponential shape is plausible. An initial block can exploit undisturbed depth and allow its causal displacement to decay. The final block has no later trades to affect. Between them a steady rate balances exponential decay. The optimality test, however, equalizes the full symmetric marginal cost including effects on future trades. That potential is twice the constant interior causal displacement for this solution; confusing the two would misread the Fredholm condition.
The limits. At rho zero, cost is X squared over two q for every schedule with total X, and there is no unique optimum. The two-block limit is one choice. For large rho T, optimal cost is asymptotic to X squared over q rho T and endpoint shares vanish. This matches a risk-neutral temporary-cost model with eta equal to one over q rho. Keeping a nonzero eta in a fast-recovery limit requires joint rescaling of depth; with fixed q the modeled cost tends to zero. This does not generate a risk-aversion term by itself.
Check one: the grid. Solve the discrete problem exactly, with rho T of ten, on finer and finer grids. The cost converges to the formula's 0.0833, the first block to 0.0833, and every trade is a purchase. The block shrinks toward the limit from above, because on a coarse grid the first date also carries part of the flow.
Check two: what the optimum is worth. TWAP's cost under the exponential kernel is a closed form too. The saving of the optimal schedule over TWAP is small when the book barely recovers, because then impact is nearly permanent, and small again when it recovers almost at once. In between it peaks, at about 12 percent when rho T is near 3: a horizon a few recovery times long.
Beyond the exponential, choose a shifted power-law family with positive scale and exponent. It is a regularized surrogate using fitted parameters, not the raw empirical propagator. Finite-grid linear algebra solves its discrete first-order equations; numerical residuals are finite-grid checks, not a continuum convergence proof. Its regularized endpoint blocks and U-shaped interior differ from an unshifted singular power-law kernel, whose endpoint density may diverge. Treat those kernel classes and their existence results separately.
A fitted-parameter surrogate example. Use exponent 0.17, scale 77 trades and a 20,000-trade horizon, with one decision every hundred trades. The two hundred and one-date optimum has endpoint shares 4.2 percent and a nonnegative shallow interior U. These are discrete trades, not proof of continuum atom sizes. Its finite-grid model cost is 1.6 percent below equal grid slices. This comparison excludes spread, fees, risk, changing participation and informational drift; it is not an observed saving on actual orders.
Where this sits. Gatheral, Schied and Slynko gave the Fredholm characterisation for general kernels, and explicit solutions for several. Alfonsi, Antje Fruth and Schied let the book have any shape, which makes impact nonlinear, and found blocks at the ends still. And Obizhaeva and Wang's original paper read resilience as the speed of new liquidity.
Three open questions. A model with square-root impact in size and a decaying kernel, free of dynamic arbitrage, whose optimal schedules can be computed. Separating, from public data, the part of impact that is information from the part that is mechanics. And the equilibrium of many funds with transient impact and private signals, and whether it is stable.
Quantitative pause seven. Use an exponential kernel with quantity, horizon and depth all one, and rho equal to two. Finite signed measures and half-self-impact are allowed. Compute the endpoint blocks, interior rate, optimum cost and continuous TWAP cost. Give the saving with its correct denominator.
Recap, desk questions, problemsAll tracks4 min
Part thirty-seven in thirteen lines. Some metaorder samples show concave signed displacement and partial reversion; fractions depend on conditioning. Our Bitcoin minute-flow slope is a same-window association, not an identified parent-order cost. The square-root rule is an empirical approximation with convention-specific calibration. A static triangular latent book gives a root law; a finite dynamic simulation is a separate illustration. Propagator scaling can reconcile correlated signs and diffusive variance under assumptions, without establishing a unique causal mechanism. Kernel consistency must be tested separately.
Almgren-Chriss front-loads within a deterministic mean-variance model, with a positive effective temporary coefficient. Average shortfall and terminal square-root displacement need different calibrations. A verified positive-rho exponential candidate proves existence and uniqueness of endpoint blocks and steady flow. Our simulator learner did not beat TWAP, which does not prove TWAP optimal. Algorithms need honest benchmark and cost records. Rule thirty-seven remains a proposed protocol. For a general kernel, uniqueness is conditional on existence; finite matrix positivity alone does not prove attainment.
Three lessons. State cost conventions, time scales and calibration before using an impact curve; schedule savings in one model are not universal. Check quadratic positivity, existence, numerical conditioning and any no-sales requirement separately. Compare a learner with strong baselines in a validated model, report Monte Carlo and model uncertainty, and require future real-market evidence before extrapolating. Failing to beat TWAP in one simulator does not logically determine future-market performance.
The part on one card. The square-root law. The latent book's triangle. The propagator's balance with sign memory. The cost of a schedule under transient impact, never negative for an allowed kernel. Almgren and Chriss's hyperbolic sine. And Obizhaeva and Wang's blocks, with their cost.
How this part connects. Backwards: Part thirty-one's costs now have their microstructure, and Kyle's model of Part thirty-five is the linear, permanent special case. Sideways: Part thirty-six supplied the simulator and the signals, and Part eight the mathematics. Forwards: the market maker of Part thirty-eight earns what the executor pays, and the fire sales of Part forty-one are metaorders that everyone sends at once.
Six desk questions. Ten percent of volume costs thirty basis points; forty percent? Sixty, by the square root. Why is impact concave? Latent liquidity in a V. Why are prices unpredictable when signs are? Impact decays.
What must an impact model satisfy? A positive-definite kernel. How does a risk-averse seller trade? Front-loaded. And when the book recovers? Blocks at the ends. Full solutions are in the notes.
The exponential exercise fixes X, T and q to one and rho to two. Endpoint blocks are one quarter each, the interior rate is 0.5 per unit time and model cost is 0.25. Continuous TWAP costs 0.284. Relative to TWAP, the optimum saves 11.9 percent. Relative to the optimum, TWAP's excess uses a different denominator. Giving only rho T without specifying T would determine the rate times T, not the physical rate itself.
Twelve problems, with complete English and Chinese solutions in the notes. The first six are basic: terminal square-root scaling, a static latent triangle, a conditional propagator exponent, a four-leg negative-cost round trip, finite-horizon AC urgency, and continuous TWAP risk. The four advanced problems cover exponential blocks and TWAP cost with a specified horizon, a VWAP hour, participation and timing risk, and a simplified one-leg break-even threshold with omitted costs stated. The two qualifying problems separate general conditional uniqueness from explicit exponential existence, then derive the discrete AC recurrence, exact hyperbolic parameter and its limits. The problem statements preserve all units and assumptions; work through the full solutions rather than inferring market evidence from the mathematical exercises.
Where this comes back. Part thirty-eight sits on the other side, as the market maker the executor trades with. Part thirty-nine meets liquidity priced by a curve. Part forty-one asks what happens to impact when everyone must sell at once. And Part forty-two puts executors among other machines.
The textbooks this part follows, and the papers it draws on, from Kraus and Stoll's block trades to deep reinforcement learning. Every number on screen was computed by the House's code from Binance's public trade tape, best quotes and bars, or from simulation.
The House can now price a trade before making it, schedule it, and measure what it cost. Next, Part thirty-eight: market making, exchange-traded funds and the speed race. The other side of every order in this part, and how it earns a living.
Where it goes next. The other side of the execution algorithm is the market maker: Part 38.
Key results
The part's results in one place, for revision.
Try it
Lab 37 · Optimal execution: urgency against impact
Liquidate a position over one day. Trace Almgren and Chriss's schedules and their cost-risk frontier as risk aversion grows; then switch to a book whose impact decays and recover Obizhaeva and Wang's block-trickle-block schedule from the discrete optimum.
python -m videos.quant.labs 37
needs numpy, scipy, matplotlib, numba · download lab37.py ·
source on GitHubrisk aversion 0 half sold by t = 0.50 expected cost 0.1000 sd of cost 0.1706
risk aversion 2 half sold by t = 0.42 expected cost 0.1053 sd of cost 0.1530
risk aversion 10 half sold by t = 0.24 expected cost 0.1552 sd of cost 0.1172
risk aversion 50 half sold by t = 0.12 expected cost 0.3347 sd of cost 0.0765
risk aversion 250 half sold by t = 0.06 expected cost 0.7417 sd of cost 0.0469
Decaying impact: first and last block 0.1683, 0.1683 (closed form 0.1667)
Cost: optimum / closed form / all at once 0.1667 / 0.1667 / 0.5000
With impact that depends on the trading rate, fear of risk means selling early. When the book refills, hit it at both ends and trickle in between, letting it recover.
The code (57 lines; it asserts its own result)
"""Lab 37: how to sell a large position: Almgren-Chriss, and a book that recovers."""
import numpy as np
from videos.quant import labs
from explainer.quant.house import execution
TITLE = "Optimal execution: urgency against impact"
GOAL = ("Liquidate a position over one day. Trace Almgren and Chriss's schedules and their cost-risk frontier as "
"risk aversion grows; then switch to a book whose impact decays and recover Obizhaeva and Wang's "
"block-trickle-block schedule from the discrete optimum.")
TASKS = [
"Give the kernel a power-law decay G(t) = (1 + t)^-0.4. What does the optimal schedule look like now?",
"Add permanent impact (gamma > 0) in almgren_chriss. Does it change the schedule, or only the cost?",
"Compare each schedule's cost with a square-root-law estimate, sigma sqrt(X / ADV).",
]
def run(seed=0):
X, T, n, sigma, eta = 1.0, 1.0, 50, 0.3, 0.1
lams = [0.0, 2.0, 10.0, 50.0, 250.0]
plans = {lam: execution.almgren_chriss(X, T, n, sigma, eta, lam) for lam in lams}
lab = labs.Lab()
for lam, p in plans.items():
half = p["t"][np.argmax(p["x"] <= 0.5 * X)]
lab.row(f"risk aversion {lam:>5.0f}", f"half sold by t = {half:.2f} expected cost {p['cost']:.4f} "
f"sd of cost {np.sqrt(p['var']):.4f}")
twap = plans[0.0]
assert np.allclose(np.diff(twap["x"]), -X / n) and abs(twap["cost"] - eta * X ** 2 / T) < 1e-9
costs = [p["cost"] for p in plans.values()]
variances = [p["var"] for p in plans.values()]
assert np.all(np.diff(costs) > 0) and np.all(np.diff(variances) < 0)
rho, m = 4.0, 200
grid = np.arange(m + 1) * T / m
v = execution.kernel_optimal(np.exp(-rho * grid), X)
ow = execution.ow_closed_form(X, T, rho)
cost = execution.kernel_cost(v, np.exp(-rho * grid))
lab.row("Decaying impact: first and last block", f"{v[0]:.4f}, {v[-1]:.4f} (closed form {ow['block']:.4f})")
lab.row("Cost: optimum / closed form / all at once", f"{cost:.4f} / {ow['cost']:.4f} / {0.5 * X ** 2:.4f}")
lab.note = ("With impact that depends on the trading rate, fear of risk means selling early. When the book refills, hit it "
"at both ends and trickle in between, letting it recover.")
assert abs(v[0] - ow["block"]) < 0.01 and abs(v[-1] - ow["block"]) < 0.01 and abs(cost - ow["cost"]) < 2e-3
fig, ax = labs.figure(3, size=(12, 3.9))
colors = [labs.CASH, labs.SPOT, labs.P, labs.IMPLIED, labs.LOSS]
for (lam, p), c in zip(plans.items(), colors):
ax[0].plot(p["t"], p["x"], color=c, label=f"lambda = {lam:g}")
ax[0].set(title="Almgren-Chriss: shares still held", xlabel="time", ylabel="fraction of the order")
ax[0].legend(fontsize=7.5)
ax[1].plot(np.sqrt(variances), costs, "o-", color=labs.P)
ax[1].set(title="The execution frontier", xlabel="sd of cost", ylabel="expected cost")
ax[2].bar(grid, v, width=T / m, color=labs.SPOT)
ax[2].set_yscale("log")
ax[2].set(title="Decaying impact: block, trickle, block", xlabel="time", ylabel="shares traded (log)")
lab.fig = fig
return lab
Now change it
- Give the kernel a power-law decay G(t) = (1 + t)^-0.4. What does the optimal schedule look like now?
- Add permanent impact (gamma > 0) in almgren_chriss. Does it change the schedule, or only the cost?
- Compare each schedule's cost with a square-root-law estimate, sigma sqrt(X / ADV).
Problems, with solutions
Try each problem before opening its solution; the last two of each set are at qualifying-exam level.
Twelve complete problems and solutions
Problems 1–6 are basic, 7–10 advanced and 11–12 qualifying-exam level. All cost calculations below omit spread and fees unless explicitly stated.
-
Square-root scaling. Square root: 1% of volume moves the price 10 bp. What do 4% and 9% do? What does a linear law say?
Solution
One percent of daily volume has terminal displacement 10 bp; keep Y, volatility and daily volume fixed. At 4% and 9%, (I=10\sqrt{Q/0.01V}), giving 20 and 30 bp. Linear scaling gives 40 and 90 bp. These are terminal displacements. Under a path c√q, average displacement is two-thirds of the peak; a different measured average-cost coefficient must be calibrated accordingly.
-
Static latent book. Static offer density \(\rho(x)=\mathcal Lx\), \(\mathcal L=2\) units/tick\(^2\): impact of buying 9 units.
Solution
Offer density is ρ(x)=Lx for x≥0, with L=2 units/tick² and Q=9 units. Integrate Q=∫₀^Δ 2x dx=Δ², hence Δ=3 ticks. This assumes the profile is static and linear over the consumed region; it is not a dynamic refill result.
-
Propagator exponent. Signs with \(\gamma = 0.6\): the propagator exponent that keeps prices diffusive.
Solution
Assume sign correlation proportional to ℓ^−0.6 and flow variance exponent 2−γ−2β. Setting this exponent to one yields 2−0.6−2β=1, hence β=0.2. This is a conditional scaling calculation. Linear variance growth alone does not imply zero conditional expected returns, nor identify the market's causal mechanism.
-
A four-leg round trip. A box kernel \(G = 1\) for \(t < \tau\): construct a round trip with negative expected cost.
Solution
Let G(t)=1 for 0≤t<τ and zero afterwards, including G(0)=1. Take v=(1,−1,1,−1) at spacing 0.7τ. Net quantity is zero and absolute turnover four. Only adjacent off-diagonal pairs interact. Thus ½vᵀΓv=½[4+2(−1−1−1)]=−1, or −0.25 per unit absolute turnover. This is a frictionless negative expected model cost; executable spread and fees could offset it. A single two-leg buy/sell pair would not provide this counterexample.
-
Continuous AC urgency and half-life. Continuous AC, \(T=60\) min, \(\lambda\sigma^2/\eta=0.01\) per min\(^2\): \(\kappa\), fraction held at 20 min, exact half-life.
Solution
Set T=60 minutes and λσ²/η=0.01/min². Then κ=0.1/min and x(t)/X=sinh[0.1(60−t)]/sinh(6). At t=20, the fraction is sinh(4)/sinh(6)≈0.13529. Exact half-life is (60-\operatorname{asinh}(\tfrac12\sinh6)/0.1\approx6.9313) minutes. The e-folding time is 10 minutes, while the long-horizon exponential half-life is log(2)/0.1≈6.93147 minutes. Distinguish the approximation from the exact finite-horizon value.
-
Continuous TWAP risk. Continuous TWAP, \(T=60\) min, \(X=5{,}000\) BTC, \(\sigma = 12\) dollars per \(\mathrm{BTC}\sqrt{\mathrm{min}}\): dollar shortfall sd.
Solution
Let X=5,000 BTC, T=60 minutes and sigma=$12/(BTC√min). With x(t)=X(1−t/T), Var(IS)=σ²∫₀ᵀx(t)²dt=σ²X²T/3. Thus sd=12×5,000×√20=$268,328. Units reduce to dollars. An N-step post-trade convention uses σ²(T/N)Σxₖ² and is slightly smaller; this is a clock convention, not a discrepancy to hide.
-
Exponential resilience. Exponential kernel: \(X=T=q=1\), \(\rho=2\). Blocks, interior rate, optimum and continuous TWAP cost.
Solution
Set X=T=q=1 and ρ=2, allowing finite signed measures with half-self-impact. Each endpoint atom is a=X/(2+ρT)=1/4 and the interior rate is b=ρa=1/2 per unit time. Total mass 2a+bT=1. The full symmetric potential is f(t)=a(e^−2t+e^−2(1−t))+(b/2)(2−e^−2t−e^−2(1−t))=1/2. Cost is ½fX=1/4. Continuous TWAP cost is ½[1−(1−e^−2)/2]≈0.283834. Saving relative to TWAP is 1−0.25/0.283834≈11.9203%. TWAP's excess relative to the optimum is 0.283834/0.25−1≈13.5335%. Merely specifying ρT would fix bT, not the dimensional rate b.
-
A VWAP hour. A VWAP order of 1{,}000 BTC with 7.5% of the volume in one hour: that hour's trades.
Solution
Expected hourly share is 7.5% and parent quantity 1,000 BTC. Allocate 75 BTC to that hour. If actual volume differs from the forecast, the realized participation rate differs from the plan. A schedule using expected volume is not the same as adaptive fixed-share POV.
-
Participation. POV at 5% against 20% for an order of 2% of daily volume: the times, the impact, the risk.
Solution
Let Q=0.02V_day and a constant market rate V_day per day. At participation 5%, T=0.02/0.05=0.4 day; at 20%, 0.1 day. Under a size-only square-root terminal model both have Yσ√0.02. A diffusive root-duration risk scale is twice as large for the slower order. This comparison assumes the same shape of schedule, constant volatility and no separate rate-dependent impact.
-
Simplified one-leg break-even. One-leg illustration: alpha10 bp, daily sigma2%, dollar volume$10bn, average Y=1. Break-even size and omitted costs.
Solution
Expected alpha is 10 bp=0.001, daily return volatility 0.02, dollar daily volume $10bn, and average-impact coefficient Y=1. The inequality 0.02√(Q/V)<0.001 gives Q/V<0.0025, hence Q<$25m. Equality is break-even for the single modeled component. Spreads, fees, other legs, changing conditions and alpha uncertainty reduce useful capacity; this is neither an optimal position nor approval to trade.
-
Qualifying: conditional variational theorem and exponential existence. (qual) For a continuous integrally strictly positive-definite kernel, prove at-most-one minimizer and characterize an existing minimizer by \(\int G(|t - s|)\,dX^*_s = \lambda\), and derive Obizhaeva–Wang's solution and cost.
Solution
Work with finite signed Borel measures μ on [0,T], total mass X, a continuous symmetric G, and integral strict positivity of energy for nonzero measures (strict positivity on zero-mass directions suffices for uniqueness). Write C(μ)=½B(μ,μ). If two distinct minimizers existed, their midpoint would have cost lower by C(μ−ν)/4, a contradiction. This proves at most one, without proving existence or boundedness of total variation along minimizing sequences. At an existing minimum μ*, every zero-mass variation ε(δ_a−δ_b) is admissible with either sign. Its derivative is f(a)−f(b), where f(t)=∫₀ᵀG(|t−s|)dμ*(s), so f is constant λ. Conversely, for any equal-mass ν, C(ν)=C(μ*)+∫f d(ν−μ*)+C(ν−μ*)=C(μ*)+C(ν−μ*)≥C(μ*). The constant-potential candidate is therefore optimal, uniquely under strict positivity. Integrating f gives C*=λX/2.
For G(t)=e^−ρt/q with ρ,q,T>0, propose μ*=aδ₀+b dt+aδ_T. Its potential is [a(E₀+E_T)+(b/ρ)(2−E₀−E_T)]/q. Set b=ρa and 2a+bT=X to get a=X/(2+ρT), b=ρX/(2+ρT). Potential is λ=2a/q and C*=X²/[q(2+ρT)]. This explicit candidate proves existence. For X>0 it has no sales. Narrow rate bursts approximating the atoms preserve mass, have bounded total variation and converge in energy by continuity of G; rate-only strategies have the same infimum but cannot attain the unique atomic optimum. At ρ=0, all schedules cost X²/(2q) and uniqueness fails. Large ρT gives X²/(qρT); matching nonzero temporary η requires holding 1/(qρ) fixed. The full symmetric potential is a marginal cost, not the causal displacement process.
-
Qualifying: discrete Almgren–Chriss. (qual) Derive Almgren–Chriss's discrete schedule from the first-order conditions, show \(\cosh\kappa\tau = 1 + \lambda\sigma^2\tau^2/(2\tilde\eta)\), and find the limits \(\lambda \to 0\) and \(\lambda \to \infty\).
Solution
Fix deterministic x₀=X, x_N=0, τ=T/N, η̃=η−γτ/2>0 and λ≥0. Apart from the schedule-independent permanent term, minimize J=(η̃/τ)Σₖ₌₁^N(xₖ₋₁−xₖ)²+λσ²τΣₖ₌₁^Nxₖ² under the post-trade noise convention. For each interior j, differentiation gives (2η̃/τ)(2x_j−x_{j−1}−x_{j+1})+2λσ²τx_j=0. Therefore x_{j+1}−2x_j+x_{j−1}=(λσ²τ²/η̃)x_j. The characteristic roots are e^±κτ with cosh(κτ)=1+λσ²τ²/(2η̃); boundaries yield x_j=X sinh[κ(T−jτ)]/sinh(κT). Strict convexity of the positive quadratic form ensures the unique solution. As λ→0, x_j→X(1−j/N), TWAP. At fixed grid and λ→∞, every interior holding tends to zero and liquidation occurs in the first interval. As τ→0 with η̃→η>0, κ→√(λσ²/η), giving the continuous sinh solution. The finite-grid urgency uses arcosh, not the continuous square-root expression exactly.
Reading and notes
The part's papers
from READING.md
- Kraus, A., Stoll, H. (1972). "Price impacts of block trading on the New York Stock Exchange." Journal of Finance.
- Bertsimas, D., Lo, A. W. (1998). "Optimal control of execution costs." J. Financial Markets.
- Almgren, R., Chriss, N. (2000). "Optimal execution of portfolio transactions." J. Risk.
- Konishi, H. (2002). "Optimal slice of a VWAP trade." J. Financial Markets.
- Almgren, R. (2003). "Optimal execution with nonlinear impact functions and trading-enhanced risk." Applied Mathematical Finance.
- Gabaix, X., Gopikrishnan, P., Plerou, V., Stanley, H. E. (2003). "A theory of power-law distributions in financial market fluctuations." Nature; (2006) "Institutional investors and stock market volatility." QJE.
- Bouchaud, J.-P., Gefen, Y., Potters, M., Wyart, M. (2004). "Fluctuations and response in financial markets: the subtle nature of 'random' price changes." Quantitative Finance.
- Huberman, G., Stanzl, W. (2004). "Price manipulation and quasi-arbitrage." Econometrica.
- Almgren, R., Thum, C., Hauptmann, E., Li, H. (2005). "Direct estimation of equity market impact." Risk.
- Nevmyvaka, Y., Feng, Y., Kearns, M. (2006). "Reinforcement learning for optimized trade execution." ICML.
- Gatheral, J. (2010). "No-dynamic-arbitrage and market impact." Quantitative Finance.
- Alfonsi, A., Fruth, A., Schied, A. (2010). "Optimal execution strategies in limit order books with general shape functions." Quantitative Finance.
- Tóth, B., et al. (2011). "Anomalous price impact and the critical nature of liquidity in financial markets." Physical Review X.
- Obizhaeva, A., Wang, J. (2013). "Optimal trading strategy and supply/demand dynamics." J. Financial Markets.
- Donier, J., Bonart, J., Mastromatteo, I., Bouchaud, J.-P. (2015). "A fully consistent, minimal model for non-linear market impact." Quantitative Finance.
- Zarinelli, E., Treccani, M., Farmer, J. D., Lillo, F. (2015). "Beyond the square root: evidence for logarithmic dependence of market impact on size and participation rate." Market Microstructure and Liquidity.
- Kyle, A. S., Obizhaeva, A. (2016). "Market microstructure invariance: empirical hypotheses." Econometrica.
- Cartea, Á., Jaimungal, S. (2016). "Incorporating order-flow into optimal execution." Mathematics and Financial Economics.
- Cardaliaguet, P., Lehalle, C.-A. (2018). "Mean field game of controls and an application to trade crowding." Mathematics and Financial Economics.
- Bucci, F., Benzaquen, M., Lillo, F., Bouchaud, J.-P. (2019). "Crossover from linear to square-root market impact." PRL.
- Lehalle, C.-A., Neuman, E. (2019). "Incorporating signals into optimal trading." Finance and Stochastics.
- Ning, B., Lin, F. H. T., Jaimungal, S. (2021). "Double deep Q-learning for optimal execution." Applied Mathematical Finance.
- Sato, Y., Kanazawa, K. (2025). Survey of the square-root law on the Tokyo Stock Exchange (verify: title and venue).
- Loeb, T. (1983). "Trading cost: the critical link between investment information and results." Financial Analysts Journal.
- Perold, A. (1988). "The implementation shortfall: paper versus reality." J. Portfolio Management.
- Brunnermeier, M., Pedersen, L. H. (2005). "Predatory trading." Journal of Finance.
- Almgren, R., Lorenz, J. (2007). "Adaptive arrival price." Algorithmic Trading III.
- Moro, E., et al. (2009). "Market impact and trading profile of hidden orders in stock markets." Physical Review E.
- Schied, A., Schöneborn, T. (2009). "Risk aversion and the dynamics of optimal liquidation strategies in illiquid markets." Finance and Stochastics.
- Humphery-Jenner, M. (2011). "Optimal VWAP trading under noisy conditions." J. Banking and Finance.
- Alfonsi, A., Schied, A., Slynko, A. (2012). "Order book resilience, price manipulation, and the positive portfolio problem." SIAM J. Financial Mathematics.
- Gatheral, J., Schied, A., Slynko, A. (2012). "Transient linear price impact and Fredholm integral equations." Mathematical Finance.
- Bershova, N., Rakhlin, D. (2013). "The non-linear market impact of large trades: evidence from buy-side order flow." Quantitative Finance.
- Farmer, J. D., Gerig, A., Lillo, F., Waelbroeck, H. (2013). "How efficiency shapes market impact." Quantitative Finance.
- Donier, J., Bonart, J. (2015). "A million metaorder analysis of market impact on the Bitcoin." Market Microstructure and Liquidity.
- Patzelt, F., Bouchaud, J.-P. (2018). "Universal scaling and nonlinearity of aggregate price impact in financial markets." Physical Review E.
- Taranto, D., Bormetti, G., Bouchaud, J.-P., Lillo, F., Tóth, B. (2018). "Linear models for the impact of order flow on prices." Quantitative Finance.
Data, scope and reproducibilityWhat the evidence can establish
- A same-minute signed-volume association has finite-bin slope about 0.81. Public trades do not identify parent orders, mechanical execution costs or a held-out forecast. The tape's minute windows, nearest populated bin centers and day weighting are the implemented conventions.
- Terminal square-root impact and average impact cost require different coefficients. If the execution path is (I(q)=c\sqrt q), total impact cost is (2cQ^{3/2}/3), and average shortfall grows as (2c\sqrt Q/3). Average cost per share does not fall as order size grows.
- Static latent density ρ(x)=Lx gives displacement Δ=√(2Q/L). Diffusive latent-book simulation, finite-grid exponent fits and asymptotic arguments are distinct. Dimensions alone do not determine the square-root function. Two-thirds permanent displacement additionally requires a fair-pricing relation and a compatible execution path.
- The response function averages signed future displacement over all starting trades. The propagator is a truncated linear projection fitted on four date files, using the second preceding quote-grid index, boundary clipping and event-time joins. It does not isolate a causal trade effect. The fitted positive-parameter shifted-power-law surrogate removes the raw kernel's initial rise and imposes regularity.
- The relation β=(1−γ)/2 follows under long-memory, regular-kernel scaling assumptions. Diffusive variance does not establish a martingale. Finite-lag fits without uncertainty do not verify asymptotic efficiency.
- Positive definiteness of the quadratic energy is sufficient for nonnegative round-trip cost. Positivity restricted to zero-total directions, strict convexity, existence of a measure-valued optimum and absence of intermediate sales are separate questions. Bochner's theorem uses a spectral measure; an ordinary Fourier density needs further assumptions. Fine Gaussian matrices can be severely ill-conditioned.
- Almgren–Chriss uses independent zero-mean price innovations, deterministic holdings, matching interval conventions and positive effective coefficient η̃=η−γτ/2. Sigma is price per square root of time. The descriptive flow calibration of eta is not an identified cost curve. The urgency time 1/κ is an e-folding time; log(2)/κ is only the long-horizon exponential half-life.
- The positive-ρ exponential candidate proves existence and uniqueness by explicit verification. A general continuous integrally strictly positive-definite kernel gives at most one minimizer; it does not alone guarantee attainment over all finite signed measures. The Fredholm potential includes past and future trades and is not the causal displacement process.
- Quote-grid jumps of at least ten ticks are selected events, not identified message-level sweeps. Median normalized depth recovery and mean signed price drift are distinct. A clipped one-step depth proxy is not an identified resilience rate or confidence bound; subsequent drift does not identify news.
- The Q-learning comparison uses one fitted simulator, specified training/evaluation seeds and restricted observations/actions. Individual Monte Carlo standard errors omit model and training uncertainty. Matching seeds alone does not align innovations after policies consume different numbers of draws. The chosen-sales profile sums to 16.656, excluding the forced final liquidation that is included in evaluation costs.
- VWAP follows expected volume; realized participation need not remain constant. POV completion uses a volume rate, rather than a daily total without a time conversion. Benchmarks require independently fixed timestamps and price sources. A first-fill benchmark is endogenous.
- Rule 37 is a proposed research protocol, with a cost convention, uncertainty, schedule and order record. Break-even illustrations omit other trading legs and uncertainties and are not approved capacity or optimal sizing.
Chapter notesChapters and sources
The twelve scenes cover the opening question, metaorders and shortfall, the square-root law, propagators, no dynamic arbitrage, Almgren–Chriss, exponential resilience, a learned executor, execution algorithms and TCA, Rule 37, variational execution and a recap. Ten numerical pauses specify their units, horizons and assumptions.
Textbooks: Bouchaud, Bonart, Donier and Gould, Trades, Quotes and Prices (2018); Cartea, Jaimungal and Penalva, Algorithmic and High-Frequency Trading (2015); Guéant, The Financial Mathematics of Market Liquidity (2016); Lehalle and Laruelle, Market Microstructure in Practice (2018).
Paper trail: Perold (1988); Loeb (1983); Torre (1997); Bertsimas and Lo (1998); Almgren and Chriss (2000); Almgren (2003); Almgren, Thum, Hauptmann and Li (2005); Bouchaud, Gefen, Potters and Wyart (2004); Huberman and Stanzl (2004); Gatheral (2010); Alfonsi, Fruth and Schied (2010); Alfonsi, Schied and Slynko (2012); Gatheral, Schied and Slynko (2012); Obizhaeva and Wang (2013); Moro et al. (2009); Bershova and Rakhlin (2013); Tóth et al. (2011); Donier and Bonart (2015); Donier, Bonart, Mastromatteo and Bouchaud (2015); Zarinelli et al. (2015); Kyle and Obizhaeva (2016); Patzelt and Bouchaud (2018); Bucci et al. (2019); Nevmyvaka, Feng and Kearns (2006); Ning, Lin and Jaimungal (2021); Lehalle and Neuman (2019); Cardaliaguet and Lehalle (2018); Brunnermeier and Pedersen (2005). Literature findings are attributed examples, not claims to have reproduced proprietary order records.
中文讲义
本讲的中文说明、交易台问题与习题解答(与英文版对应)。
Problems, with worked solutions数据、方法与十二道完整解答
本部分研究市场冲击与执行,但区分终点价格位移、每单位平均执行差额及因果机械冲击。十个不改动的常规原始计算使用公开成交、最优报价、K线及指定模拟;不登记或打开策略。第37部分累计既有试验为23,552,全局23,562。公开2023年原始档案不是封存策略结果。
同分钟成交量与价格的幂律斜率是描述性相关,不识别母订单成本。传播子来自有限滞后线性拟合,报价使用第二个先前网格索引并截断边界;拼接日期、短样本与陈旧报价都会影响结果。正参数平移幂律是另行选择的规则化模型,不能把模型的正定性当成市场无操纵的证明。
平方根路径的每单位平均成本随规模增加,不是下降。公平定价的三分之二需要额外均衡条件;量纲不能单独决定函数。AC的波动率是每平方根时间的价格波动,1/κ是e倍时间,不是精确半衰期。严格凸性只给出至多一个最小解;一般核仍需存在性论证。指数核通过直接构造证明存在与唯一。弗雷德霍姆势包含未来交易的边际成本,不等于因果价格位移。
报价网格跳跃不是逐笔已识别扫单;深度恢复与价格恢复是不同统计。Q学习的误差条是单个策略的蒙特卡洛误差,不包含模型与训练不确定性;同种子不等于同路径。选择出售曲线合计16.656单位,没有计入费用评估中包含的强制终端清仓。第37条规则是研究流程建议,不是部署、容量批准或实盘业绩。
以下1–6为基础题,7–10为进阶题,11–12为资格考试题。未特别说明时忽略价差与费用。
-
平方根缩放。 已知日成交量1%的终点位移10基点,固定Y、波动率及日成交量。4%为10√4=20基点,9%为10√9=30基点;线性分别为40与90。若路径为c√q,平均成交位移是终点的三分之二,总成本为2cQ^(3/2)/3。平均每单位成本仍按√Q增加。
-
静态潜在簿。 ρ(x)=Lx,L=2单位/跳²,买入9单位。Q=∫₀^Δ 2x dx=Δ²=9,故Δ=3跳。假设消耗范围内密度线性且不恢复;不能直接当作动态扩散模型结论。
-
传播子指数。 假设符号相关指数γ=0.6,方差幂指数为2−γ−2β。令其等于1得β=0.2。条件缩放结论不证明价格是鞅,也不唯一识别真实机制。
-
四腿往返。 方框核在滞后小于τ时为1,其余为0,自冲击为1。以0.7τ间隔交易(1,−1,1,−1),总量零、绝对换手四。仅相邻异号相互作用,成本½[4+2(−1−1−1)]=−1,每单位绝对换手−0.25。价差费用可能抵消模型收益;两腿简单买卖不能给出这个反例。
-
连续AC与半衰期。 T=60分钟,λσ²/η=0.01/分钟²,故κ=0.1/分钟。x(t)/X=sinh[0.1(60−t)]/sinh6。20分钟剩余sinh4/sinh6≈13.529%。精确半衰期为60−asinh(sinh6/2)/0.1≈6.9313分钟;e倍时间为10分钟,长时限指数近似半衰期为log2/0.1≈6.93147分钟。
-
连续TWAP风险。 X=5000BTC、T=60分钟、σ=12美元/(BTC√分钟)。持仓X(1−t/T),方差σ²∫x²dt=σ²X²T/3,标准差12×5000×√20=268,328美元。离散成交后持仓约定使用σ²τΣx_k²,数值略小;需保留时点约定。
-
指数恢复。 X=T=q=1、ρ=2。两端各a=1/4,中间速率b=1/2每单位时间,2a+bT=1。对称边际势f=a(E₀+E_T)+(b/2)(2−E₀−E_T)=1/2,成本fX/2=1/4。连续TWAP成本½[1−(1−e^−2)/2]≈0.283834。相对TWAP节省11.9203%;TWAP相对最优成本多13.5335%,分母不同。只有ρT不能确定有单位的速率,必须给出T。
-
VWAP小时。 母订单1000BTC,该小时预期成交量占7.5%,计划交易75BTC。预测误差会改变实际参与率;按预期曲线分配不等于按实际成交量自适应POV。
-
参与率。 Q=0.02V_day,市场恒定每日期间交易V_day。5%参与率需0.4天,20%需0.1天。仅含规模的平方根模型两者终点冲击均Yσ√0.02;扩散时机风险之比√(0.4/0.1)=2。这依赖相同轨迹形状、恒定波动率及忽略独立速率效应。
-
单腿简化盈亏平衡。 α=0.001、σ_day=0.02、V_day=100亿美元、平均冲击Y=1。由0.02√(Q/V)<0.001得Q/V<0.0025,故Q<2500万美元。价差、手续费、其他交易腿、模型及信号不确定性会降低实际可用容量;这不是最优仓位或批准。
-
资格题:条件唯一性与指数核存在性。 在紧区间有限带符号Borel测度、总量X上,令G连续对称且对非零测度积分严格正定;零质量方向严格正定已足够给出唯一性。若两个不同最小解存在,中点成本会比两者平均低C(μ−ν)/4,矛盾,故至多一个。这个论证不保证存在,也不控制极小序列总变差。若μ是最小解,任意正负ε(δ_a−δ_b)均可行,一阶导数f(a)−f(b)=0,故全区间对称势f=λ。反过来,任意同总量ν有C(ν)=C(μ)+∫f d(ν−μ*)+C(ν−μ*)≥C(μ*),因此恒势候选足够。积分得C*=λX/2。
Solution
对G=e^−ρt/q,ρ,q,T>0,取μ*=aδ₀+b dt+aδ_T。势为[a(E₀+E_T)+(b/ρ)(2−E₀−E_T)]/q。令b=ρa并满足2a+bT=X,得a=X/(2+ρT)、b=ρX/(2+ρT)、λ=2a/q,成本X²/[q(2+ρT)]。直接候选证明存在与唯一;X>0时无卖出。用窄速率脉冲逼近端点原子,保持质量与有界总变差,由核连续性得能量收敛。仅速率类有相同下确界但不达到原子最优解。ρ=0时所有轨迹成本X²/(2q),唯一性失败;大ρT渐近X²/(qρT),保持非零暂时成本η需同时缩放q使1/(qρ)固定。势包含未来交易,并非过去成交造成的因果位移。
-
资格题:离散AC。 固定x₀=X、x_N=0、τ=T/N、η̃=η−γτ/2>0、λ≥0。去掉恒定永久项后最小化J=(η̃/τ)Σ(x_{k−1}−x_k)²+λσ²τΣx_k²,采用成交后持仓噪声约定。内点求导得(2η̃/τ)(2x_j−x_{j−1}−x_{j+1})+2λσ²τx_j=0,因此二阶差分等于(λσ²τ²/η̃)x_j。特征根e^±κτ满足cosh(κτ)=1+λσ²τ²/(2η̃),边界给出x_j=X sinh[κ(T−jτ)]/sinh(κT)。正二次型严格凸,解唯一。λ→0时为线性TWAP;固定网格λ→∞时内点持仓趋零,第一区间卖完。小步长且η̃→η>0时κ→√(λσ²/η),得到连续解;有限网格应使用arcosh形式。
Build the film
python -m videos.quant.quant37.compute # the part's numbers, into .cache/quant37
python tools/make.py quant37 # the narrated film, English and Chinese
EXPLAINER_TTS=silent python tools/qa_scene.py quant37 Hook # one chapter, silent, with a contact sheet
Scenes: videos/quant/quant37. Setup: see the course page. Source of these notes: the part's README and the scenes' narration.