Automated Trading Strategies That Work

“Everything should be made as simple as possible, but not simpler” – Albert Einstein

Einstein’s job was to think of scientific theories that explained things we see in nature, it’s likely that he was paraphrasing Occam’s Razor. In other words, the best theory is the simplest one that still explains observations.

By the way, this was Einstein’s actual quote…

It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience.

It seems that someone sometime later, paraphrased Einstein’s statement into one that was too simple to be understood!

Automated strategies should be simple as possible too. You should be able to explain the hypothesis behind the strategy in simple and easy to understand terms, so that your grandmother could understand. Not to knock grandmother’s, as mine was brilliant…but you get what I mean.

A strategy that is convoluted with lots of adjustable parameters, has little chance of working across multiple markets and multiple timeframes. A strategy that emboldens basic natural truths, that’s easy to understand, with few moving parts, has a great chance of success across asset classes, markets and timeframes.

All code samples are written in EasyLanguage by TradeStation, however, it’s so simple that it appears to be in a kind of pseudo language.

This first example is from observations that when there’s a really big bar after there being a bunch of small bars, by bars I mean candlesticks on a stock chart, then that usually precedes a big move. And if that bar is moving up, then the bigger move, or the momentum, is probably going up as well, so buy that. And then the opposite case…if that big move bar is going down, then sell it.

rrange=high[daysback]-low[daysback]; 

BigRange = rrange > (NumDevs*stddev(rrange, length) + average(rrange, length)); { resolves to true/false }

if BigRange and open[daysback] < close[daysback] then buy at the market; 

if BigRange and open[daysback] > close[daysback] then sell short at the market;

There are only two parameters to this strategy (days back, length). Hopefully that was simple enough to understand…and that is all of the strategy. Now we could get fancy and put money management around this, set stops and targets, etc. But the strategy in its purest form should work, and give positive results across markets and timeframes.

The next strategy is very simple, it’s called the simple breakout. It looks at the previous day’s close and the first bar that opens above that close and is going up, is assumed to be a breakout., So we buy that sucker, and hold it until the end of the session and then close the position. Now we could have gotten fancier and put all kinds of conditions on how far above is that bar than yesterdays close, or how big was yesterdays range, or should we put a trailing stop incase it decides to turn around, etc. But we don’t, let’s keep it simple.

BreakOut = close > CloseD(1) and close > open; { CloseD is a special key word that means yesterday's close }

If breakout then buy this bar at the close;

SetExitOnClose; {a keyword that closes the position at the end of the day's session }

Notice the brevity of the code and how simple it is in concept. This strategy is one of my best by the way. It works across multiple markets and timeframes.

I have literally dozens of such strategies, and developing more of them all the time in a continuous process that some people in the industry call the strategy factory. I like to refer to the process as more like being the owner of a major league baseball team, along with all it’s minor league teams that are used to primp up candidate players that might eventually be good enough to move up into the major league team when needed.

In other words, I have a set of starter players that have varied skills and all work well together, then I have a bunch of other players that are constantly being tested to see if they deserve a spot on the starting team. This too is a relatively simple concept, but depending upon the size of the team, and the size of the league, it can take a fair amount of discipline to keep the whole continuous improvement process going smoothly. But it’s a simple process, easy to understand.

So, that makes me the general owner, manager and coach of my trading team.

 

1 comment

  1. L

    This is very interesting. The Breakout concept is most logical and deserves further investigation on my part.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.