Spread Betting Guide
500 FREE Trading Videos & Magazine - Sign Up Today!

by

Proof that Automated Trading works… and doesn’t!

Nov 21, 2011 at 5:30 pm in Tips and Strategies by

As an ex-IT consultant I am quite keen on using software tools where appropriate to automate certain aspects of my trading strategy. I often use the Yahoo! Finance Price Losers (%) list at http://uk.finance.yahoo.com/losers?e=ftas to help me spot gapped-down stocks, and I use a GoogleDocs spreadsheet for the Stop-Out List that reminds me of my last selling prices. I use my spread betting providers’ own automated order facilities to take me out of trades (as stop orders) and occasionally to take me into trades (as opening orders).

I like the idea of fully automating my trading, so that while I’m dosing by the pool a computer program can be beavering away in the background making money on my behalf. There may be many people on the world wide web who will sell me one of those, but more realistically they will sell me an automated system that will alert me on what trades to make and will leave it to me to actually press the BUY and SELL buttons. The second approach may be a blessing (because I have ultimate control) or a curse (because my emotions have ultimate control).

Anyway, my purpose in this article is not to review the plethora of automated trading systems but to look to consider in more general terms whether a trading system can be fully automated. The question that I ask myself in these cases is not “Will it work?” but “Can it fail?”

An Automated Trading Test

As a former computer programmer, it should not be beyond my wit to devise a computer program that back-tests some automated trading rules over historic data in order to demonstrate that a computer program can trade successfully… until it doesn’t. So that’s what I did.

I won’t bore you with the technical details, but I devised a computer program that traded into and out of the FTSE 100 index — historically, not in real time — using the following rules.

  1. Trail the market down until it reverses (turns up) as far as a predefined trailing stop buy trigger distance.
  2. Buy into the market at that price using all available funds.
  3. Trail the market up until it reverses (turns down) as far as a predefined trailing stop sell trigger distance.
  4. Sell out entirely at that price, and bank the proceeds.
  5. Repeat from step 1.

This program allowed for only one position to be held at a time, utilising all available funds. A profit at step 4 would result in more available funds to be utilised next time around, and a loss at step 4 would result in less available funds to be utilised next time around. The trailing stop order trigger distances were fixed for each trading run but could be varied between trading runs.

It was a simple automated trading system, but a realistic one.

The Results

I back-tested the virtual trading system on the FTSE 100 index using a trailing stop buy distance of 1% (the program would buy on a 1% upturn) and a trailing stop sell distance of 10% (the program would sell on a 10% downturn) over the period 4 January 1999 to 28 October 2007. The result was as follows.

(all figures taken with permission from the book “Financial Trading Patterns” by Tony Loton)

Backtesting

The thinner blue line represents the fluctuating index price during the period under test, and the thicker red line represents the trading account fund value. This demonstrates that a fully automated trading system can make money.

I then set about “optimizing” the system by altering the trailing stop buy distance to 20% while keeping the trailing stop sell distance at 10%, which yielded the following result. Not only is the final fund value notably higher in this case, but the trading account never fell in value because the system did not trade at all until such time as the underlying index rose by 20%.

Altering the trailing stop buy distance

Not only does this show that a full automated trading system can make money, but also that we can optimise such a system so as to increase profits and reduce volatility. Or can we?

See below what happened when I back-tested exactly the same system with exactly the same parameters over the period from 2 April 1984 to 28 October 2007. In this case my trading system (red line) consistently and significantly under-performed the base index (blue line).

More backtesting

Okay, so the system was not suited to this longer time period, but how could we know this kind of thing in advance when trading real markets in real time? Furthermore, look at what happened when I ran the system over the longer time period but with the original trailing stop buy distance of 1%.

Running the system over the longer time period but with the original trailing stop buy distance of 1%.

While in this case my full automated trading system under-performed the base index most of the time, it came out on top in the end.

Conclusion

I have shown that a fully automated trading system can sometimes work, and sometimes not. Success or failure can depend crucially on the correct tuning of specific parameters to match the specific market conditions, and this is difficult in retrospect never mind in advance. Rather than proving that a fully automated trading system does work, proving that it can fail is really all I need to do.

Too many traders get excited about the sometimes legitimate and verifiable positive results published by trading systems developers; yet they fail to realise that it takes only one or two adverse examples (usually not published) to disprove the system.

Trying to prove that a trading system works is like trying to prove the non-existence of God. No number of successful non-sightings is sufficient to overrule the fact that one day God might show up. And he (or she) needs to show up only once in order to prove the atheists wrong. Similarly, an automated trading system needs to fail only once in order to prove the trading system developers wrong.

Trusting in an automated trading system, like trusting in religion (or lack of it), is ultimately a leap of faith.

Tony Loton is a private trader, and author of the book “Stop Orders” published by Harriman House.

 

Tags: ,

Leave a reply

Your email address will not be published. Required fields are marked *