26 March, 2019

Book Survey: Algorithmic PartTrading & DMA

This text book by Barry Johnson provides an introduction to algorithmic trading and execution strategies, as well as discussing market microstructure details for the major asset classes.

As with other book surveys, we will write down a sequence of increasingly detailed skeletons representing the structure of the text book.  This methodology helps organize one's thinking and enables memory recall when certain information from the text is needed in future situations that my arise, such as in cross-referencing information in other text books being analyzed the same way.

___________________________________________________________

Skeleton I: Part Overview


Part 1: An Overview of Trading and Markets


The author gets things started with an introduction to algorithmic trading as a means of executing orders and direct market access strategies.  The various actors in all markets, including dealers and brokers ("sell side"), institutional traders ("buy side"), exchanges, over-the-counter, etc. are covered.  The text then provides a survey of market microstructure, which is the study of price discovery and formation, trading mechanisms and transaction costs (as opposed to economics, asset pricing, etc. which tend to abstract away these concepts with sweeping generalizations regarding liquidity, continuous trading, etc.).  Finally, the part ends with a survey of the markets both in respect of asset class and geography.  Markets covered include equity markets, futures & exchange-traded derivatives markets, government bond markets, corporate bonds & credit markets, money markets, foreign exchange markets and finally swap & OTC derivatives markets.

Part 2: Algorithmic Trading & DMA Strategies


This is the main part of the text; it begins with an in-depth overview and analysis of orders, which represent specific trading instructions for a broker or exchange and are the basic ingredients on which algorithmic execution strategies are made.  Given the fragmentation of world markets, a discussion on smart order routing is also included.  The text then proceeds to a menu of various strategies, classified according to whether they are principally driven by market-impact (e.g., VWAP), cost (e.g., implementation shortfall) or taking advantage of opportunistic circumstances (e.g., liquidity-seeking).  Once the main strategies are covered, a detailed analysis of transaction costs, both pre and post TCA, is provided, followed by what ultimately results in a decision tree for optimal strategy selection based on a variety of considerations including market impact, cost, trader benchmarks, risk aversion, market factors such as volatility and liquidity, and the general balancing of the trade-off between risk and cost.

Part 3: Implementing Trading Strategies


While Part 2 covers the basic details of executions strategies, this part reviews the finer details including order placement and other execution tactics that can be applied to better achieve specific goals of a strategy.  Current market conditions affect order placement decisions and execution probabilities, and these are investigated.  Execution tactics and other mechanisms can be used by trading algorithms to achieve specific goals.  Trading strategies to this point in the book are mostly reactive to market conditions--in principle, they should be amendable to improvement if they can be supplanted with accurate short-term forecasting models of market conditions.  Various models for forecasting market impact, transaction costs, volatility, volume, liquidity, etc. and other trading signals are analyzed and applied to previously discussed trading strategies.  Finally, a discussion of technology and actual implementation & back-testing of strategies in an enterprise setting is reviewed.

Part 4: Advanced Strategies


The final part of the text is a survey of various stand-alone topics and strategies at the "cutting-edge" of algorithmic trading.  These include block portfolio execution and risk management, multi-product (legged/spread) and multi-asset trading strategies, features (including news and textual analysis) and related strategies derived from machine learning and artificial intelligence techniques.

___________________________________________________________

Skeleton II: Chapters


Part 1: An Overview of Trading & Markets


Chapter 1: Overview of Electronic Trading


Simply a brief history and overview of algorithmic execution and DMA; most information is summarized in the section names and will be expanded on in the next skeleton.  Notably, the first infographic meshes very well with the one in Inside the Black Box where the formation of investment ideas and decisions is supplanted with full details of the execution and sell-side aspects.

Chapter 2: Market Microstructure


According to the text, economics abstracts itself from underlying mechanics of trading and asset pricing theory focuses exclusively on the fundamental values of assets.  In contrast, market microstructure theory focuses on the actual trading process and analyzes how specific mechanisms affect both observed prices and traded volumes and their patterns; the subject helps explain the various costs which arise and prevent assets from achieving their fundamental values.

The subject consists of three major topics:
  1. Market structure and design
  2. Trading mechanism research
  3. Transaction cost measurement and analysis
The text points out helpful references including the well-known text Trading and Markets by ().

Chapter 3: World Markets



A survey of the main asset classes traded in world markets, their respective market structures and issues such as regulation, trading in international venues, volume, liquidity and costs comparisons, etc.  The classification is:
  1. Equity
  2. Fixed Income (collectively with (1) the Capital Markets)
  3. Foreign Exchange
  4. Funding (Money Markets)
  5. Derivatives
Commodities as an asset classes are subsumed by derivatives because the trading of commodities is carried out almost exclusively on futures exchanges now.  The text has more detailed appendices for each asset class and points to reports by consultancies including the Aite Group, Celent, Greenwich Associates and TABB Group as being invaluable.


Part 2: Algorithmic Trading & DMA Strategies


Chapter 4: Orders


Orders encode execution instructions and allow investors to communicate their requirements.  Order types and conditions enable a huge variety of requirements and objectives to be expressed, and are the basic building blocks of all execution algorithms.

The two main order types are market orders and limit orders.  They are exactly opposite with respect to liquidity provision: market orders take liquidity by demanding immediate execution at the best possible price and limit orders are standing orders that execute only after being crossed with a market order at the specific "limit" price.

The conditions that may be applied to a given order control many features of its execution and might include:
  • How and or when it becomes active
  • Its lifetime and duration
  • Whether it may be partially filled
  • Whether it should be routed to other venues or linked to other orders
By combining the above order conditions with the vanilla market and limit orders, a number of derived order types may be achieved, some of which are now provided natively by the exchanges as stand-alone order types.  Some of these derived types include:
  • Hybrid orders, such as market-to-limit
  • Conditional orders, such as stops and trailing stops
  • Hidden orders, such as iceberg orders
  • Discretional orders, such as pegged orders
  • Routed orders, such as pass-through orders
Notably, all order types discussed are based on the assumption of an order book.  While this may seem restrictive to certain asset classes (and ultimately it is), fundamentally all markets revolve around an order book regardless of the trading mechanisms, whether it is electronic trading on a public exchange via DMA, RFQ or a phone-based OTC.  The only significant difference is that for quote-driven markets the order book is completely private and belongs to the dealer/market-maker, whereas for order-driven markets the order book is usually centralized and transparent.  Another key assumption is that continuous intraday trading is assumed, as this is the period most relevant to electronic trading.  Other types of trading, such as opening and closing auctions, are also discussed briefly but are not the main focus.

Chapter 5: Algorithms


Algorithmic execution can be broadly sub-divided into two regimes: the macro and the micro.  The macro establishes the general trading strategies including the static trajectory or the inputs that determine a dynamic one, as well as the benchmark on which the success of the algorithm is judged.  The micro level, also collectively called execution tactics, help the given algorithm achieve its benchmark and objectives.  These micro level decisions make opportunistic choices, route orders in a smart way, and make other decisions based on market data in order to "scalp" as much of the transaction costs as possible as PnL.  The focus of this chapter is on the macro level, and to this is the definition of algorithmic trading according to the text.  Micro level decisions, defined as execution tactics in the text, are discussed in detail later.

Execution algorithms have several different classifications according to many different authors.  One such classification is the mechanistic (i.e., purely how the algorithm functions) scheme of:
  • Schedule-driven
  • Evaluative
  • Opportunistic
The schedule driven algorithms include static TWAP and VWAP algorithms, and at the other extreme liquidity seeking algorithms are opportunistic, trading aggressively when conditions are favorable and passively, if at all, when conditions are not.  In the middle, evaluative algorithms tend to be schedule-driven at the macro level and opportunistic at the micro level (so here are taking the broader view of an algorithm as a combination of the macro and micro decision logic).  The text uses a slightly modified schema that better aligns with classification based on a trader's goals, being:
  • Impact-driven
  • Cost-driven
  • Opportunity-driven
Impact-driven algorithms aim to reduce overall market impact and information leakage, whereas cost-driven algorithms try to reduce overall trading costs, which is a broader mandate than market-impact driven algorithms (though with that, the market-impact component of transaction costs may not be fully minimized compared to an impact-driven algorithm as other factors such as opportunity cost from unfilled orders, price trends and volatility/timing risks need to be taken into account).  The opportunity-driven algorithms are analogous to the mechanistic classification for opportunistic algorithms.

An important note: the text focuses on algorithms that might be used by an execution trader or investor; algorithms deployed for specific purposes of market making, statistical arbitrage, high-frequency strategies, etc. are beyond the scope of the text and some references should be investigated for this.  There are some examples of portfolio trading, pairs trading, and some others later in the text, however.

Chapter 6: Transaction Costs


The study of economics and asset pricing tend to abstract away transaction costs and other market frictions, focusing on neat theory and fundamental intrinsic value.  The study of transaction costs (and market microstructure at a whole) helps explain how assets fail to achieve their fundamental values.  One of the most common ways of evaluating transaction costs is comparing the returns of a live strategy with the corresponding paper returns.  If this measure is taken alone, then it is typically referred to as the implementation shortfall or slippage.  There are numerous other types of transaction costs, however, and even some that are completely orthogonal to the slippage.  One such example is opportunity cost arising from unfilled orders.  While transaction costs are not completely unavoidable, they can always been minimized and so an in-depth understanding of what they are and how they arise is critical in order to maximize investment returns, and the shorter the investment horizon or the greater the frequency and volume of trades, the more important minimizing transaction costs become.

Transaction cost analysis can be broadly divided into pre-trade and post-trade analysis.  The pre-trade analysis depends on a variety of data including price data, liquidity data, volume data, risk and volatility data, and finally bringing this all together into a transaction cost model to help investors estimate the likely transaction costs of their prospective trades.  The post-trade analysis and its history enable investors to evaluate performance of their traders, their algorithms and their brokers relative to chosen benchmarks.

The types of transaction costs include:
  • Taxes
  • Delay Cost
  • Commissions
  • Fees
  • Spreads
  • Market Impact
  • Price Trend
  • Timing Risk
  • Opportunity Cost
These can be classified based on:
  • Phase of the investment process (buyside decision / execution)
  • Level (explicit, implicit, fixed, variable)
  • Macro/micro focus (algorithms, execution tactics)
Though not every cost type has such a class association (for example, taxes are not the responsibility of either algorithms or execution tactics).


Chapter 7: Optimal Trading Strategies


This chapter focuses on the concept of best execution and selecting an algorithm to best achieve it according to some benchmark or requirements.  The concept of the efficient trading frontier, which compares (timing) risk to expected cost of execution, and maps trading algorithms to the optimal frontier curve.  This is analogous to modern portfolio theory's mapping of optimal portfolios to an optimal frontier curve in the space of expected investment returns versus portfolio variance (risk).  As will be expanded on in detail, the optimal frontier is a function of benchmark, so it is critical that this is chosen wisely and in accordance with investment objectives and requirements.

A decision tree can be used to illustrate the process of choosing an optimal execution strategy.  Roughly it is summarized by following this sequence of steps:
  1. A portfolio manager initially notifies the execution trader of the order
  2. If there are any specific restrictions then the trader must use the designated broker
  3. Otherwise, the trader must assesss how difficult the order will be to trade
    1. For orders that will provide much needed liquidity to the markets, the trader should strive for the optimal price
    2. Similarly, for orders that are judged easy, the trader has a lot of leeway in how best to deal with them
    3. Tough orders may be sub-categorized based on whether:
      • They are a large percentage of average daily volume (ADV)
      • The asset is exhibiting significant trading momentum
      • The investor has flagged the order as urgent

        Depending on the perceived difficulty, the trader then must select the most appropriate method of trading, which can include using algorithms, DMA, trying to cross the order or negotiating a principal transaction with a dealer.

Part III: Implementing Trading Strategies


Chapter 8: Order Placement


Order placement can make or break an algorithm's execution performance.  Executing too aggressively can lead to significant market impact and broadcast our intentions whereas executing too passively risks execution failure leading to substantial opportunity cost or timing risk.  Based on these types of considerations, an order placement system needs to determine each order's size, type, price if applicable, and any special conditions.  For multi-venue markets like US Treasuries and equities, the destination also needs to be considered, and the possibility of hidden liquidity must also be taken into account.

Another way of looking at the problem of order placement is probability of execution, which gives the topic a quantitative bent.  Factors such as liquidity, price trends and other market conditions help us evaluate the likelihood of an order executing, and we can adjust orders to maximize their chance of being filled while also controlling for costs already mentioned.

Recall that the three main steps in trading involve:
  1. Price formation
  2. Price discovery (trade execution)
  3. Settlement (reporting, clearing and exchanging funds/securities)
Order placement is intimately involved in (1) and (2) and thus it is very important to have a strong grasp of the microstructural features of the given market the given asset trades in before even considering the specifics of order placement and determining execution probability.

The price formation process is reflected in the order book's standing limit orders.  Market participants have a wide range of views on the fundamental value of an asset, as well as what they are willing to pay for it or receive for it.  Differences in valuation models leads to uncertainty and therefore trading--if all investors agreed on the value, then there would be little need for price formation and trading volumes would thus collapse.  Various models of price formation exist.  Some of the most common are based on:
  • Dealer/MM Inventory
  • Information & Entropy
  • Order Book Features
  • Hybrid of the Above
Price discovery occurs when a match between an offer and a bid occurs and supply and demand temporarily equilibrate.  SChome of the main price discovery processes include:
  • Bilateral trading
  • Continuous auction
  • Call auction
Order placement decisions can be based on:
  • Signaling risk
  • Venue
  • Order type
  • Order aggressiveness
  • Market factors, including:
    • Liquidity-based factors:
      • Spread
      • Order book information
      • Trade flow
      • Other liquidity-based factors
    • Price-based factors:
      • Volatility
      • Price momentum
      • Price reversion
      • Tick-size
    • Time-based factors:
      • Time of day
      • Last event
  • Hidden liquidity & probability of finding it

Chapter 9: Execution Tactics


The previous chapter went over in detail the considerations for choice of order placement.  In a sense, execution tactics represents a mid-point in the hierarchy of increasing micro-level decisions:
  1. Execution algorithm
  2. Execution tactics
  3. Order placement
The execution algorithm controls the overall decisions and establishes the benchmark.  From there, the execution tactics and finally order placer seek to optimize performance by mitigating as much as possible execution costs and helping the algorithm achieve its benchmark.  The execution tactics, being closer to the algorithm and having a broader "mandate" are more focused on the algorithm's benchmark, whereas the order placement logic is almost exclusively focused on minimizing the cost of execution and maximizing the probability of execution (which can be thought of as part of minimizing cost because execution failure leads to opportunity cost).

The division of labor is clearest for static trading trajectory algorithms.  For example, a simple VWAP algorithm may define a trading trajectory of $x=(x_1,x_2,...,x_n)$ where each unit of time is, say, 15 minutes.  In this loop, a call to something like $trade(x_i)$ might be made, and the choice of trading function encodes the choice of execution tactics.  Finally, within the trade function another function will be called, such as $order(x_{i_j})$ where the order function will then determine the optimal way to execute this sub-size the execution tactic is responsible for, possibly subject to some constraints like take no-risk-on-execution-probability, etc.

Chapter 10: Enhancing Trading Strategies


Essentially all of the algorithms, execution tactics, and order placement logic up-to this point in the book is static or reactive.  This chapter focuses on modeling market factors and other aspects of trading in order to feed predictive signals to the execution layers.  The idea is that if we are good at predicting market factors such as price momentum and volatility, then we should be able to improve the execution of algorithms that (or could) base their choices on these factors, but currently only in a reactive way, by making them more proactive.

Chapter 11: Infrastructure Requirements


This chapter focuses on the technology infrastructure required for algorithmic trading for an enterprise-level operation, touching on all aspects including exchange connectivity, market data feeds, back-testing frameworks, production release cycles and testing, latency reduction, risk management and limits, etc.

Part IV: Advanced Trading Strategies


Chapter 12: Portfolio Trading


///

Chapter 13: Multi-Asset Trading


///

Chapter 14: News & Special Events


///

Chapter 15: Data Mining & Artificial Intelligence


///