Tuesday, January 25, 2011

High frequency trading ideas

I just started reading Larry Harris' book "Trading and Exchanges" (thanks to Max Dama's glowing book review) and already a couple of potential high frequency trading techniques stood out:

"Quote matching" - a technique whereby front-runners place a limit buy order just a cent (for stocks) higher than the best bid price. If the order is filled, they then place a limit sell order just a cent lower than the best ask. Assuming the best bid-ask quotes don't move, the worst they can do is to lose 1 cent by selling the share back to the best bidder, while the most profit they can make is the bid-ask spread plus rebates for providing liquidity minus 2 cents by having the sell long limit order filled. This could work out quite profitably if the bid-ask spread is wide. But of course, the best bid-ask do change constantly, so front-runners would need to cancel and correct their limit orders constantly, and the optimal algorithm for doing this could get quite complicated. Meanwhile, if you are a bona fide liquidity provider, you would have to avoid providing this free option to the front-runners by constantly monitoring who is in front of you. As usual, this chess game can quickly degenerate into an HFT arms race.

"Manipulation of stop orders" - a.k.a. "gunning the market", a technique whereby the market gunners buy aggressively so as to trigger large buy stop orders that they believe are in place at a higher price. When these buy stop orders are filled, the prices are driven higher still, and these manipulators then sell their position profitably.

One of my old momentum strategies was a victim of these market gunners, and after that sad experience I refused to use stop orders any more, at least for stocks. However, here is a question for our knowledgeable readers: can other traders actually see what stop orders there are on an order book (whether for stocks, futures, or Forex markets)? And if so, would a trading robot that simulates stop orders by sending out buy market orders when the stop price is touched work better than manually placing a buy stop order on the order book?

Wednesday, January 05, 2011

Shorting the VIX calendar spread

Lately there were a few interesting discussions in the blogosphere on the profitability of shorting the VXX-VXZ spread. (See Quantum Blog and The Speculator's Ball.) For background, VXX is an ETN that tracks the first and second month of the VIX future, which in turn tracks the VIX volatility index, which in turn tracks the volatility of SPX. VXZ is the ETN that tracks the 4th - 7th months of the VIX future. During the period 2009-2010, there were 2 different reasons why shorting this "calendar spread" was profitable:

1) The VIX futures were/are in contango: i.e. the back months' futures are more expensive than the front months'.
2) The volatility of SPX was decreasing with time.

However, some traders seem to think that either one of these conditions is enough to ensure the profitability of shorting a calendar spread.  It is not. (Otherwise, life as a futures trader would be too easy!)

To see this, let's resort to a simplistic linear approximation to a model of futures prices. From John Hull's book on derivatives, section 3.12, the price of  a future which matures at time T is

F(t, T)=E(ST)exp(c(T-t)),

where E(ST) is the expected value of the spot price at maturity, c is a constant, and t is the current time. If the futures are in contango, then c > 0.

If we assume that abs(c) is small, and T-t is also small (i.e. not too far from maturity), and that the expected value of the spot price changes slowly, we can linearize this formula as


If the market expects the future spot price to increase, then b > 0.

After a few simple algebraic steps, you can verify that the calendar spread's price is proportional to

F(t, T1)-F(t, T2) ~ bct

where T1 < T2 (i.e. F(t, T1) is the front month's price, and F(t, T2) the back month's).

This is a satisfyingly illustrative result. It says that shorting this calendar spread will be profitable if

A) futures are in contango and the expected spot price in the future is decreasing; or else
B) futures are in backwardation and the expected spot price in the future is increasing.

So what is the situation today? Will it still be profitable to short this spread? As our fellow bloggers have pointed out, VIX futures are still in contango, but the market is expecting volatility to increase in the future over the last month or so. So this may no longer be a profitable trade anymore.