Trading the Breaking

Trading the Breaking

Share this post

Trading the Breaking
Trading the Breaking
[WITH CODE] Exectuion: Optimal execution strategy
Alpha Lab

[WITH CODE] Exectuion: Optimal execution strategy

Almgren–Chriss framework to balances the trade-off between expected execution cost and risk

πš€πšžπšŠπš—πš π™±πšŽπšŒπš”πš–πšŠπš—'s avatar
πš€πšžπšŠπš—πš π™±πšŽπšŒπš”πš–πšŠπš—
Apr 02, 2025
βˆ™ Paid
10

Share this post

Trading the Breaking
Trading the Breaking
[WITH CODE] Exectuion: Optimal execution strategy
2
1
Share

Table of contents:

  1. Introduction.

  2. Types of impact.

    1. Transient impact.

    2. Temporary impact.

    3. Decay and price reversion.

    4. Permanent impact.

  3. The square-root law of market impact.

  4. Optimal execution strategies.

    1. The Almgren–Chriss framework.

    2. Impact vs risk.


Introduction

Picture this: You’re a master thief planning the ultimate heist. Your target? A vault overflowing with liquid assetsβ€”literally. But here’s the twist: the vault is rigged with motion sensors. Make too big a move, and alarms blare, guards swarm, and your grand plan crumbles. Welcome to the world of market impact, where every trade is a high-stakes caper, and the difference between success and disaster is measured in milliseconds and micro-pennies.

Market impact is the phenomenon whereby executing a tradeβ€”especially a large oneβ€”causes a shift in the price of an asset. For institutional and high‐frequency traders alike, understanding market impact is crucial, as even small changes in execution prices can lead to significant costs.

Let’s dissect it into its various phases.

Types of impact

While small orders often go unnoticed, large orders can disrupt the order book and cause significant price shifts. This phenomenon is crucial for institutional traders and execution algorithms because it directly affects trading costs and execution quality.

Transient impact

It is the immediate, short-lived change in the asset’s price that occurs when a large order is executed. When a large orderβ€”e.g., a big guyβ€”is submitted, it "eats" through the visible liquidity on the order bookβ€”consuming the shares available at the best prices. As a result, the best bid or ask shifts instantaneously to the next available level. This instantaneous shift is what we call the transient impact.

Consider an order book represented by a cumulative liquidity function, L(p), which indicates the total available volume up to a price p. When a buy order of size Q is placed, the new best ask Pnew​ is determined by the smallest price such that:

\(L(P_{\text{new}}) \ge Q\)

The transient impact IT​ is then given by:

\(I_T = P_{\text{new}} - P_{\text{current}}\)

where Pcurrent​ is the best ask price before the order.

For example, the best ask is $100 with 80 shares available, and the next price level is $100.20 with 120 shares available. If a buy order for 100 shares is executed, the order will completely consume the 80 shares at $100 and then partially take from the next level. Thus, the new best ask will shift to $100.20. The transient impact is:

\(I_T = 100.20 - 100.00 = 0.20 \, (\text{or } 20 \text{ cents})\)

If we represent this, we would have something like this:

Here we see a simulation of a large buy order consuming liquidity, resulting in an immediate upward shift in the best ask.

Temporary impact

It represents the peak reaction that follows the transient impact. Once the large order has been executed and the immediate liquidity consumed, other market participants rapidly adjust their orders. This results in a short-term spike in volatility as the market "overreacts" to the initial shock.

Some stylized facts are:

  • Volatility spike: The price overshoots the new equilibrium due to aggressive quoting.

  • Peak response: The temporary phase is marked by the highest price deviation.

  • Short duration: Typically lasts only for a brief period before the market starts to revert.

This can be modeled by adding an additional component, Ξ”I, to the transient impact:

\(I_{\text{temp}} = I_T + \Delta I\)

where:

  • IT​ is the transient impact.

  • Ξ”I captures the extra impact from the market’s overreaction.

Following the earlier scenario, after the transient impact pushes the best ask from $100.00 to $100.20, market participants might react by further adjusting their quotes. This additional reaction, Ξ”I, may cause the price to momentarily spike even higher before starting to settle down.

The temporary impact reflects the maximum observed price change before the decay phase begins. This is a classic:

Decay and price reversion

After the temporary impact, the market gradually absorbs the shock and reverts toward a new equilibrium. This phase is known as the decay or price reversion phase. It occurs as liquidity providers re-enter the market, and the price correction follows an exponential decay pattern.

The decay of market impact is often modeled using an exponential decay function:

\(I(t) = I_{\text{peak}} \cdot e^{-\frac{t-t_0}{\tau}}\)

where:

  • Ipeak is the peak impactβ€”typically the temporary impact level.

  • to​ is the time at which decay beginsβ€”end of the temporary phase.

  • Ο„ is the decay constant that determines the rate at which the impact dissipates.

As time t increases, the e term​ decreases, and the impact I(t) approaches the permanent level. An example of that:

Permanent impact

It is the lasting price change that persists after all temporary effects have dissipated. It reflects the market’s long-term revaluation following the large order and is considered the new β€œpoint of control” level.

We can define it as:

\(I_{\text{perm}} = \lim_{t \to \infty} \left[P(t) - P(0)\right]\)

This limit represents the sustained shift in price that is not undone by the subsequent reversion process.

If after a large buy order the price eventually settles at a level that is higher than the pre-trade price, the difference is the permanent impact. For instance, if the best ask moves from $100 to a new stable level of $100.05 after the market absorbs the order, the permanent impact is $0.05.

Permanent impact is typically smaller than the initial transient or temporary impacts because some of the immediate price movement is only a short-term reaction. This is a pattern that all chartist cry when they see it:

The square-root law of market impact

It is an empirically validated relationship that approximates how much a trade will move the market. It is expressed as:

\(VMI \propto \sigma \cdot \sqrt{\frac{Q}{V}}\)

where:

  • MI is the market impactβ€”the change in price caused by the trade.

  • Οƒ is the volatility of the asset.

  • Q is the trade size.

  • V is the daily trading volume.

Market impact increases in a sublinear fashion. This means that if you double the trade size Q, the impact increases only by a factor of √2β€”approximately 1.41β€”not by 2.

For large institutional orders, this relationship explains why it’s advantageous to slice orders into smaller parts. Instead of executing a massive order at onceβ€”which would dramatically move the priceβ€”the order can be divided into smaller chunks, each incurring a smaller impact. Over many chunks, the overall cost is reduced relative to executing the entire order in one go.

The impact is quite different:

Volatility (Οƒ) acts as a multiplier in the formula:

  • In volatile markets, prices are more sensitive to trading activity. Even relatively small orders may result in noticeable price changes because Οƒ is higher.

  • In calmer markets, the same trade size Q will produce a lower market impact because Οƒ is lower.

This makes the square-root law particularly dynamic: it adjusts the expected impact based on current market conditions.

So why the square-root law is useful?

  • To estimate the cost of executing a trade. By knowing the expected impact, a trader can decide whether to proceed with the order as planned or adjust the execution strategy.

  • Because impact scales sublinearly, large orders are typically broken into smaller ones to get optimal execution.

  • To optimize the sequence of order placementβ€”smart order routing.

Read more about it in this PDF:

Direct Estimation of Equity Market Impact
252KB βˆ™ PDF file
Download
Download

Optimal execution strategies

Optimal execution strategies aim to split a large order into smaller pieces to minimize total execution costs. These costs stem from two primary sources: the market impact incurred by executing tradesβ€”both temporary and permanentβ€”and the risk associated with holding an inventory while the market moves. The challenge is to find the right balance between minimizing impact costs and reducing the risk from price volatility.

One popular model in this domain is the Almgren–Chriss framework, which balances the trade-off between expected execution cost and risk.

The Almgren–Chriss framework

In the discrete-time Almgren–Chriss model, an investor needs to sell X shares over N intervals. Let vk​ denote the shares traded in period k, and let the execution price be modeled as:

\(p_k = p_{k-1} + \theta v_k + \varepsilon_k\)

where ΞΈ represents the permanent impact coefficient and Ξ΅k​ is an IID noise term. The effective execution price incorporates temporary impact and is given by:

\(\tilde{p}_k = p_k + \rho v_k + \frac{S}{2}\,\text{sgn}(v_k),\)

with ρ as the temporary impact coefficient and S the bid–ask spread.

The objective is to minimize the implementation shortfall:

\(C(v) = \sum_{k=1}^{N} v_k \tilde{p}_k - X p_0.\)

This minimization is performed under the constraint:

\(\sum_{k=1}^{N} v_k = X\)

Below is an illustrative Python snippet that uses a simplified version of the optimal execution strategy.

import numpy as np
import matplotlib.pyplot as plt

# Parameters for optimal execution
X = 10000         # total shares to sell
N = 50            # number of trading intervals
p0 = 100.0        # initial price in dollars
theta = 0.0001    # permanent impact coefficient
rho = 0.0002      # temporary impact coefficient
spread = 0.05     # bid-ask spread in dollars

# Time grid
time_grid = np.linspace(0, 1, N+1)

# Assume a constant trading schedule (VWAP strategy)
v_optimal = X / N * np.ones(N)

# Compute the evolution of the asset position
X_remaining = [X]
price = [p0]
for v in v_optimal:
    # Update price due to permanent impact (simplified)
    new_price = price[-1] + theta * v
    price.append(new_price)
    X_remaining.append(X_remaining[-1] - v)

For the purpose of this example, we assume a constant trading rateβ€”by using the VWAPβ€”and plot the evolution of the remaining shares over time.

This shows how a constant trading rate reduces the position gradually and how the permanent impact causes a slow drift in the price. More advanced optimal execution algorithms would incorporate risk aversion and adjust the trading schedule accordingly.

Impact vs risk

In many modelsβ€”such as the Almgren–Chriss frameworkβ€”the cost function is formulated as a sum of two components:

This post is for paid subscribers

Already a paid subscriber? Sign in
Β© 2025 Quant Beckman
Privacy βˆ™ Terms βˆ™ Collection notice
Start writingGet the app
Substack is the home for great culture

Share