Monday, January 9, 2012

The Secret World of Algorithmic Trading


In recent times I have been doing a fair amount of algorithmic trading based on a system that I designed a few years ago (which I rather unimaginatively named “Black Box”).

Black Box is just a piece of software that uses statistics to determine long and short entry points for a group of large highly liquid stocks. Each trade will typically result in a profit of between 1.5% to 4% (over an average holding period of 14 days - an annualized return of 39% to 104%). All trades are given up to 39 days to reach their targeted return before being time stopped.

I will normally have 1% to 2% of my portfolio invested in each trade. Black Box bases the trade size on the volatility of the underlying stock combined with the maximum allowable loss.

Black Box is seldom wrong in its signals, but of course it will be wrong on occasions. One of the main features of Black Box is its ability to largely filter out noise in price movements which is the bane of most traders. Of course I’m not going to tell you how Black Box does this, or indeed how Black Box works at all. The only systems you can see for free are the ones that don’t work.

While I still hold a long portfolio of great stocks like Berkshire Hathaway, Coca-Cola Amatil (CCL.AX) and Woolworths (WOW.AX), there are very few companies post GFC that can just be bought and held on to. However, there are far more than can be successfully traded using algorithms.

The primary criteria I use for algorithmic trading candidates are:

1. Large companies;
2. Highly liquid;
3. Fundamentally sound;
4. Relatively high price volatility.

Once I’ve selected the companies, it’s then a matter of feeding the required data into the computer which uses my algorithms to spit out entry signals on both the long and short sides. Ex dividend dates and important announcements also come into play here.

It’s always exciting to see what signals the computer is going to give. Of course, sometimes it won’t give any signals at all, which is fine.

Algorithmic trading is not for everyone, it requires a good knowledge of the relevant mathematics and statistics (that’s why all those huge algorithmic hedge funds employ mathematicians, in fact mathematicians like Ed Thorpe and Jim Simons were pioneers in this industry). But all this doesn’t mean that you have to be a mathematical genius. Algorithms vary in their complexity and complexity doesn’t automatically equate to larger profits.

It’s not much use buying books on the subject of algorithmic trading. As always, no one is going to give you the algorithms and strategies that will make your fortune in a book! Successful strategies and algorithms are normally being used by a few enough people to be effective. Once a strategy is widely known it will cease to work and that is the basic problem with any valid strategy that has been published in a book (or for that matter on the internet).

I may publish some of Black Box’s past trades here in coming months, so stay tuned.

Happy New Year to all.

2 comments:

  1. Really enjoyed reading your blog. Was wondering though, what do you feed the algorithm as input. I've heard is like cooking, good ingredients, good outcome :)
    All the best in the future.

    ReplyDelete
  2. Thanks for the comments.

    You will appreciate that I can't tell you what I use. But I will say that a neural network is one of the things I use.

    It really is like cooking, you have to find the inputs that work and that requires significant testing and research. But it can be very rewarding.

    ReplyDelete