Sunday, December 27, 2015

The ASX lays another egg: The case for algorithmic trading


2015 was another poor year for the Australian stock market with the S&P 200 (excluding dividends, at time of posting this article) falling by 3.9% (after a return of only 1.1% in 2014).

The market’s current level is the same as it was back in April/May of 2006! This means that if you have been invested in an index fund over that period, your returns have only been dividends of perhaps 3-4% per annum. It’s a completely lost decade.

You have to feel sorry for people invested in super funds that are largely exposed to the Australian stock market because they are simply not going to have sufficient funds to retire on at those sorts of rates of return.

The commodities boom effectively concealed a lot of the weaknesses of the Australian market which are now becoming very apparent to all and sundry.

While the Australian market is fine for trading, I do have a number of issues with long-term investments in this market, namely:

1.    The market has very few quality companies;

2.    The corollary to the above is that there are a significant amount of listed companies that could only be described as absolute junk (how some of these companies were allowed to list is incomprehensible to me);

3.    The market is very heavily weighted to banks and resource companies – when these sectors do badly their weighting in the market all but ensures the All Ordinaries and S&P 200 will also do badly. You simply can’t allow your financial future to be beholden to the iron ore price and how people are feeling about a few large banks – it’s crazy;

4.    We compensate the executives of these listed companies with world class remuneration packages for (in many cases), absolutely mediocre (or worse) performances;

5.    There is a reasonably high level of insider trading that is very rarely prosecuted, the cases that have been prosecuted concern absolutely blatant breaches of the law by naïve individuals which made their detection very easy;

6.    Australian institutional investors are very skittish, they have absolutely no patience and their highly reactive trading often hurts the market (unnecessarily);

7.    A result of point 6 is that we now have a bi-polar market, we have a few “hot” sectors that people are willing to pay anything for and we have everything else that they want to avoid like the plague. You can only get growth from the “hot” (or faddist) companies, so everyone crowds into these companies, setting the stage for the inevitable bust;

8.    In common with many markets around the world, we have auditors giving a clean bill of health to some companies that are in dire financial circumstances. (All I can say is thank God for litigation funders for keeping both auditors and companies honest, because no one else is standing up for the shareholder in quite the way they do. It’s a very sad reflection on regulators that litigation funders often have to essentially do their job for them);

These days I don’t always expect to make large capital gains, I’m just looking to get a reasonable return through dividends.

The long-term buy and hold approach contrasts very starkly with my algorithmic trading. Some statistics for 2015 on my algorithmic trading are provided below:
 
Annual return
9.39%
Risk adjusted return
17.4%
Winning trades
64.3%
Losing trades
35.7%
Profit ratio of winning trades to losing trades
3.43
Sharpe ratio of trades
0.89

 The table only represents long trades (not shorts) and excludes any dividends received. The risk adjusted return is adjusted based on actual exposure to the market, which in this case was only 54%.

As you can see, it’s vastly superior to the index performance (or the index hugging fund managers).

The program responsible for the above performance is only 51 lines of code. One of the most important components of that code is the trend indicator.

Determining trend direction is notoriously difficult, I tried many different things (all unsuccessful) before somehow developing something that appears to work.

To give you an example, the last long trade for 2015 occurred on 24 June when Ansell (ANN) was bought at an average price of $24.74, this trade was closed on 21 July at an average price of $25.94, a profit of 4.85% (before brokerage) for 27 days (not exactly high frequency trading, but a good trade).

After this trade, the program stopped signalling any long trades, and this was just as well as the market took a very steep dive through August and is yet to recover.

As I write this, conditions are still not conducive for trading long. But that of course is the beauty of the long/short trader, you simply switch to shorting. When conditions change again to favour the long side, I will go back to trading long. I will occasionally have both long and short positions open, but this is rare for me.

I recently attended a presentation given by a long/short fund that has had some reasonable success over the years. The presenter put up a list of the top 10 ASX listed stocks by market capitalisation and said something like: “I feel very sorry for long only Australian fund managers, can you imagine trying to make a profit out of that?”

In global markets, the population growth and industrialisation that fuelled markets for the entire 20th century will not continue to anywhere near the same extent and this is likely to render buy and hold strategies anachronous and further contribute to the rise of the algorithms.