You are on page 1of 6

AUTHORs Di Wu Vice President, Algorithmic Trading di.wu@itg.com Kenny Doerr Director, Electronic Trading Desk kenny.doerr@itg.com Cindy Y.

Yang Quantitative Analyst, Algorithmic Trading yu.yang@itg.com

Pairs Trading Algorithms in Equities Markets1


In equities markets, the concept of a pairs trade includes a variety of investment strategies. The investment models themselves range from simple to complex, yet all engage in the simultaneous purchase and sale of two securities with the goal of generating alpha while controlling risk. The inherent sophistication of such strategies makes order execution very challenging. A trader must not only seek liquidity for two stocks concurrently, but the liquidity sought for one stock is entirely contingent upon the available liquidity in the other. These challenges are addressed by many traders through deploying algorithms as an efficient and effective way to source liquidity, reduce transaction cost, and streamline workflow. There are generally two categories of pairs trading: spread trade and switch trade. The former represents the strategies that attempt to profit from temporary dislocation in the relative valuation of underlying assets; the latter consists of swapping two instruments for purposes such as rebalancing portfolio holdings. These distinct investment needs result in two types of pairs algorithms with different trading objectives2. In this paper, we first discuss the defining features for the spread trade and the switch trade. Then, as cross-market pairs have become a fast-growing investment strategy in recent years, we examine the special requirements for executing pairs across different countries. We conclude with a brief discussion on some new trends in pairs algorithms. Spread Trade A spread is derived from the price relationship between two assets; a relationship that can be defined in various ways. Spread trade algorithms are designed to detect changes in spread narrowing or widening and intelligently place orders when the spread becomes attractive for particular investment goals. For example, a merger/ acquisition deal may lead to the long (short) of the target (acquirer) company shares with the expectation that an acquirer will later raise its bid; or a statistical arbitrageur buys and sells two co-integrated stocks so that she can profit from temporary price dislocation. The following features play an integral role in the algorithmic execution of spread trade.

contact Asia Pacific +852.2846.3500 Canada +1.416.874.0900 EMEA +44.20.7670.4000 United States +1.212.588.4000 info@itg.com www.itg.com

1 2

This is a revised and extended version of a paper originally published in The Trade Asia, Issue 13, Sep-Dec 2012. In a sample set of 19,480 orders submitted to ITGs pairs algorithm, 76% of the pairs can be categorized as spread trade vs. 24% as switch trade.

Spread Capture While a pairs trade often involves complex models, well-designed algorithms should support three basic spread types noted in Table 1: price ratio, cash spread, and relative return. The spread should be monitored in real-time by algorithms, while underlying market access tools execute at target price levels. If and when the spread moves away, trading must be paused.
TABLE 1: Three Basic Spread Types Price Ratio Trading Objective Example Relative value arbitrage based on price ratios Scenario: Stock X and Y are co-integrated at a historical price ratio (Y to X) of 0.5 Price ratio spread: Y Price X Price Desired spread: 0.5 Trade: Buy 1,000 shares X, short 1,000 shares Y when spread 0.5 Cash Spread Risk arbitrage such as takeover and mergers Scenario: Company A acquires B in a merger deal that allows B shareholders to receive 0.5 share of A and $0.15 in cash Cash spread: 0.5A Price + 0.15 B Price Desired spread: $0.10 Trade: Buy 1,000 shares B, sell 500 shares A when spread $0.10 Relative Return Relative value arbitrage based on the differential of price returns Scenario: Stock C and D usually move in tandem within a range of 1% Benchmark: Previous close Relative return spread: D Price C Price DPrevClose CPreClose Desired spread: 1% Trade: Buy 1,000 shares C, short 1,000 shares D when spread 1%

Source: ITG Inc.

Considering the spread represents the desired profitability to be locked in, it is critical that spread calculation is consistent with trading tactics. For example, if the spread is derived from the bid (offer) price for buy (sell) orders, a loss may occur if liquidity taking is indeed necessary. A more conservative approach is to construct the spread by using the bid (offer) price for sell (buy) orders. Doing so will guarantee spread capture as long as orders are executed within the NBBO. Order Placement Trading aggressively reduces the odds of missing favorable prices. However, liquidity taking may lead not only to adverse price impact on one leg3, but consequential adverse spread movement for the pair itself. Thus, algorithms must make a trade-off between liquidity provision and removal. Moreover, this decision has to be consistent with how spread is defined. If spread capture assumes buying (selling) at the bid (offer), algorithms can only place passive orders. On the other hand, if the spread is constructed as buying (selling) at the offer (bid), algorithms will have the flexibility of either providing or removing liquidity whenever appropriate. Applying different tactics to different legs also improves execution quality. For liquid stocks with high trading volumes, passive trading may be sufficient to access the liquidity that is needed. For illiquid stocks, a simple solution could be to start with a passive order, then, as time passes, correct to an aggressive order to increase fill rates.

In pairs trading terminology, an order from one side of a pair is often referred to as a leg.

Leg Risk Typically, the sell and the buy leg of a pair remain hedged to lower risk by continuously reducing the net market exposure, i.e., minimizing(|SellFilledValue HedgeRatioBuyFilledValue|). One possible solution to achieve this goal is to execute both legs simultaneously. The downside is that when both legs are working in tandem, market exposure itself becomes a moving target, which is difficult and potentially costly to maintain. Another possible solution is to place orders in sequence; i.e., first trade the initiating leg (often the more difficult side of a pair) for a certain number of shares, then hedge with the opposing leg to quickly offset the initiated position. By trading each side of a pair sequentially, the task of minimizing market exposure becomes more efficient and achievable. Child orders from both legs must be properly sized to not demand more liquidity than the market is willing to provide. After all, the relationship of the pair must be considered, not just the single leg being traded. If not done effectively, a welldesigned pair may instead become a risky, one-sided bet caused by its un-hedged positions. For example, to counter an oversized sell position, an algorithm is forced to buy 1,000 shares when only 600 shares are available in the market. This will force the algorithm to incur large impact to complete the remaining 400 shares. Figure 1 exhibits a hypothetical case of a price-ratio spread trade, in which sell and buy orders have to be filled at 1:1 ratio and execution was only triggered when (SellStock Price)/(BuyStock Price)0.5. The algorithm chose to execute the buy first, then hedge with the sell, as the buy leg is the more difficult stock in this example.

FIGURE 1: Spread Trade Execution


0.5025 0.5020 0.5015 0.5010 Price Ratio 0.5005 0.5000 0.4995 0.4990
"()

Execution is only triggered when spread is in-the-money (i.e., market price ratio desired price ratio). Execution is paused if spread becomes out-of-money (i.e., market price ratio < desired price ratio).

Buy and sell legs are closely hedged against each other.

40,000 35,000 30,000 25,000 20,000 15,000 10,000 5,000 0 Filled Dollar Value $

0.4985 T1 T2 T3 T4 T5 T6 T7 T8 Time BUY Filled $


Source: ITG Inc.

T9

T10

T11

T12

T13

T14

T15

SELL Filled $

Market Price Ratio

Desired Price Ratio

Switch Trade Instead of arbitraging mispriced assets, switch trades focus on efficiently exchanging one position for another by contemporaneously managing leg risk. For example, a trader may want to liquidate an out-of-favor stock and replace it with another that is expected to perform well in the future; or a portfolio rebalancing transaction sells an overweight holding and buys an underweight position. All of these investment strategies can benefit from algorithms that enhance performance while preserving market neutrality. There are two unique features that contribute to the outcome of a switch trade: execution plan and liquidity sourcing. Execution Plan Unlike a spread trade, a switch trade has no notion of capturing spread. Instead, the implementation requires a base plan that intelligently breaks large orders into smaller slices over a target time horizon. This plan focuses on the more difficult leg, which sets the overall pace of execution and typically weighs most heavily on the total transaction cost. The primary objective of the base plan is to reduce slippage against particular benchmarks by employing various approaches, such as schedulebased or implementation-shortfall-based strategies. Additionally, to remain market neutral, a separate plan is applied to the second leg, which is designed to mitigate leg risk through minimizing the net market exposure of a pair. This can be achieved by leveraging fast market access tactics that allow positions to be continually offset. Moreover, the progress of the hedging plan has to be synchronized with the base plan to preserve a balanced two-sided execution. Sourcing Liquidity Speed is less of a concern for a switch trade, because chasing transitory price inefficiency is not its main objective. Thus, it can afford to more patiently discover liquidity from a wider range of venues including lit markets and dark pools, which inherently improves execution quality. For example, algorithms can leverage a lit-market trading strategy to make necessary progress; and overlay it with an opportunistic dark-pool aggregation strategy, which subsequently leads to more midpoint crossing, lower market impact, and less information leakage4. Depending on the urgency levels that traders choose, algorithms must be able to dynamically shift the degree of dark exposure. Under high urgency, priority should be given to executing in lit markets aggressively to reduce the opportunity cost of unfilled shares. Conversely, low urgency orders can submit more shares to dark pools and take advantage of favorable liquidity conditions. It is worth noting that dark orders have to be carefully sized to avoid liquidity shocks (e.g., large blocks are crossed on only one leg), which often result in undesired market exposure and elevated leg risk. Figure 2 shows a hypothetical example of a switch trade. An implementationshortfall execution plan was chosen to reduce arrival price slippage. The net market exposure at any point in time is tightly controlled: never more than 0.5% of the total notional value of the pair.

Selway J. and Pearson P., Dark Liquidity Aggregation State of Play, ITG White Paper, November 2012.

FIGURE 2:
Switch Trade Execution
10,000 Filled Value ($)

Execution is continuous without any pause over the trading horizon

5,000

T1

T2

T3

T4

T5 Time

T6

T7

T8

T9

T10 500 (500) (1,500) Net Market Exposure ($)

8 6 4 2 0 -2 -4 -6 -8

Market neturality is tightly maintained

Performance is driven by price movements on both legs

bps

BUY Filled$ BUY Return


Source: ITG Inc.

SELL Filled$

BUY Filled$- SELL Filled$

SELL Return

Pair Execution Performance (arrival price benchmark)

Cross-market Pairs Todays globalized financial markets create opportunities to profit from investing in cross-market pairs, such as a spread trade to arbitrage between an ADR and its local listing, or a switch trade to rebalance two positions from different countries to maintain target levels of regional exposure. To successfully execute pairs across the globe, algorithms have to not only resolve market microstructure issues, but also manage currency risk. Among the complexities that are caused by market idiosyncrasies, the most pertinent is the accessibility of liquidity. If one leg of a pair must stop trading due to events like auctions, trading halts, lunch breaks, etc., the other leg must take action immediately to mitigate leg risk. Also, regulations and rules on lots, tick sizes, and short selling require sophisticated order placement logic. For example, if exchange A imposes restrictions on odd lot trading but exchange B does not, an effective way to minimize risk is to initiate a position of round lots in A and then quickly offset it with round and odd lots in B. Finally, to cope with varying market dynamics such as fragmentation and dark pool proliferation, algorithms should choose the appropriate liquidity sourcing methods in each market while still keeping the execution from both legs synchronized. Currency risk plays two important roles in cross-market pairs. When different currencies are involved, spread calculation must account for the conversion rates. Otherwise, algorithms will calculate incorrect spread levels, which may negatively affect the profitability of underlying investment strategies. Another aspect of currency risk emerges when shares have to be settled in a single currency. This requires algorithms to simultaneously trade in the FX market and hedge currency exposure in real time.

Summary The complexity of pairs trading requires sophisticated trading tools for best execution. We introduced two types of pairs the spread and the switch and touched on the strategies that algorithms use to implement such trades. We also outlined some of the unique challenges when executing pairs in different markets. Many traders find it a daunting challenge to capture spread and/or reduce transaction cost, while curtailing risk at the same time. Equipped with advanced quantitative trading techniques, pairs algorithms offer valuable solutions to address these issues and help asset managers accomplish their investment goals. As financial markets continue to become more integrated, opportunities abound for multiple-asset pairs in the realms of cash equities, FX, futures, options, and other derivative instruments. Also, the demand for multiple-leg pairs has been increasing as more complex investment models are being developed, e.g., a spin-off deal involving three legs. These emerging trends represent the new frontier of the nextgeneration pairs algorithms.

2013 Investment Technology Group, Inc. All rights reserved. Not to be reproduced or retransmitted without permission. 12213-19318 The opinions, positions, and/or predictions taken or made in this document reflect the judgment of the individual author(s) and are not necessarily those of ITG. These materials are for informational purposes only, and are not intended to be used for trading or investment purposes or as an offer to sell or the solicitation of an offer to buy any security or financial product. The information contained herein has been taken from trade and statistical services and other sources we deem reliable but we do not represent that such information is accurate or complete and it should not be relied upon as such. No guarantee or warranty is made as to the reasonableness of the assumptions or the accuracy of the models or market data used by ITG or the actual results that may be achieved. These materials do not provide any form of advice (investment, tax or legal). ITG Inc. is not a registered investment adviser and does not provide investment advice or recommendations to buy or sell securities, to hire any investment adviser or to pursue any investment or trading strategy. Broker-dealer products and services are offered by: in the U.S., ITG Inc., member FINRA, SIPC; in Canada, ITG Canada Corp., member Canadian Investor Protection Fund (CIPF) and Investment Industry Regulatory Organization of Canada (IIROC); in Europe, Investment Technology Group Limited, registered in Ireland No. 283940 (ITGL) and/or Investment Technology Group Europe Limited, registered in Ireland No. 283939 (ITGEL) (the registered office of ITGL and ITGEL is First Floor, Block A, Georges Quay, Dublin 2, Ireland and ITGL is a member of the London Stock Exchange, Euronext and Deutsche Brse). ITGL and ITGEL are authorised and regulated by the Central Bank of Ireland; in Asia, ITG Hong Kong Limited (SFC License No. AHD810), ITG Singapore Pte Limited (CMS Licence No. 100138-1), and ITG Australia Limited (AFS License No. 219582). All of the above entities are subsidiaries of Investment Technology Group, Inc. MATCH NowSM is a product offering of TriAct Canada Marketplace LP (TriAct), member CIPF and IIROC. TriAct is a wholly owned subsidiary of ITG Canada Corp.

You might also like