Since the creation of financial markets, operations have been carried out manually by people. Starting in 2003, thanks to technological developments and the ease of internet access, this began to change. In that same year, algorithmic trading represented only 15% of the volume traded in the market. In subsequent years, financial markets have been transformed and what used to be the exception nowadays accounts for more than 80% of the orders sent.
One of the most relevant advancements in recent years was the massification of order execution algorithms, which have the purpose of dividing a larger order into several smaller ones in order to minimize the impact on market prices and thus obtain a more convenient average price.
In this article, we will focus on these types of algorithms, and we will explain in detail the most relevant ones that everyone should be aware of.

What are Order Execution Algorithms?

Order execution algorithms consist of a set of trading rules that have the objective of dividing a large order into smaller ones in order to minimize market impact and thus obtain a better average fill price. There are countless types of execution algorithms, but they commonly execute orders based on time intervals, historical trading volume curves, or a mix of both, amongst other possible variables.

Hedge Funds and proprietary firms tend to be secretive when it comes to the specific implementation of execution algorithms. In addition to trading strategies, execution algorithms tend to play a major part when it comes to the overall profitability of a shop. This is especially true for firms that rebalance frequently or trade on smaller timeframes.

Order execution algorithms have many advantages when compared to traditional manual execution, such as:

  • Sophistication: automating the execution of trades allows for the implementation of complex and processing-intensive rules that would be otherwise impossible to follow in such a time-sensitive environment.
  • Optimization: developers can further refine the execution logic in order to improve the average fill price.
  • Backtesting: although very difficult to implement, order execution algorithms allow for testing the performance of a given algorithm. This not only requires Level III Quotes (market depth) but also to make some strong assumptions regarding the impact on price. Mathematical modeling sophistication is essential for these types of exercises.
  • Reduced costs: manually rebalancing a portfolio of hundreds of assets can be very time-consuming, making it impossible to execute all trades in a few minutes. Order Execution Algorithms can work concurrently and carry out all rebalancing tasks in a timely, foreseeable, and error-free fashion.
  • Better fill prices: whether we are buying or selling an asset, Order Execution Algorithms are designed to deliver a better average fill price than simple market or limit orders.

Why are Order Execution Algorithms important?

In order to answer this question, we first have to understand how an order book works.

An order book organizes all current market orders and sorts them according to their price and time of creation. Buy Orders (Bid) get sorted by decreasing price, whereas Sell Orders (Ask) are sorted by increasing price. The buy order with the highest price is the first order to get executed when an opposing party willing to sell to that price enters the order book. Additionally, when two buy orders are created at the same price, the one that was first created has priority.

As most of us also know, the two most important order types are “Market Orders” and “Limit Orders”.

Limit orders allow traders to set a maximum price for which they are willing to purchase an asset. Conversely, they can choose the minimum price required for selling an asset. On the other hand, Market Orders allow traders to buy or sell a given number of shares with complete certainty at an uncertain price, whereas Limit Orders allow for selling or buying an uncertain number of shares at a known price.

We can conclude that Limit Orders provide a better average price than Market Orders, but at the cost of probably not being able to fill the desired quantity. The probability of filling the order depends on how aggressive or close to the market price the limit price is set.

Order execution algorithms oftentimes consist of a mix of Limit and Market Orders, and are implemented to obtain the best fill price while still filling the desired order quantity.

In the following sections, we will detail and discuss the most popular order execution algorithms, and their respective advantages and disadvantages

Popular Order Execution Algorithms

Although the specific implementations of order execution algorithms used in the industry tend to be proprietary and closed-source, they tend to derive from one of the following algorithms.

Time-Weighted Average Price (TWAP)

The TWAP algorithm aims to execute orders in a uniform manner in a previously determined period. In other words, TWAP algorithms have the objective of trading at a rate proportional to time.

Consider a case where a trader wants to buy 100 shares of a given stock in the following hour. If we split the hour into 10 intervals, the algorithm should buy 10% of the total order in the first 6 minutes, 20% at 12 minutes, and so on. By the one-hour mark, the algorithm should have acquired 100 shares.

Following these rules can be trivially done by sending a market order for 10 shares every 6 minutes. Of course, this would not be very convenient. Although we are reducing market impact by dividing a big order into smaller ones, we are not optimizing the average fill price. This simple algorithm can be strictly improved by also introducing Limit Orders.

On t=0, we create a limit order for 10 shares. After 6 minutes, the TWAP checks how many shares we were able to acquire at the given limit price and creates a market order for the remaining quantity. For example, if only 5 of the 10 shares were bought during the first 6 minutes, the execution algorithm creates a market order for the 5 remaining shares required.

Having done so, the algorithm creates the next limit order for 10 shares that should be bought during the next 6 minutes. The unfilled quantity will again get filled by a market order at the 12-minute mark.

This process will continue until we acquire the entire 100 share lot, which will happen with certainty sometime between 54 and 60 minutes after starting the TWAP.

When implementing a TWAP algorithm, the developer has to consider the following parameters:

  • The total time horizon for executing the algorithm: If the time horizon is too short, the overall impact on price will increase. Conversely, if it is too large, risk exposure to changes in price increases.
  • The number of intervals: the fewer intervals, the bigger each order will be, leading to increased market impact. On the other hand, too many intervals decrease the duration of each one and thus decrease the probability of the limit order of getting filled.
  • Limit Price: the further away the limit price from the market price, the higher the probability of having to fill the quantity with a market order at the end of the interval.

The execution profile of the algorithm looks as follows:

Volume-Weighted Average Price (VWAP)

It is a known fact that there are times of the day that tend to have more transactions than others. For example, the first and last minutes of each trading day feature a larger number of transactions than any other time of the day. Given that an order’s market impact is smaller when large volumes are traded, it stands to reason that it is convenient to place larger orders at such intervals. This is exactly what VWAP does.

Instead of splitting orders into fixed intervals as the TWAP algorithm does, the VWAP algorithm splits a large order into smaller ones based on the volume traded. It also follows a schedule, but instead of being proportional to time, the VWAP schedule is proportional to the historical intraday volume profile of the asset.

Regardless of the shape of the profile, the algorithm will split the order into segments of equal volume and form a schedule. If the VWAP is instructed to buy 100 shares over the next hour, it will do so based on the estimated interval volume. If 10% of the total volume occurs over the first 3 minutes (double the average volume), it will fill 10% of the total order size over that interval.

In contrast to the TWAP, the VWAP requires forecasting the volume profile based on historical patterns. These have to be as accurate as possible and require taking into consideration lots of features that have large impacts on traded volume, such as:

  • The time of the day
  • The day of the week
  • The existence of “special” days. Dates where futures or options expire feature much larger trading volumes than “regular” days.

Having stated the main distinction between the TWAP and the VWAP, the remaining considerations are exactly the same and choosing the time horizon, the number of intervals, and the limit price has the same implications.

The trading profile of the VWAP looks as follows:

Implementation Shortfall (IS)

Also known as Arrival Price algorithms, Implementation Shortfall execution algorithms are among the most widely used algorithms in the industry. In contrast to TWAP and VWAP, the basic implementation of the IS algorithm cannot be characterized with precision. Instead, we will outline the general idea behind these types of execution algorithms.

Implementation Shortfall is commonly known as a performance metric that measures the difference between a realized live trading implementation and the respective paper trading or backtesting counterpart. If we define the arrival price as the price where a given signal is issued, Implementation Shortfall is the difference between the realized buy and sell price and the arrival price.

One of the earliest and most popular implementations describes an algorithm whose objective function is to minimize the execution cost, a risk penalty, and the expected alpha cost.

  • Execution Cost: speeding up the trade will increase execution costs.
  • Risk: speeding up the trade will decrease risk, as measured by the potential change in price.
  • Alpha Loss: if the alpha of a given signal decreases rapidly (like for news events), slowing down execution will increase the alpha loss.

Execution and Risk can be thought of in the usual risk-return terms commonly used in investment. Also, all else being equal, a greater positive alpha will lead to more aggressive trading. The alpha loss is also not required to be linear but can have a trajectory that depends on time.

Having considered all three aspects of an Implementation Shortfall algorithm, we could characterize the objective function as follows:

E[TotalCost] = E[ExecutionCost] + E[AlphaLoss] + RiskPenalty

Whereas execution costs and the risk exposure are the same for all market participants (at least in principle), the risk penalty is subjective and unique for each trader and depends on the traders’ individual risk aversion.

As said previously, the specific implementation and execution of an Implementation Shortfall algorithm cannot be precisely characterized, but we can still analyze how the parameters affect the objective function.

We could, for example, execute an order with a TWAP algorithm, and the Implementation Shortfall objective function would determine its time horizon.

  • In absence of a risk penalty and alpha, the TWAP would have a long time horizon that would minimize the execution cost.
  • The higher the volatility of the stock and the higher the risk aversion of the trader, the shorter the time horizon would be.
  • A bigger alpha signal with a steep alpha loss profile would lead to a shorter time horizon for the TWAP.

As can be seen, some variables are minimized with longer time horizons, whereas others are minimized with shorter ones. This leads to a trade-off, and the optimal is found by minimizing the total expected cost.

In-House vs. Broker Implementation Shortfall algorithms

Last but not least, there is an important distinction to be made between proprietary IS algorithms developed and operated in-house and the ones used by brokers.

Proprietary firms do have information regarding their risk aversion and their expected alpha, meaning that they can incorporate these parameters in order to optimize the IS objective function and create an optimal trading schedule.

Brokers, on the other hand, are unable to know the individual risk aversion of each client. Also, for obvious reasons, traders are also reluctant to share the alpha profiles. The workaround that brokers have created is to aggregate both the risk aversion and the alpha of the client into a single parameter: “urgency”. This will determine how aggressively an order should be executed. It is up to the clients to determine how “urgent” a given order should be, and this is done by testing a few trades with different “urgency” values and creating an “urgency” profile that they can plug into their Implementation Shortfall function and run the optimization in-house.

Conclusion

As can be seen, order execution algorithms play a non-trivial part in the performance of proprietary firms and hedge funds alike, and the degree of sophistication of their implementations can require entire teams devoted to their research and optimization.

In the present article, I only covered the most important and popular ones. Although these straightforward implementations might not be used by the most rigorous shops, we can safely assume that their in-house implementations derive from at least one of the algorithms covered.

Categories:

Tags:

[convertkit form=4793161]

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *