Deep Dive into IS: The Almgren-Chriss Framework

Anboto Labs
15 min readApr 12, 2024

--

(IS Algo Article — Part 2/2)

By Suren Markosov, head of Quantitative Research, Anboto Labs

This article is for advanced readers who enjoy mathematical computations 🙂

You can read the intro article to the Implementation Shortfall (IS) algo here.

Summary

  • Anboto Labs has implemented the Almgren-Chriss (AC) framework in its Implementation Shortfall (IS) execution algo to help clients minimize slippage by balancing the trade-off between market impact and execution risk.
  • The AC framework provides a theoretically optimal, tractable, and transparent solution for minimizing the expected cost of trading while considering the client’s risk aversion. Anboto’s IS algo adapts the AC framework to the crypto market by using real-time market data for key parameters and making adjustments to address the limitations of the AC model.
  • The IS algo’s behavior is influenced by the asset’s inherent characteristics (temporary impact and volatility) and the client’s risk aversion level, as well as the user-specified liquidation time.

Introduction

The goal of the IS family of algos is minimize the Implementation Shortfall (IS) of a trade by striking the optimal balance between market impact and execution risk, while taking into account the client’s aversion to the execution risk (expressed as the Urgency or Risk-Aversion parameter, λ). Stated differently, the algo estimates the efficient trading frontier (using a forecast model of market impact) and then finds the relevant point on that efficient trading frontier and converts it into a trade schedule (sometimes also known as the “trade trajectory”).

The Almgren-Chriss (AC) framework, introduced in their seminal 1999 paper “Optimal Execution of Portfolio Transactions”, has become a cornerstone of IS algorithm design in the industry. This framework is attractive for several reasons:

  1. Theoretically Optimal: The AC framework provides a theoretically optimal solution to the problem of minimizing implementation shortfall. By considering the trade-off between market impact and opportunity cost, the framework derives the optimal execution strategy that minimizes the expected cost of trading.
  2. Tractable and Closed-Form Solution: One of the key advantages of the AC framework is its tractability. Under certain assumptions, such as the so-called “linear market impact” functions (to be discussed further below), the framework yields a closed-form solution for the optimal trading trajectory. This makes the implementation of IS algorithms based on this framework more straightforward and efficient.
  3. Transparency in Assumptions: AC is transparent in its assumptions about market dynamics and impact functions. This transparency allows traders and asset managers to understand the underlying assumptions and adapt the framework to their specific needs and market conditions.

AC considers the problem of liquidating a portfolio of assets over a fixed time horizon (supplied by the trader using the algo) while minimizing the expected cost of trading. The AC framework makes several simplifying assumptions, listed below.

  1. X units of asset needs to be liquidated before time T. If we divide T into N intervals of length τ =T/N, and define the discrete times tk = κτ , for κ ∈ {0,…,N}. The set of actions done by the algo can defined by one of the two (equivalent) lists:
  • Trading trajectory : {x0, …, xN }, where xk is the number of units held at time tk;
  • Trade List: {n0, …, nN }, where nk is the number of units of coin that will be sold between times tk−1 and tk, i.e. nk = xk−1 − xk

2. assumes that the asset price follows an arithmetic Brownian motion with a linear permanent market impact:

where σ represents the volatility of the asset, the ξj are draws from independent random variables each with zero mean and unit variance, and the permanent impact g(v) is a function of the average rate of trading v = nk/τ during the interval tk−1 to tk.

3. Then a sell program, Implementation Shortfall (IS) can be defined as:

where the first term (X * S0) is the initial position value (S0 is the arrival price, X is the total number of units to be sold), and the second term. (∑〖 nkSk〗) is the execution price, which can be further expanded as follows (equitation 3 in the AC paper)

The AC paper describes the 3 components of the above equation:

- The first term on the right hand side of (3) is the initial market value of our position; each additional term represents a gain or a loss due to a specific market factor:
- The first term of this type is ∑1/2kxk, representing the total effect of volatility.
- The permanent market impact term -∑xkgnk/ represents the loss in value of our total position, caused by the permanent price drop associated with selling a small piece of the position.
- And the temporary market impact term, ∑nkhnk/, is the price drop due to our selling, acting only on the units that we sell during the kth period.

The charts and a quote below (from a commonly used book on algorithmic trading) illustrate the difference between the temporary and permanent components of market impact

“Temporary impact represents the liquidity cost component and is due to the urgency needs of the investor. This is the price premium buyers need to provide the market to attract additional sellers and the price discount sellers need to provide to attract additional buyers. This cost component can be effectively managed during implementation of an investment decision.

Permanent impact represents the information cost content of the trade. This quantity causes market participants to adjust their prices to a new perceived fair value. As participants observe buy orders their perception is that the stock is undervalued and they will adjust their offer prices upward. As participants observe sell orders their perception is that the stock is overvalued and they will adjust bid prices downward. It is an unavoidable trading cost”

Source: Kissell, Robert. “Algorithmic trading methods: Applications using advanced statistics, optimization, and machine learning techniques.” Academic Press, 2020

4. The optimal execution problem is formulated by the AC paper as a mean-variance optimization problem, where the objective is to minimize the expected cost of trading plus a risk aversion term multiplied by the variance of the trading cost (equation 15 in AC paper)

Minimize ( E[IS] + λ * Variance[IS] )

or

where λ is the level of risk aversion. For a given trade trajectory AC paper provides the formulas (equations 4 & 5) for the expected value and variance of IS

5. AC uses the so-called linear impact functions to model both the permanent and the temporary components of the market impact. The functions are called linear because they are “linear” in the rate of trading, but they are actually quadratic in total size of the trade (this aspect will be explored in more detail in the next section):

Permanent Impact (equation 6 of the AC paper):

where the coefficient γ has units of ($/share)/share. With this form, each n units that we sell depresses the price per share by γn, regardless of the time we take to sell the n units.

Temporary impact function (equation 7 in AC paper)

where sgn is the sign function.

This means that the cost per share of trading nk shares has a fixed cost (ε ) + the cost proportional to the size of the trade. To show the quadratic nature of the impact function with respect to the total size of the trade, the authors show the total cost of selling n units in a single unit of time:

And the expectation of the impact cost (combining permanent and temporary impact) :

where

6. Using the above formula, AC calculate the expected IS and variance of IS for a couple of key strategies located on the efficient frontier, e.g. :

  • the minimum impact strategy which is essentially a straight-line (TWAP) from order arrival to the user-specified end-time T (equations 9, 10, and 11 in the AC paper).
  • the minimum variance strategy (equations 12 and 13 in the AC paper) — note that this zero variance comes at a “arbitrarily large” expected impact in the AC model if the interval τ is set to be sufficiently short (e.g. 1 second), as zero variance implies immediate execution of the entire order quantity (‘X’ in the formulas below):

The above two strategies represent the extremes of the efficient trading frontier. Neither of these strategies is likely to be used by a risk-averse trader: trading using minimum impact strategy implies that the trader is risk-neutral ( λ = 0). Immediate execution implies the trader has a near-infinite risk aversion and so is willing to suffer an arbitrarily large impact in order not to have any execution risk. The optimal strategies that are of more practical use to traders are going to lie in between these two extremes.

7. The authors proceed to derive an explicit solution to this optimization problem, which yields the optimal trading trajectory, which specifies the number of shares to be traded at each time step. This solution is shown below (equations 17 and 18 from the AC paper)

Trading trajectory, i.e. holdings (unexecuted amount) xj at east time step j :

And the associated (equivalent) trade list nj, for each time step j :

where sinh and cosh are the hyperbolic sine and cosine functions, and tj-12=j-12.

For small time steps ( κ ) , k has the following approximation (equation 19 in the AC paper)

The paper also provides the exact formulas for κ (equation 16 and its solution) — these exact formulas are used in Anboto’s implementation of the AC framework. For clarity of our discussion of the AC logic, it’s easier to use the above approximation.

AC paper (equation 20) also provides the formula for calculating the market impact (expected IS) and the execution risk (variance of IS) for the optimal strategy represented by the trading trajectory described above:

8. Using these formulas, the AC framework allows us to plot the entire efficient (optimal) trading frontier and to select strategies (= trajectories = trade schedules) on that frontier which match with our risk aversion (urgency) levels (λ). The charts below show 3 strategies, with different degrees of risk aversion (note: the execution risk in AC paper is expressed as Variance, so the λ values are on a different scale than the λ’s in our earlier example in the previous section):

Source: Almgren and Chriss. “Optimal execution of portfolio transactions” (Figures 1 & 2)
Source: Almgren and Chriss. “Optimal execution of portfolio transactions”

The trajectories in the chart on the right correspond to the frontier points shown in the chart on the left: (A)λ=2×10−6, (B)λ=0,©λ=−2×10−7. Strategy A represents a risk-averse trader (λ>0), strategy B is a risk-neutral ( λ=0) trader who only cares about impact and not execution risk), and strategy C is a risk-seeking trader (λ<0), the last one being a somewhat unlikely scenario.

In figure 5 below, we have extended the trajectories from Figure 2 in AC paper, to demonstrate how the optimal trajectory becomes more curved (i.e. trades more rapidly) as the lambda (λ) value increases. As the lambda decreases to zero, the trajectory becomes linear (a TWAP). Please note that lambda is not the only driver of how curved the trading trajectory is, the other 2 drivers of the curvature are absolute volatility of the asset (the more volatile the asset — the more curvature) and the temporary market impact parameter (higher impact results in less curvature, i.e. makes the trajectory more linear). More on this in the section below dedicated to the Kappa ( κ) coefficient.

Inputs going into AC calculations

Let’s remind ourselves about all the inputs that go into the AC calculation of its optimal strategy/trajectory:

  • total time for liquidation T: supplied by the user
  • risk aversion coefficient : supplied by the user
  • total number of units to liquidate X : supplied by the user
  • temporary impact cost parameter : estimated by the algo provider.
  • permanent impact cost parameter : estimated by the algo provider.
  • securities volatility : estimated by the algo provider.

The AC paper suggests methods and heuristics for estimating the temporary and permanent impact parameters, and in our implementation of the IS algo we followed the authors’’ suggestions pretty closely. These methods are discussed in section 3.4 of the AC paper (“3.4 Choice of Parameters”):

  • For the temporary impact parameter (“eta”), AC rely on an assumption that trading 1% of daily volume would result in a temporary impact equal to a full bid-ask spread. In other words η=BidAskSpread(0.01*Daily Volume)
  • For the permanent impact parameter γ (“gamma”), AC rely on an assumption that trading 10% of the daily volume would produce a permanent impact of a full bid-ask spread. In other words γ=BidAskSpread(0.1*Daily Volume)
  • The volatility parameter σ “sigma” is an absolute daily volatility number expressed in $/share in AC paper (and would be in units of the quote currency, in the crypto context). In other words, for an σ =Annualized VolatilityDays in a Year*AssetPrice.

More about AC Trajectories: the meaning of Kappa ( k )

The AC paper dedicates a whole separate (and very informative) section (“2.3 The half-life of a trade”) to the meaning of the κ (“kappa”) coefficient present in their optimal trajectory formula. As a reminder, k is approximated in AC by the formula below (see equation 19 in the AC paper):

i.e., κ is an increasing function of risk aversion ( ) and volatility ( ), and a decreasing function of the temporary market impact parameter ( ). There are 2 important things to note here:

  1. As mentioned in an earlier section, risk aversion ( ) is not the only driver of the optimal trajectory’s curvature. As a reminder, the more curved the trading trajectory, the more rapidly the IS algo trades. Curvature is driven solely by the value of the κ coefficient (the higher the κ value, the more curved the trajectory), which means that higher curvature can be driven by either higher risk aversion ( ) or volatility ( ), or by lower temporary market impact parameter ( ) value.
  2. Section 2.3 of the AC paper introduces a parameter “theta” θ = 1/κ, calling it the “half-life” of a trade. To be more precise, θ represents the time required to reduce the unexecuted amount of the order by a factor of e (i.e. by roughly 2.718, or in other words, by 63%), in the absence of a time constraint (i.e. if the user sets the time to liquidate T to a very large number).

This above points highlight the fact that IS algo’s execution trajectory strategy is not solely determined by the user-specified liquidation time but also depends on the inherent characteristics of the asset ( , ) and by the trader’s risk aversion level ( ). The figure below, from another paper authored by Almgren and Chriss describing their AC framework, shows intrinsic half-lives (θ ) for a sample of US stocks. Each point in the figure represents a different stock. Its position is determined by its temporary impact parameter (vertical axis) and its volatility in dollars per day ) (horizontal axis). The dashed lines are lines of constant half-time (θ) time. Two stocks lying on the same line have the same intrinsic half-life and, therefore, would have the expected IS (slippage) a given level of risk aversion and a given trade size (each adjacent pair of lines differs by a factor of 10).

Source: Almgren, Robert, and Neil Chriss. “Value under liquidation.” Risk 12.12 (1999): 61–63.

Similar intrinsic half-life analysis can be done for different crypto pairs, to help clients assess the tradeoffs involved in trading different coins and to optimize their use of the IS algo.

The AC paper considers different scenarios of the user-specified liquidation time (T) in relation to the trades “intrinsic” half-time (θ = 1/κ ):

  1. In scenarios where T≫θ (i.e. the T/ θ = κ T value is high), then the intrinsic half-life θ of the trade is small compared to the user-specified time T
  • This happens because temporary costs ( ) are very small, or because volatility ( ) is very large, or because the risk-aversion setting ( ) was set very high by the user.
  • In this case, the bulk of IS algo’s trading will be done well in advance of time T . Viewed on time scale T, the trajectory will look like the minimum-variance solution (i.e. fast).

2. In scenarios where T≪θ (i.e. the T/ θ = κ T value is low), the then the intrinsic half-life θ of the trade is large compared to the user-specified time T.

  • This happens because temporary costs ( ) are very large, or because volatility ( ) is relatively small, or because the risk-aversion setting ( ) was set very low by the user.
  • In this case, the IS algo’s trading will look like a straight-line minimum impact strategy (i.e. TWAP), as the strategy’s behavior will be dominated by the market impact cost.

Limitations of AC (and Anboto’s adjustments to address those limitations)

The above highlights an important limitation of the AC framework: different order sizes of the same security will be liquidated in exactly the same fashion, for a given (constant) value of the risk aversion parameter λ.

  • In practice, large trades are typically perceived as less liquid than small trades (for the same asset), and traders might prefer to liquidate them more slowly.
  • This surprising result stems from the assumption of linear market impact functions, which mechanically leads to both the variance and market impact scaling quadratically with respect to the trade size.
  • The AC authors concede that in reality there is likely to be non-linearity (superlinearity, to be precise) in the temporary impact cost relative to the trade size.
  • To address this, the AC paper suggests choosing different values of the temporary impact parameter η depending on the size of the trade (higher η values for larger trades).

To account for the above limitations and idiosyncrasies present in AC framework (as acknowledged by the authors themselves) in our implementation of the IS algo (which otherwise follows the AC logic very closely) we have made some adjustments to the way the input parameters are estimated, so as to minimize the counterintuitive behavior of the IS algo in some of the scenarios discussed above (especially in the “T≪θ” scenario where the IS algo may otherwise exhibit TWAP-like behavior). These adjustments are consistent with the suggestions presented in the AC paper and are designed to make our IS algo’s behavior more intuitive.

Conclusion

Anboto’s implementation of the Almgren-Chriss framework in the newly released IS algo represents a significant addition to our algo suite. It will help our clients strike a balance between price impact and execution risk, by adapting the algo’s trading behavior to the specific characteristics of the individual digital assets, and to the clients urgency/risk-aversion levels.

As the crypto trading landscape continues to evolve, the importance of effective execution algorithms will only grow. Anboto’s pioneering work in this area sets a strong foundation for further innovation and development.

-x-

If you have any questions about our IS algo or any other aspects of our product offering, please feel free to reach out to us at info@anboto.xyz

--

--

Anboto Labs

Providing traders with the execution tools they need