Wednesday, December 19, 2007

Tracking the Order Book


As this article points out, trend following or using technical indicators in a vacuum can be doomed without analysis of the order book. When we want to buy into market movement, we want to make sure that the order book supports the direction indicated by technical signals and is not about to start a reversal.

Processing the order book from snapshot to shapshot, we can determine:
  • ratio of bid to ask interest
  • bid interest up/down
  • ask interest up/down
  • bid aggressed (using last traded price and reduction of bid size to determine)
  • ask aggressed (using last traded price and reduction of ask size to determine)
Going further one can look at the complexion of orders at each level, determining what sort of players are behind the orders. Knowing this can add further bias to the weighting of direction.

Saturday, December 15, 2007

Shannon's Investment Strategy

Was reading the book 'Fortune's Formula', which I highly recommend. Claude Shannon, the genius of Information theory fame, came up with an approach to investing in the market using a interesting variant of Kelly's betting approach.

Assuming a market with constant mean (no drift / trend over time):
  1. Invest 1/2 of your capital in an asset
  2. Periodically rebalance
  3. If the market went up, sell enough units of the asset to have exactly 1/2 of your capital invested
  4. If the market goes down, buy enough units of the asset to maintain 1/2 investment
This is an effective scheme (assuming no transaction costs). Why?
  1. rebalancing implicitly executes a mean reversion strategy
  2. losses reduce the capital in the market
  3. wins increase the capital in the market
In effect, this is a ratcheting investment approach. As was pointed out, most assets are not constant mean over time. This would imply a strategy that trades mean reversion around a longer term drift in the mean. How might such a strategy work?
  1. since drift might be upwards or downwards, fundamental position should be long or short
  2. rebalancing should take into account the expected movement of the mean so that the ratio of cash to position will depend on this
This is referred to as a Constant Rebalanced Portfolio (CRP). Thomas Covers, later extended on this concept with non-even distribution of allocations with his Constant Universal Portfolio (CUP).

Sunday, December 9, 2007

Price Path Probability

What is the probable path of a security over the next 1 second, 5 seconds, 30 seconds?

I attended a quantitative algorithmic trading seminar 3 weeks ago where one presenter was discussing fill probability (in general terms). The presenter claimed that their model predicts the price path over the next few minutes to determine how best to read a VWAP strategy.

While I don't believe it is possible to predict a specific price path, it is possible to determine the probability of any given price path. If we can determine the probability of any given path through time from the current price to some final price in N seconds or minutes, we can compute the expected probability of going through a price level within some period of time.

The expected probability through a node at time Tn at price level Pa on a multinomial tree will simply be the sum of the probability of all sub-paths from Ts to Tn going through Pa. That part may be simple, but accurately determining the likely paths / probabilities is a hard research problem.

Given that the number of paths is exponential with time, the farther out we look the more time it takes to compute a precise expectation. We must use a monte carlo analysis, sampling a calibrated timeseries equation, to approximate the expectation function.

Determining the timeseries function that accurately reflects the market is a very hard research problem. Alas, if I told you my approach would have to kill you ;)