The Gateway to Algorithmic and Automated Trading

Balanced Basket

Published in Automated Trader Magazine Issue 22 Q3 2011

Execution algorithms have to work hard enough when they only have to reference one market. In this issue's Anatomy of an Algo, Nitin Gambhir, CEO at Tethys Technology, takes things to the next level by describing the operation of a multifactor algo used for one security (crude oil) in a futures basket trade where individual execution rates were constrained by an execution deviation limit. Oh, and as if that wasn't enough, the trade was executed on one of the most volatile days in the crude market this year.

Nitin Gambhir

Nitin Gambhir

The Scenario:It is pre trading hours on June 15th 2011 and a large Chicago-based CTA that operates relative value trading models across US futures markets has received a trading signal overnight for a futures basket on behalf of several managed accounts.

The basket comprises NYMEX Crude, ICE Coffee, CME Lumber, NYMEX Silver, NYMEX Palladium, CBOT 10 Year, CBOT Soybean, KCB Wheat, ICE Cocoa and NYMEX Heating Oil. The trade timeline is from 8.00 AM to 3.15 PM (all times in U.S. EST). Certain contracts will finish earlier if their primary session closes before 3:15.

The trade for NYMEX Crude is a sell order for 8,520 contracts of the July 2011 expiration that must be completed within the context of the basket's risk constraint of balanced execution with a maximum 3% deviation in percentage execution.

The Asset: NYMEX Crude Oil July 2011 expiration.

The Challenge: To sell 8,520 contracts of NYMEX Crude Oil July 2011. The user benchmark to be used is VWAP and all orders will be market orders with a maximum volume participation constraint.

The Trader: The trader heads the CTA's trading desk and handles all energy complex orders. He opts for a multifactor sensitive algorithm specifically intended for futures with which to execute the crude trade.

The Algo: The algorithm is a multifactor sensitive algorithm for futures that looks at factors that contribute to execution cost (including Liquidity, Bid-Ask Spread, and Volatility) and applies appropriate weights to the factors for a specific futures contract. The algorithm uses a dynamic execution profile and adjusts for expected volatility, liquidity and spread over the specified trading period to achieve execution superior to VWAP. The algorithm is recommended for trades with low alpha decay, or uncertain volatility or volume profile.

8:30 - The algo has been trading for 30 minutes. Oil had been trending down during the overnight session, but has been trading in a $1.00 trading range since 5.00 AM. Volatility is slightly higher than expected, while liquidity is good although spreads are wider. The algo is actively breaking down orders into smaller sizes because of the volatility. Crude appears to be range bound, so the algo is using reserve (iceberg orders) at the top of the 15 cent range. No bid/ask spreads have been crossed. 257 contracts sold.

9:00 - The New York Floor opens and the algorithm detects positive liquidity pressure and it gets 0.5% ahead of the profile.

Figure 1: Crude Oil - 15 minute price bars (15th June 2011

Figure 1: Crude Oil - 15 minute price bars (15th June 2011)

9:03 - The market breaks out on the upside. The algo is very active and able to get 89% of its fills done without crossing the spread. Still about 1% ahead of the profile. 740 contracts sold, 0.15 tick off the VWAP.

9:35 - The up trend continues, but buying pressure is declining and short-term overbought signals are appearing. The algo pauses activity and is now in sync with the profile. 1442 contracts done, 0.01 ticks better than VWAP.

10:25 - Volatility begins to increase in anticipation of the Department of Energy (DOE) data. The algo decreases the sizes of its child orders and is keeping up with the profile. Market liquidity has fallen in the last five minutes, but the algo is able to maintain its participation as the higher volatility allows it to manage its footprint. 3045 contracts done. 0.17 ticks better than VWAP.

10:30 - Market gaps up in response to the DOE numbers just released. US Supplies fell 3.41mn barrels versus expectations of a 1.8mn barrel decline. An additional factor has been that UK consumer confidence numbers came in stronger than expected. The algo is now about 0.3% behind the volume profile. Overall volume is slightly on the lighter side. The latest iteration of the algo's five minute volume recalibration is forecasting a 10% higher volume day and the algo has recalibrated the volume curve accordingly. 3100 contracts sold. 0.13 ticks better than VWAP

11:00 - The market has been trading in a tight range in the last 30 minutes, but the algo's proprietary indicators are showing pressure on the bid. Volume has declined and not sustained itself. The algo gets ahead by selling an extra 0.5% of the order. 4106 contracts sold. 0.14 ticks better than the VWAP.

11:30 - A steady stream of bad news about the Greek crisis. The European governments appear to be unable to narrow their differences and so the Euro comes under pressure and the markets start to sell all risk assets. Deleveraging appears to be gaining momentum.

Crude oil starts to move down fast. The algorithm is already ahead in its sale and further increases its sale activity to be 1.5% ahead. Oil falls to 98.34 by 11:45 down from its peak of 99.95 at 10:55. This move represents about 2.5 times the anticipated volatility for the time of the day. The proprietary trend signals are showing a strong negative trend and the algorithm maintains its position 1.5% ahead of the volume profile. 5100 contracts sold. 0.35 ticks better than VWAP.

12:20 - A further gap down since 12:00 - 98.162 to 97.15; very large moves in comparison with the normal volatility profile. The market takes a breather and the algo's oversold signals are flagging up, but the trend is still down. Market volatility is exceptionally high today. The algorithm slows down its selling and at 12.40 is only 0.6 % overdone. 6098 contracts sold. 0.55 ticks better than VWAP.

Figure 2: Crude Oil - actual volume and number of trades (15 minute bars, 15th June 2011)

Figure 2: Crude Oil - actual volume and number of trades (15 minute bars, 15th June 2011)

1:30 - The bottom has fallen out of the market. The volume in the last 30 minutes has spiked to 5 times its normal value for this time of the day. The algo gets busy. It is crossing the spread aggressively and hitting bids. The algorithm reduces the order size and reduces the time separation between successive child orders. Oversold signals are showing up strongly but the daily volatility and volume patterns are very divergent from historic patterns so the algo suspends usage of the signals and decides to stay close to the anticipated (recalibrated) volume profile. The market sees a low of 94.00 dollars. 7100 contracts sold. 4.2 ticks better than VWAP.

3:00 - The market has bounced back to the 95.15 level but is still down almost 4 points. The volatility is high, liquidity is good and the algorithm finishes the entire orders without crossing the spread even once. 8520 contracts sold 4.4 ticks betters than VWAP.

Figure 3: Expected Volume Profile (Tethys Model) of Crude Oil September 2011 Expiration. 24 Hour Clock. All times in U.S. EST.

Figure 3: Expected Volume Profile (Tethys Model) of Crude Oil September 2011 Expiration. 24 Hour Clock. All times in U.S. EST.