Electronic Trading Services - ETS™ Next Generation Algorithms Robert Almgren Banc of America Securities LLC November 2005 © 2005 Banc of America Securities LLC. All rights reserved. This document may not be copied or redistributed without the express written consent of Banc of America Securities LLC. Electronic Trading Services - ETS™ Algorithmic trading means the execution of trade orders using computers, with or without active human involvement. It represents a large and growing fraction of total order flow for equities and other asset classes. One advantage of using algorithmic trading is increased efficiency. Using a computer to handle “routine’’ orders, a human trader can concentrate his or her effort on the “difficult’’ orders, effectively managing a higher total volume of orders than would be possible without computer help. A more subtle advantage is better execution. The computer can slice the original order into many more pieces than the most attentive human. It can precisely follow given parameters that describe the chosen tradeoff between cost and risk. The difficulties associated with algorithmic trading stem from the fundamental fact that trading is a human activity, and that computers do not have common sense. Some parameters of execution that can be easily explained to a human are very difficult to specify in computer code. For example, in an illiquid name, some tradeoff must be specified between the cost of market impact versus the penalty attached to unexecuted shares. At Banc of America Securities, our approach to these difficulties is to advance one step at a time, building on existing algorithms and technology infrastructure. Three Generations 1. “First generation” algorithms are the currently existing ones. They assume that market flow is smooth and predictable. 2. “Second generation” algorithms are currently in development, for application to small-cap and other thinly traded stocks. They model the variations in market volume, to trade only when counterparties are present. They use the techniques of statistics and econometrics, so they require a certain minimum level of market activity. Below we characterize the range of stocks to which these methods can apply. 3. “Third generation” algorithms will eventually use methods of psychology and game theory to trade even the thinnest assets. This white paper describes the underpinnings of second generation algorithms. 2. Electronic Trading Services - ETS™ Individual Market Cap 1T 28−Jul−2005 Market Cap ($) XOM MSFT IBM 100B HD WYE BR HOT TRB ACS SIAL NFG 4.42B 10B 1B CPRT OVNT KSWS SCHN AOS REGN BIOS PNFP 253M 100M Value Remaining ($) 15 0 x 10 500 1000 1500 2000 2500 3000 12 28−Jul−2005 Total value: 13.8T 10 11.2T 5 0 2.43T 86.5B 0 500 1000 1500 2000 2500 3000 Figure 1: Individual and cumulative market cap of Russell 3000® stocks. The new algorithms apply to the shaded range, adding about $2.4 trillion to the available investment universe. Source: Produced by BAS from Russell 3000® and MarketQA data. 3. Trades per day Electronic Trading Services - ETS™ 10 5 10 4 10 3 10 2 10 1 10,000 trades/day 100 trades/day 0 500 1000 1500 2000 2500 3000 Figure 2: Average number of trades per day for Russell 3000® Source: Produced by BAS from Russell 3000® and NYSE TAQ data. In Figure 1 we characterize the range of stocks to which these algorithms will extend the applicability of algorithmic trading. The universe shown is the Russell 3000® index, sorted into decreasing order by market capitalization (available float, as of July 28, 2005). The top 500 stocks are extremely large and are well handled by existing algorithms. We intend to cover about the next 2000, numbers 500 through 2500. Thus SIAL is the largest stock we consider, BIOS the smallest. In terms of the cumulative market cap (lower panel of Figure 1), the total value of the Russell 3000® is $13.8 trillion. Of that, the top 500 names together make up $11.2 trillion, or about 81%. The next 2000 add about $2.43 trillion of additional available investment, about 22% additional. The remaining 500 names contain only $85.5 billion and are neglected. We may also characterize the activity level of the stocks by the average number of trades per day, as shown in Figure 2. For stocks that trade fewer than about 100 times per day, statistics are not an adequate tool for good execution and we will have to wait for the third generation algorithms. Most of the middle 2000 of the Russell 3000® meet this criterion, with some outliers. There is no significant upper limit on the number of trades per day that can be handled. 4. Electronic Trading Services - ETS™ What is special about small-cap? The distinguishing feature of small-cap stocks is irregular trade activity, as shown in Figure 3. In these pictures, we count the number of trade events (ignoring the share size, as discussed below) in 15-minute bins through the day, for each of five consecutive days. The result is one curve per day showing the intraday profiles. We do this for IBM as a typical large cap stock, for SIAL at the top of our target range, and BIOS at the bottom. For a typical large-cap stock (IBM), the profiles for different days are close together (within a factor of two). First-generation algorithms replace the volume profile by its day-to-day average. For such stocks, this is an acceptable approximation though not optimal. Even for a large-cap stock, there are occasional outliers: on the morning of Oct 25, IBM announced a 20¢ per share dividend, which caused a tremendous spike in trading activity. First generation algorithms would ignore this activity. For medium- and small-cap stocks (SIAL and BIOS), the day-to-day fluctuation is much more significant, and cannot be ignored. The algorithm must incorporate some model for this fluctuation, so as to submit trades only when counterparty market volume is present. There are many statistical techniques available for modeling such fluctuations. Modeling approaches There are two general approaches to modeling the intraday fluctuation of some quantity such as trade activity: ■ One may divide the trading day into bins, and count the number of shares or the number of events in each bin. One would then look for the statistics of these binned quantities, such as the variance of the count in each bin, and the serial correlation from the value in one bin to the next. If the bins are too large, then the time resolution is too coarse. If the bins are too small, then the statistical fluctuation is too severe; many bins in fact have zero volume. In addition, the bin value is not available until the end of the bin; this is a serious deficiency for real-time monitoring. ■ Alternatively, one may construct a continuous-time indicator that updates its estimate of market activity on each individual trade. The statistical and analytical techniques required are somewhat more sophisticated, but the time resolution is much better. Figure 4 shows a comparison. 5. Electronic Trading Services - ETS™ IBM Oct 24 Oct 25 Oct 26 Oct 27 Oct 28 1000 500 0 0900 1000 1100 1200 1300 1400 1500 300 SIAL 1600 Oct 24 Oct 25 Oct 26 Oct 27 Oct 28 200 100 0 0900 30 20 1000 1100 1200 1300 1400 1500 1600 BIOS Oct 24 Oct 25 Oct 26 Oct 27 Oct 28 10 0 0900 1000 1100 1200 1300 1400 1500 1600 Figure 3: Number of trades in 15-minute buckets for a large, a medium, and a small stock. For largecap stocks, this value is well represented by its mean. Small-cap stocks are characterized by extreme fluctuation: the average gives a very poor estimate of the value at any particular moment. Source: Produced by BAS from NYSE TAQ data. 6. Electronic Trading Services - ETS™ In Figure 4, the upper panel shows each trade with its price. The lower panel shows two estimates of market activity: ■ The blue line is a prototype continuous-time indicator that estimates market activity in trades per minute, based on a running average of the time interval between successive trades. ■ The gray bars are a more traditional estimate of activity: the number of shares per unit time, measured on bins. (The bin widths are adjusted according to an average volume profile, but the number of trades has been adjusted to give a rate in terms of true clock time.) Thus two differences are being illustrated: the effect of binning, and the distinction between trades and shares. For this trading day, shares and trades contain roughly the same information. Around 1 PM there is a sudden burst of trading activity, shown by the jump upwards of the blue line, a high bin value, and a price move. But by the time the binned signal is available, the activity is already moving back downwards. In fact, the bin immediately following the high bin is no different from the average. An algorithm that bases its trading activity in each bin on the activity level in the previous bin would completely miss the event. The continuous indicator is more stable than the bin values during the oscillations in the morning, and it reacts rapidly to the spike at 1 PM. By the time the bin value is available to the trading algorithm, the continuous indicator is already heading downward. A trading algorithm based on this indicator would have increased its order submission rate during the spike. Figure 5 illustrates that when the number of trades per minute, and the number of shares per minute are different, the number of trades is the more economically meaningful quantity. For CPRT on July 28, large share volumes are recorded around 12 PM and 12:30 PM, but the trade activity does not increase and the price does not move. These large share volumes are likely associated with large block trades, in which it would not have been possible to participate. An algorithm based on counting numbers of trade events rather than shares would quite properly decline to increase its submission rate. (Of course if these blocks are followed by increased activity, the algorithm would respond to that.) Figure 6 shows the same data for IBM on October 24, 2005. Both indicators capture the burst visible in Figure 3. The significance of studying trade arrival times is reinforced by a recent academic literature on the dynamics of the intervals between subsequent trades, starting with the Autoregressive Conditional Duration model of Robert Engle and Jeffrey Russell [Econometrica 66 (1998) 1127–1162]. 7. Electronic Trading Services - ETS™ 66 Price 65.5 65 64.5 64 1000 1100 1200 1300 1400 1500 1600 1000 1100 1200 1300 1400 1500 1600 Shares and Trades 20 15 10 5 0 Figure 4: Comparison of bin-based volume measure and a prototype continuoustime indicator, for SIAL on July 28, 2005. The bin value is available only at the end of the bin. The upper panel shows each trade through the day (vertical axis is price). There is a spike and enhanced volatility around 1 PM. The lower panel is the same as Figure 4; both the binned and the continuous rate indicator track the trade volatility. The bars are shares per unit time (with an arbitrary scale factor), the line is trades per minute. Source: Produced by BAS from NYSE TAQ data. 8. Electronic Trading Services - ETS™ 24.9 Price 24.8 24.7 24.6 24.5 24.4 1000 1100 1200 1300 1400 1500 1600 1000 1100 1200 1300 1400 1500 1600 Shares and Trades 8 6 4 2 0 Figure 5: Same as Figure 4, but for CPRT, also on July 28, 2005. Some individual large trades come through near 12 PM and 12:30 PM, as indicated by the high bars for share volume. But these trades do not move the continuous-time indicator which only counts number of trades. The price is flat during that interval, suggesting that market activity should be considered “low”. Source: Produced by BAS from NYSE TAQ data. 9. Electronic Trading Services - ETS™ 84 Price 83.5 83 82.5 1000 1100 1200 1300 1400 1500 1600 1000 1100 1200 1300 1400 1500 1600 Shares and Trades 150 100 50 0 Figure 6: Same as previous, for IBM on October 25, 2005 (compare Figure 3). The algorithm captures the burst of activity associated with the dividend announcment at 10:30 AM, which happens to be divided between two bins. Source: Produced by BAS from NYSE TAQ data. 10. Electronic Trading Services - ETS™ Empirical analysis The most reasonable sounding theories must be checked by empirical analysis. A subject of ongoing research is to use BAS’ large historical database of orders to determine the leading components of market impact. Figure 7 shows an example. A buy order for 64,000 shares of BXP was entered at 10:33 AM on May 19, 2005 and was executed across most of the day. The black dots and the superimposed green curve show a classic arrival price trajectory, in which shares are sold rapidly at the beginning to reduce the volatility exposure, and more slowly at the end to minimize market impact. Optimal trajectories If we have a perfect statistical understanding of market activity, how do we translate this into an algorithmic trading trajectory? Figure 8 shows one example solution. The rate of trading at any particular time (in practice this will be the shares submitted in the next fifteen minutes) depends both on the number of shares remaining to execute in the program, and on the current level of market activity. If the market is not capable of absorbing any significant number of shares, then the algorithm will wait until counterparties are present. Remaining questions Several aspects are still in active research, to be solved as soon as the new algorithm moves into production and customer use: ■ How does the impact and execution quality of a given size order depend on the market activity, as measured by trade rate or other indicator? This will be answered by historical analysis of past orders. ■ Can other stocks in the same sector or indices be used to anticipate volume in the stock of interest? ■ What is the proper way to handle the chance of non-execution? These algorithms do not execute until volume is present, and there is a chance such volume will not be present before the end of the day. This is an especially delicate issue for pairs trading or long-short portfolios that must remain cash-neutral. ■ What are the proper benchmarks? We strongly advocate arrival price over VWAP, since it better corresponds to the decision price at which the trade was undertaken. 11. Electronic Trading Services - ETS™ 7 x 10 4 2005−05−19 BXP Shares remaining 6 5 4 3 2 1 0 292.2 min, 16.5% hist, 15.4% today 1100 1200 1100 1200 1300 1400 1500 1300 1400 1500 Time of day 69 68.8 Price 68.6 68.4 68.2 68 67.8 67.6 Time of day Figure 7: A historical order, to be used for market impact computation. In the upper panel, the black dots and the superimposed green curve show the number of shares remaining to execute. The red and blue curves show market background activity, scaled to match the order flow. Source: Produced by BAS from internal and NYSE TAQ data. 12. Electronic Trading Services - ETS™ Shares held x(t) Trade rate v(t) Market volume w(t) Figure 8: An example optimal trajectory, based on a simulation. Upper panel is number of shares remaining to execute. Middle panel is current rate of execution. Bottom panel is instantaneous market rate. The trade rate depends both on the number of shares remaining and on the current activity level, rather than simple on number of shares remaining as in current models. Source: Produced by BAS from simulated data. 13. Electronic Trading Services - ETS™ The material contained herein is for informational purposes only, and is not a product of the Banc of America Securities LLC (“BAS”) research department. The commentary has been prepared by the Electronic Trading Services group of BAS, which provides trading services and solutions for the securities industry. The material is not intended to rate or recommend any security or any type of strategy or service for trading any security. BAS may offer the types of trading systems or strategies mentioned in this material and may compete with the services, systems and markets of others that may be mentioned herein. This report therefore may not be independent from the proprietary interests of BAS, which may conflict with your interests. Any opinions expressed in this commentary are those of the author, who is a member or the Electronic Trading Services group, and may differ from or be contrary to the opinions expressed by members of the BAS Research Department. It does not constitute an offer to buy or sell or a solicitation of an offer to buy or sell any option or any other security or other financial instruments. The information contained herein, as well as any other communications or information provided by BAS is not intended to be, and shall not be regarded or construed as, recommendations for transactions or investment advice, and BAS shall not be relied upon for the same without a specific, written agreement between us. BAS does not provide tax, legal or accounting advice. You may be required to represent that you have consulted with your advisors prior to execution of any transaction. Notwithstanding anything that may appear herein or in other materials to the contrary, you (and each employee, representative, or other agent of yours) may disclose to any and all persons, without limitation of any kind, the tax treatment and tax structure of the transaction and all materials of any kind (including opinions or other tax analyses) that are provided to you relating to such tax treatment and tax structure. Options are not suitable for all investors. Please ensure that you have read and understood the current options risk disclosure document before entering into any options transactions. The options risk disclosure document can be accessed at the following web address: http://optionsclearing.com/publications/risks/ download.jsp. Electronic Trading Services (ETS) is a trademark of BAS. Russell 3000 is a registered trademark or tradename of Frank Russell Company in the U.S. and/or other countries. This material may not be copied or distributed without the express written consent of Banc of America Securities LLC. Banc of America Securities is a registered broker-dealer, member of NYSE/NASD/SIPC and subsidiary of Bank of America Corporation. Some services in the U.K. may be obtained through BAS’ agent, Banc of America Securities Limited, a wholly-owned subsidiary of Bank of America N.A. authorised and regulated in the United Kingdom by the Financial Services Authority. © 2005 Banc of America Securities. All rights reserved. 14.