July 30


Intro To Algo Trading

By Kevin Davey

July 30, 2018

Algorithmic Trading, getting started, Kevin Davey

In Part 1 of this series, I discussed the different types of trading which includes algorithmic, discretionary, and hybrid trading. Let’s say you are intrigued by algorithmic trading. What is it exactly and what are the advantages and disadvantages of it? I will discuss all these topics in this article.

What is An “Algo?”

Anytime you trade, whether you are a beginner, intermediate, or expert, you are using rules to trade. You might not realize the rules - the rules may change from day to day, or hour to hour, but there are rules. The rule is your decision making process – how you decide whether to enter or exit any particular trade. It might be chaotic and disjointed, but there is a rule somewhere in there. Maybe your rule is, “rules are made to be broken!”

So when the goofy talking head on CNBC screams, “buy this stock!”, would you follow his recommendation?

RULE: Blowhard says buy, you buy.

Your cousin calling you with the hot tip?

RULE: Crazy cousin says he has “inside” info, you buy only if his last tip was profitable.

Using technical indicators?

RULE: If the price is above 20 period average, and the RSI value is below 20, Sell short.

The list is never ending – there are infinite numbers of rules to buy and sell. But when they are written down, followed exactly, and not subject to judgment or discretion, then those rules can be transformed into an algorithm.

So that is all an algo is – rules to buy, to sell, to enter, and to exit. It can also include rules for position sizing, big order filling, risk management, and other features. But at its core, algos direct your trading.

Advantages of Algo Trading

There are many advantages of algo trading, more than this article has room for. Two of the major ones are Control and Diversification.

Total Control

  • What markets to trade
  • What types of algos to trade
  • Specific performance characteristics of each algo (profit, drawdown, expectancy, etc.)
  • How and when to turn algos on and off
  •  Position sizing each algo, in a portfolio
  • When you will be in trades, when you will not (weekends, overnight)

The list above is not even complete, but you get the idea. You can pick and choose the characteristics of what you are trading, and how you are trading. No more relying on anyone else for black box strategies, signals, etc.

This feeling of control becomes important during the inevitable down periods. Why? Consider two traders:

  • Trader A trades a black box strategy. He has no idea what goes into it. It could include random guessing, for all he knew. Sometimes he has seen it take trades that he disagrees with. It starts to go into a drawdown.
  • Trader B trades an algorithm he created. He knows how the strategy was created, knows when it will likely trade, and also knows how long it will likely take to recover. It also starts to go into a drawdown.

Most traders, when given a choice, would undoubtedly prefer to be Trader B. The more you know about an algorithm, and how it was developed, the more comfort you will have, because of the confidence you have in the algorithm construction. It is difficult to be confident of an algorithm where most of its important characteristics are secret.

Of course, all these freedom can be overwhelming, especially to a trader brand new to algo trading. But all these features do not have to be addressed from the start. Starting off with trading one or two algorithms, with one contract each (or a small share size in the case of stocks), is a great way to “dip your toes in the water” of algo trading, without being overwhelmed. Then as time goes on, and profits (hopefully) accumulate, a trader can start to explore the advanced topics that come with portfolio trading.

Control over your trading, then is a major advantage to algo trading.


There is no “Holy Grail” in trading. There is no strategy or algorithm that will work forever, generating profits consistently with little or no drawdown. Most professional traders know this.

But diversification comes close to the Holy Grail, at least closer than anything else I have ever seen in my 25+ years of trading.

Why is diversification an advantage with algo trading? The answer is volume. With algo trading, once you have a solid development process established – one that produces profitable trading strategies – you simply create more and more strategies, creating a large library of strategies.

There are two keys when you do this, both related. First, you will diversify by markets. With futures, for examples, there are approximately 40 different markets to choose from in the US. These are broadly grouped into 6 different sectors:

  • Stock Market Indices
  • Agricultural Products and Softs
  • Currencies
  • Precious Metals
  • Interest Rates
  • Energies

By creating multiple strategies in multiple markets, you create a diversified portfolio.  Maybe one week currency strategies will not work well, for instance, but that could be offset by good performance in metals or energies.

The second key is to create different types of algorithms, for different market regimes and behaviors. You will create trend following algos, and also counter trend (mean reverting) strategies. These tend to balance each other out over time.

To be successful with multiple algorithms, in different markets and with different trading styles, one requirement is paramount: the strategy results should have low correlation with each other. It does little good to have a gold algorithm that has up and down periods at the exact same times as a crude oil strategy. That high amount of correlation would increase, rather than decrease your portfolio risk.

The reason why diversification works is, with uncorrelated algorithms, drawdowns and rough patches occur at different times for different strategies. Maybe a Euro strategy is in a drawdown, but at the same time a Soybean strategy is hitting new equity highs. This is shown in the figure below, where as more and more algorithmic strategies are added, the cumulative equity curve becomes steeper, and the equity curve gets smoother.

Figure - With Multiple Uncorrelated Strategies, Profits Add, But                                                          Drawdowns Do Not

With the help of trading software, diversification is fairly easy with algorithms. Since they can be automated, it is not difficult for trading software to monitor 10, 20, or even 100’s of trading strategies, entering and exits according to each strategies’ own rules. That can become a major advantage.

Disadvantages to Algo Trading

Of course any discussion of algo trading advantages must be balanced by mentioning the disadvantages. Again, the list is long but here are a couple of the major disadvantages.

Emotions Are Still A Part Of Trading

I still vividly remember my first “algo” trade, back when rule based trading was pretty new. No one called it algorithmic trading back then, but that's what it was. I had rules, I followed the rules, and I should have been emotionless, like a robot.

Instead, I was scared to death!

I called the broker every 15 minutes and asked, “can I get the last price for June Live Hogs?” Then I’d calculate my open position profit or loss based on the latest number. For the next 15 minutes, I’d either be euphoric because I was making money, or depressed because I was losing money. The broker started getting annoyed with my constant calls. There was no online way to check prices then, if you recall those olden days. If there would have been online quotes, I’m sure I would have refreshed that quote page every minute.

So why was I scared to death, acting like a crazy person? After all so many people say that when you trade with rules it takes the emotion out of trading. I should have been a calm, cool, collected robot.

Except that I wasn’t – I was a bundle of stomach wrenching nerves!

The truth is that ANY time you are trading with money, emotions enter into the equation. The rapid gain or loss of capital is what brings on the emotion, not the style of trading. Algo trading, discretionary trading, random guessing trading – it does not matter which approach you take - it's emotional once money is involved.

So how come so many “gurus” out there recommend algo trading because it is supposedly emotionless? I believe it is all a sales ploy by these crooks. The charlatans know that emotions ruin a lot of traders, and that traders are looking to avoid emotion so they claim that algo trading solves the emotion problem.

Except that it doesn’t. As I've said, emotions are engaged because of the money involved, not the type of trading. My personal guess is that people who say algo trading is emotionless either, 1) trade only on a simulator, or 2) do not trade at all, in any fashion. They clearly do not trade with real money.

That being said, the emotions experienced by algo trading are a bit different than the emotions of discretionary trading. Gone is the panic feeling of wondering if you should enter or exit a trade. But, that is replaced with the panic feeling of wondering if you should turn an algo on or off. Basically, for every event in discretionary trading that causes emotion, there is likely a similar, but different, parallel emotion in algo trading.

So the first misconception in algo trading – that there is no emotion - is also the first disadvantage. Trading with real money involves emotion. You must learn to accept that.

Algo Trading Is Not “Set And Forget”

You might recall a number of years ago when there was a portable cooker that was sold on late night television infomercials. Its slogan was, “set it and forget it.” It was so easy to use, you could just throw food in it, hit a few buttons, and come back a few hours later to a delicious home cooked meal.

Figure - Definitely Not The Way To Algo Trade!

Many traders think the same slogan applies to algo trading especially when automating systems. They are wrong!

Technical support people at Tradestation, a leading trading software platform (and my primary software for trading) have a different slogan: “automated trading does not mean unattended trading.”

Whenever you have an automated algo, a million things could go wrong. Internet connections go out, disconnections to trading servers occur, exchanges experience intermittent hiccups, price data corrections come out (but not before the bad data hits your algo) – the list of potential issues is practically infinite.

Multiply all those issues by the dozens of algorithms you might be trading, and the potential for problem becomes very apparent.

You can’t turn on an algo, walk away, and come back a week later to count your profits. It just does not work that way. You don’t have to be staring at a screen all day and night, making sure your algos are running correctly, but you do have to monitor your algos at a minimum of a few times per day. You have to be ready to take action when something goes awry. I guarantee you that some intervention will be required more often than what you think.

That is another misconception and disadvantage of algo trading – you have to stay on top of your algos, and keep a watchful eye over them. Definitely do not “set it and forget it!”

If you’ve made it this far and you are still interested in algo trading, congratulations! In Part 3 I’ll discuss the steps to take to get started.

-- by Kevin Davey from KJ Trading Systems

Kevin Davey

About the author

Kevin Davey is a professional trader and a top performing systems developer. Kevin is the author of “Building Algorithmic Trading Systems: A Trader's Journey From Data Mining to Monte Carlo Simulation to Live Trading” (Wiley Trading, 2014.) . He generated triple digit annual returns 148 percent, 107 percent, and 112 percent in three consecutive World Cup of Futures Trading Championships® using algorithmic trading systems.

His web site, www.kjtradingsystems.com, provides trading mentoring, trading signals, and free trading videos and articles. He writes extensively in industry publications such as Futures Magazine and Active Trader and was featured as a “Market Master” in the book The Universal Principles of Successful Trading by Brent Penfold (Wiley, 2010).
Active in social media, Kevin has over 15,000 Twitter followers. An aerospace engineer and MBA by background, he has been an independent trader for over 20 years. Kevin continues to trade full time and develop algorithmic trading strategies.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Learn To Code & Build Strategies
Using EasyLanguage.