Intro To Algo Trading - The Correct Way
“Algos” and “algorithms.” These two words strike fear into the hearts of many a trader. Visions of computer programs running wild, buying and selling with reckless abandon, are a common nightmare. A trader goes to sleep flat, and wakes up to find a rogue robot algorithm frittered away his or her account, buying and selling all night, due to a simple programming bug.
A Trading Robot Run Wild? Or worse yet, the trader wakes up to find he is short 100 ES (mini S&P) contracts, when he only wanted to be short one contract!
Maybe instead your nightmare vision is of hedge funds, executing “killer bot” algos with lightning speed, draining the accounts of all the slower traders.
The truth, of course, is that trading algos can do those things, and worse. Horror stories abound of these sorts of account killing computer codes. These exact nightmare scenarios have happened. But, properly designed algos can also be friendly, too.
I obviously will focus on the friendly algos!
But before I dive into details of algos, it is important to discuss some of the different types of trading. That will help you understand what an algo is, what it can do, and most importantly, what it cannot do.
Discretionary Trading
Most retail people out there are discretionary traders. Discretionary simply means traders use some sort of judgment to enter and exit trades.
For example, a trader hears about a hot stock on CNBC, and immediately decides to buy some. That is discretionary trading.
Another trader has a chart that she stares at all day. It may be filled with indicators, trendlines, moving averages, etc. Or it may be naked, except for price data. Once that trader makes a trade decision based on all she sees, that is a discretionary trade.
Our third trader has a DOM ladder only, a visual tool which shows all the resting buy and sell orders along with prices. He trades based on this tool. He is likely a discretionary trader, too.
At the end of the day, if you asked any of these traders about why they took certain trades, and why they avoided taking other trades (that may have looked exactly the same), they might give you a “deer in the headlights” look, or a vague response like “I don’t know, it just felt right!”
The truth is discretionary traders may or may not have rules, they may or may not follow these rules, and they may not be consistent in applying these rules. Heck, they might not even be able to describe the rules that caused them to trade.
I remember being in a trading room with a “price action” guru a while back. He was calling the market live, and it went something like this: “yes, the market is looking weak, and there is a short setup here that I usually take, so I am just waiting for a short entry…waiting…waiting…no, it’s a long trade! I just got out with a profit!”
Huh?
When asked about it later, the guru could not explain how a textbook (according to him) short entry suddenly turned into a profitable long scalp trade. “It just felt right,” he explained.
A Trading Robot Run Wild? Or worse yet, the trader wakes up to find he is short 100 ES (mini S&P) contracts, when he only wanted to be short one contract!
Maybe instead your nightmare vision is of hedge funds, executing “killer bot” algos with lightning speed, draining the accounts of all the slower traders.
The truth, of course, is that trading algos can do those things, and worse. Horror stories abound of these sorts of account killing computer codes. These exact nightmare scenarios have happened. But, properly designed algos can also be friendly, too.
I obviously will focus on the friendly algos!
But before I dive into details of algos, it is important to discuss some of the different types of trading. That will help you understand what an algo is, what it can do, and most importantly, what it cannot do.
Discretionary Trading
Most retail people out there are discretionary traders. Discretionary simply means traders use some sort of judgment to enter and exit trades.
For example, a trader hears about a hot stock on CNBC, and immediately decides to buy some. That is discretionary trading.
Another trader has a chart that she stares at all day. It may be filled with indicators, trendlines, moving averages, etc. Or it may be naked, except for price data. Once that trader makes a trade decision based on all she sees, that is a discretionary trade.
Our third trader has a DOM ladder only, a visual tool which shows all the resting buy and sell orders along with prices. He trades based on this tool. He is likely a discretionary trader, too.
At the end of the day, if you asked any of these traders about why they took certain trades, and why they avoided taking other trades (that may have looked exactly the same), they might give you a “deer in the headlights” look, or a vague response like “I don’t know, it just felt right!”
The truth is discretionary traders may or may not have rules, they may or may not follow these rules, and they may not be consistent in applying these rules. Heck, they might not even be able to describe the rules that caused them to trade.
I remember being in a trading room with a “price action” guru a while back. He was calling the market live, and it went something like this: “yes, the market is looking weak, and there is a short setup here that I usually take, so I am just waiting for a short entry…waiting…waiting…no, it’s a long trade! I just got out with a profit!”
Huh?
When asked about it later, the guru could not explain how a textbook (according to him) short entry suddenly turned into a profitable long scalp trade. “It just felt right,” he explained.
It made me wonder if he was even live trading, but that is another story. The point is that he was trading (likely simulated trading) in a discretionary fashion.
Discretionary trading, then, involves trading decisions that involve some degree of human judgment. Maybe it is intuition, or a sixth sense, or even random guessing, but the trade selection usually includes something that can’t quite be defined or tested.
Now, that type of trading might sound wrong to you (“who trades based on intuition?”) or it may sound appealing (“great, I get to use my brain to help me decide!”). But the fact is many people do it, and some people are successful at it. It is a legitimate way to trade.
Yet discretionary trading is definitely NOT algorithmic trading.
I’m guessing, if you are reading this article, chances are you might have already tried and failed at discretionary trading. Don’t feel bad, I count myself in your ranks – I was never a good discretionary trader. That is the main reason I dove into algo trading.
Algorithmic Trading
Algo trading is all about rules. In fact, it is nothing but rules. No discretion. No human judgment.
Trading algorithms can be as simple as you want, or as complicated as you want. How simple? Here is a basic 2 line strategy:
If close < average close of last 5 bars, go long
If close > average close of last 5 bars, go short
Buy/Sell Signals For A Simple Algo
Over the past 13 years, this strategy would have made over $92,000 after slippage and commissions, trading just one contract! And it makes money on both the long and short side! Don’t get too excited though, the last few years have not been kind to this strategy…
That was a very simple algo. In contrast, algorithmic strategies can also be extremely complicated, too. There are traders with single algorithms that run 25,000 lines of code or more – real rocket science stuff!
There are two keys to trading algorithms:
- They can be tested. Most algorithms can be historically tested, commonly referred to as a backtest. This turns out to be a major advantage of creating algorithms, which I’ll describe later. For algos that cannot be historically tested, they almost always can be live tested in simulation mode, with proper precautions and some caveats. In either case, the trader can usually determine the acceptability of the strategy BEFORE trading it with real money.
- Algorithms are rigidly defined. If the algorithm sees a long setup today, it will tell you to go long. If it sees that same setup tomorrow, it will tell you to go long again. The algo only looks at what it was programmed to look at. It doesn’t care what the Fed thinks, does not care about the news, and does not care that Jim Cramer screamed that a certain stock was a buy last night – unless, of course, you program those types of rules into your algorithm. The algo is consistent in how it follows the rules.
Many traders speak of “black boxes,” a special type of algorithm. With black boxes, the rules (the algorithm) remain hidden to the trader. He or she only gets the entry and exit signals, and has no idea how those signals were produced.
That type of algorithm might sound unappealing or scary, but many people like that approach. It is really hard to interfere with computer code you cannot even see!
Some Examples Of Algo Trading
So what does an algo trader look like? Here are some typical examples:
- A retail trader, trading at home. He works full time, so trading is his hobby. Every night, he downloads the latest prices, calculates his signals either by hand or on a computer, and places trades according to the rules. He may or may not check positions during the day, but since he places orders during non-work hours, he knows he is following his strategies each and every day.
- A prop trader, trading full time. He enters and exits trades all day long, again according to set rules. He never, ever deviates from the rules, since he knows his boss spot checks his trades for adherence to the rules.
- A hedge fund computer code, written by numerous PhDs in math, statistics and physics. The computer code they run has 50,000 lines of code, and does everything – enter trades, exits trades, calculates position sizing, automatically performs rollovers, etc. A junior trader is always nearby, monitoring trades in case of a malfunction, but the computer controls the show. The strategies they run can be on the order of microseconds (in and out quickly), to day trades of a few hours, to swing trades lasting weeks.
- A professional retail trader, using a standard retail platform, Tradestation. He creates strategies, then lets Tradestation run those strategies automated. He is usually closely monitoring positions, because as Tradestation personnel say “automated trading does not mean unattended trading.” He can trade quite a few automated strategies, assuming he has enough capital, and if his strategies are diversified enough.
What makes these people algorithmic traders is that they follow strict rules for entry and exit. That is the real key – they are 100% rule followers. With those strict rules, they can historically backtest their approaches, and while “past performance is not indicative of future results” (as a U.S. government disclaimer correctly states), it is very nice to realize that the strategies traded have worked in the past.
Many traders can’t commit to 100% rule following, so they fall into the last major category – hybrid trading.
Hybrid Trading
Now that I have discussed discretionary trading, and algorithmic trading, it is time to bring another type of trading into the mix – what I call hybrid trading.
Hybrid trading is simply a mix of discretionary and algo trading. Some examples:
- Entries are based on technical indicators and rules, but exits are left to the discretion of the trader
- Entries are based on trader judgment, but once in a trade, an automated exit “bot” controls the trade, with no trader intervention
- Entries and exits are both well defined by rules, but the trader has discretion to overrule. For example, a trader might decide to ignore long stock signals after a natural or manmade disaster. Or a trader might decide to go flat before major world events (Brexit vote, Trump election night).
The advantage in hybrid trading is that the trader can still have some discretionary influence on the trade. That is also a disadvantage! One thing I have noticed with my own algo trading is that some of my best algo trades turn out to be ones that my “human judgment” absolutely hated! If I treated those trades as hybrid trades, I would have negated all the good effects of the algo.
Reading the last section, you might wonder “what are the professional traders out there doing, and how can I possibly compete with them?” Great question! Pros are using all of the methods detailed above. You can compete by treating trading as a serious endeavor. Don’t wish for “I have 15 minutes a day for trading” type systems. Wish for being the best you can be at trading – then you’ll be good competition for the pros.
Of all these types of trading, it is hard to decide which trading route is for you. Below, I’ll discuss some of the characteristics and traits that make for good algorithmic traders, but for now I will assume that you already know algo trading is the path you want to pursue. If you still aren’t sure, though, keep reading and maybe by the end of this article you will be sure!
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!” and 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 an infinite number 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 to algo trading, more than this article has room for. Two of the major ones are Control and Diversification.
Total Control
When you create and trade algorithms, you are in control. You decide all of the following:
- What markets to trade
- What types of algos to trade
- Specifics 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 knows. 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 this 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 the come with portfolio trading.
Control over your trading, then, is a major advantage to algo trading.
Diversification
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 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. As more and more algorithmic strategies are added, the cumulative equity curve becomes steeper, and the equity curve gets smoother.
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 is 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 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- is 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 it doesn’t. As I said, emotions are 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 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.
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 problems 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 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!”
Now that you have been introduced to algo trading, and learned about various features of algo trading, along with advantages and disadvantages, I'll now detail some important parts of algo trading.
Algo trading can definitely help you compete with the “big boys,” but it is not automatically a “supertrader” creator. There is no easy way to trade, and algo trading is no exception. Rest assured there are retail algo traders out there surviving against the hedge funds, commodity trading advisors, etc.
At this point, it is time to set aside theory and words, and get down to business: the business of actually starting to algo trade. In this final section, I’ll give some tips on:
• Testing
• Selecting A Trading Platform
• Info On Popular Platforms
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 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. As more and more algorithmic strategies are added, the cumulative equity curve becomes steeper, and the equity curve gets smoother.
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 is 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 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- is 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 it doesn’t. As I said, emotions are 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 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.
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 problems 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 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!”
Now that you have been introduced to algo trading, and learned about various features of algo trading, along with advantages and disadvantages, I'll now detail some important parts of algo trading.
Algo trading can definitely help you compete with the “big boys,” but it is not automatically a “supertrader” creator. There is no easy way to trade, and algo trading is no exception. Rest assured there are retail algo traders out there surviving against the hedge funds, commodity trading advisors, etc.
At this point, it is time to set aside theory and words, and get down to business: the business of actually starting to algo trade. In this final section, I’ll give some tips on:
• Testing
• Selecting A Trading Platform
• Info On Popular Platforms
Testing
One key feature of algo trading is testing. The idea is you historically test an idea to prove its profitability BEFORE you actually trade it live. There are a few different ways to test. You could manually test your approach by recording entries and exits on a chart by hand. You could also hire a programmer to code and test your idea. You could even create your own backtester, using a computer language like Python or R. While all of those are possible alternatives, I like retail trading software.
Trading software is probably the best one for most retail traders. In today’s market, there are literally dozens of trading software packages designed for the retail trader. All have pros and cons, obviously, but the best of them allow traders with little programming knowledge to successfully develop their own trading algorithms.
The great thing about the retail software option is that once you know how to operate the software, and do some simple strategy programming, your focus can be on developing algorithms – exactly where it should be.
Retail Trading Software – Pros
• Most platforms are easy to use and learn
• Used and debugged by other traders, so you can trust results
• Relatively inexpensive, some platforms are even free
• Easy to share strategies with other traders using same software
Retail Trading Software – Cons
• Easy to trick most packages into giving false results
• With so many choices, hard to pick “right” platform
• If software company goes out of business, algos might be useless
This is why I recommend standard trading software for most retail traders. The available software is just too powerful and convenient to disregard.
In case you are wondering, I started out my trading career with the first option, manual backtesting. What a pain! As soon as I had access to a personal computer at night, outside of my regular career working hours, I switched to option 3 – building my own backtesting platform. I did that for a number of years, and had more success in programming the platform than I did in building the algorithms.
I had a few decent algos – or so I thought – but after talking to some more experienced traders, I realized there were issues with my bespoke platform that I was not accounting for properly (for example, some of the intricacies of rollovers). I realized I had to make a drastic change.
Eventually, I decided to go the retail platform route, and I got a copy of Tradestation. I was very scared and intimidated at first by the package (for example, for years I trusted only “buy/sell next bar at market” orders), but eventually I came to understand and felt comfortable with strategy development. And guess what? The algo strategies I started to build became a lot better!
Today, I have been using Tradestation for over 15 years. And baring some unforeseen circumstances, I see myself using it for years to come.
Selecting A Trading Platform
Back when I started using a retail trading platform (Tradestation), there really weren’t too many choices out there. And Tradestation was far and away the best; it had the most features, its backtesting was the most accurate, support was superb and its user group was active and helpful.
Fast forward to today, and the retail software platform landscape is a bit different. Now, there are dozens of trading platforms, and most are pretty good. Each one has some specific “niche” areas it tries to address, usually areas that Tradestation was traditionally not as good at. Of course, Tradestation has responded, and is continually building a better platform. The competition is raising the standard for all platforms, which is tremendous.
This is all great for the retail trader – more competition, better features, lower costs – but it can be overwhelming! Which platform is the best? Which platform has the features you are looking for? Which platform is the easiest to build with? The list of questions goes on and on.
So, I’m not going to try to tell you which platform to, but I will identify some “must haves” that you want for algo trading. In the section after this, I’ll also tell you the most popular platforms, based on trader surveys I have done of the past few years. You might think popularity is a poor criteria to use, but I think it is important. You want a trading platform that will be around for years and years, since transferring your algos from a defunct platform will be cumbersome.
Here are some of the features that are important to an algo trader:
Charting Capabilities - Many times, during the idea creation phase, an algo trader will want to see his or her idea – an indicator, histogram, bar patterns, whatever – in action. A good charting module in the software will help with that.
Broker Integration - Some retail platforms, such as Tradestation, are tied directly to one brokerage (in this case, Tradestation Brokerage). Other platforms, such as NinjaTrader, have a few limited choices in brokers. Finally, some platforms (like Multicharts) have a huge selection of brokers to choose from. There are pros and cons to each approach.
So, searching for a trading platform might also be a search for the proper broker.
Ease of Programming - Most good platforms offer you the ability to create your own indicators, strategies, etc. – in addition to providing standard indicators with parameters you can change and optimize. Of all the topics discussed in this section, I think this is the most important. Having a programming language you can easily learn, and feel comfortable with, is a big deal. Spend a lot of time upfront investigating what is best for you, and it will pay dividends down the road.
Integrating With Market Data - Most of the premier trading platforms these days integrate well with market data. Make sure the platform you choose connects with the data you need.
Standard Indicators and Studies - Before selecting a platform, make sure it has a long list of indicators and functions already programmed in. Most platforms do, but it is always good to check first.
Optimization - If your code has any parameters or numbers in it, for example the number of bars in a moving average, or the buy threshold in a RSI calculation, chances are at some point you will want to optimize that number. While too much optimization is definitely a bad thing, you at least will want the capability to do it in the software.
Walkforward Analysis - In my algo development work, I use a technique called walkforward testing to create “out-of-sample” results. These results tend to mimic live trading better than traditional “plug and chug” backtest optimizations.
Walkforward testing is an advanced topic, one that a new algo trader might not need right away. But it is a good feature for trading software to have.
Trader Community - Having a large and active trading community is critical for any software platform you choose. A vibrant community is a definite plus, and should be a very important part of your search criteria.
Live Trading & Automation - Once you create and test your algo, the last thing you want to do is convert it or move it to a different platform in order to trade it live or automate it. You want a package that does it all: development, test and automated trading.
Info On Popular Platforms
In 2017-8, I asked readers of my blog to tell me which trading platform was their favorite. Tradestation was the heavy choice of users.
Depending on your needs, my guess is one of these platforms will be sufficient for your algo trading. Contact info for each of the major ones is given below:
Tradestation – www.tradestation.com
NinjaTrader – www.ninjatrader.com
MultiCharts – www.multicharts.com
MetaTrader4/5 – www.metatrader4.com
Think Or Swim – www.thinkorswim.com
Amibroker – www.amibroker.com
Python, R and Matlab – www.python.org www.r-project.org www.mathworks.com
Conclusion
This article has covered a lot of ground about the basics of algo trading for the retail trader. Trading is a tough world, but algo trading may just be a good route for your trading success. If you follow the steps detailed article series, you might actually become as good as the professional traders you are competing against! It is hard work though, and never seems to get very easy. Remember that. I always tell prospective traders “Trading is the hardest way to make easy money!” If you'd like more info on my books, just click here.
This article included excerpts from my book: "Introduction To Algo Trading"
One key feature of algo trading is testing. The idea is you historically test an idea to prove its profitability BEFORE you actually trade it live. There are a few different ways to test. You could manually test your approach by recording entries and exits on a chart by hand. You could also hire a programmer to code and test your idea. You could even create your own backtester, using a computer language like Python or R. While all of those are possible alternatives, I like retail trading software.
Trading software is probably the best one for most retail traders. In today’s market, there are literally dozens of trading software packages designed for the retail trader. All have pros and cons, obviously, but the best of them allow traders with little programming knowledge to successfully develop their own trading algorithms.
The great thing about the retail software option is that once you know how to operate the software, and do some simple strategy programming, your focus can be on developing algorithms – exactly where it should be.
Retail Trading Software – Pros
• Most platforms are easy to use and learn
• Used and debugged by other traders, so you can trust results
• Relatively inexpensive, some platforms are even free
• Easy to share strategies with other traders using same software
Retail Trading Software – Cons
• Easy to trick most packages into giving false results
• With so many choices, hard to pick “right” platform
• If software company goes out of business, algos might be useless
This is why I recommend standard trading software for most retail traders. The available software is just too powerful and convenient to disregard.
In case you are wondering, I started out my trading career with the first option, manual backtesting. What a pain! As soon as I had access to a personal computer at night, outside of my regular career working hours, I switched to option 3 – building my own backtesting platform. I did that for a number of years, and had more success in programming the platform than I did in building the algorithms.
I had a few decent algos – or so I thought – but after talking to some more experienced traders, I realized there were issues with my bespoke platform that I was not accounting for properly (for example, some of the intricacies of rollovers). I realized I had to make a drastic change.
Eventually, I decided to go the retail platform route, and I got a copy of Tradestation. I was very scared and intimidated at first by the package (for example, for years I trusted only “buy/sell next bar at market” orders), but eventually I came to understand and felt comfortable with strategy development. And guess what? The algo strategies I started to build became a lot better!
Today, I have been using Tradestation for over 15 years. And baring some unforeseen circumstances, I see myself using it for years to come.
Selecting A Trading Platform
Back when I started using a retail trading platform (Tradestation), there really weren’t too many choices out there. And Tradestation was far and away the best; it had the most features, its backtesting was the most accurate, support was superb and its user group was active and helpful.
Fast forward to today, and the retail software platform landscape is a bit different. Now, there are dozens of trading platforms, and most are pretty good. Each one has some specific “niche” areas it tries to address, usually areas that Tradestation was traditionally not as good at. Of course, Tradestation has responded, and is continually building a better platform. The competition is raising the standard for all platforms, which is tremendous.
This is all great for the retail trader – more competition, better features, lower costs – but it can be overwhelming! Which platform is the best? Which platform has the features you are looking for? Which platform is the easiest to build with? The list of questions goes on and on.
So, I’m not going to try to tell you which platform to, but I will identify some “must haves” that you want for algo trading. In the section after this, I’ll also tell you the most popular platforms, based on trader surveys I have done of the past few years. You might think popularity is a poor criteria to use, but I think it is important. You want a trading platform that will be around for years and years, since transferring your algos from a defunct platform will be cumbersome.
Here are some of the features that are important to an algo trader:
Charting Capabilities - Many times, during the idea creation phase, an algo trader will want to see his or her idea – an indicator, histogram, bar patterns, whatever – in action. A good charting module in the software will help with that.
Broker Integration - Some retail platforms, such as Tradestation, are tied directly to one brokerage (in this case, Tradestation Brokerage). Other platforms, such as NinjaTrader, have a few limited choices in brokers. Finally, some platforms (like Multicharts) have a huge selection of brokers to choose from. There are pros and cons to each approach.
So, searching for a trading platform might also be a search for the proper broker.
Ease of Programming - Most good platforms offer you the ability to create your own indicators, strategies, etc. – in addition to providing standard indicators with parameters you can change and optimize. Of all the topics discussed in this section, I think this is the most important. Having a programming language you can easily learn, and feel comfortable with, is a big deal. Spend a lot of time upfront investigating what is best for you, and it will pay dividends down the road.
Integrating With Market Data - Most of the premier trading platforms these days integrate well with market data. Make sure the platform you choose connects with the data you need.
Standard Indicators and Studies - Before selecting a platform, make sure it has a long list of indicators and functions already programmed in. Most platforms do, but it is always good to check first.
Optimization - If your code has any parameters or numbers in it, for example the number of bars in a moving average, or the buy threshold in a RSI calculation, chances are at some point you will want to optimize that number. While too much optimization is definitely a bad thing, you at least will want the capability to do it in the software.
Walkforward Analysis - In my algo development work, I use a technique called walkforward testing to create “out-of-sample” results. These results tend to mimic live trading better than traditional “plug and chug” backtest optimizations.
Walkforward testing is an advanced topic, one that a new algo trader might not need right away. But it is a good feature for trading software to have.
Trader Community - Having a large and active trading community is critical for any software platform you choose. A vibrant community is a definite plus, and should be a very important part of your search criteria.
Live Trading & Automation - Once you create and test your algo, the last thing you want to do is convert it or move it to a different platform in order to trade it live or automate it. You want a package that does it all: development, test and automated trading.
Info On Popular Platforms
In 2017-8, I asked readers of my blog to tell me which trading platform was their favorite. Tradestation was the heavy choice of users.
Depending on your needs, my guess is one of these platforms will be sufficient for your algo trading. Contact info for each of the major ones is given below:
Tradestation – www.tradestation.com
NinjaTrader – www.ninjatrader.com
MultiCharts – www.multicharts.com
MetaTrader4/5 – www.metatrader4.com
Think Or Swim – www.thinkorswim.com
Amibroker – www.amibroker.com
Python, R and Matlab – www.python.org www.r-project.org www.mathworks.com
Conclusion
This article has covered a lot of ground about the basics of algo trading for the retail trader. Trading is a tough world, but algo trading may just be a good route for your trading success. If you follow the steps detailed article series, you might actually become as good as the professional traders you are competing against! It is hard work though, and never seems to get very easy. Remember that. I always tell prospective traders “Trading is the hardest way to make easy money!” If you'd like more info on my books, just click here.
This article included excerpts from my book: "Introduction To Algo Trading"
About Author: A champion trader, best-selling critically acclaimed author, and award winning educator, Kevin Davey has been an expert in the algorithmic trading world for several decades. For three consecutive years, Kevin competed in the World Cup Championship of Futures Trading, where he finished in first or second place, achieving returns in excess of 100% in each year.
Kevin develops, analyzes, tests and trades algo trading strategies in the futures, stock and forex markets.
He also helps small groups of traders significantly increase their trading prowess via his award winning algorithmic trading “Strategy Factory®“ workshop.
Beyond his course, Kevin also helps educate the trading community via his best selling trading books, “Building Winning Algorithmic Trading Systems“, "Introduction To Algo Trading" and "Entry and Exit Confessions Of A Champion Trader."
Copyright, Kevin Davey and KJ Trading Systems. All Rights Reserved.
Kevin develops, analyzes, tests and trades algo trading strategies in the futures, stock and forex markets.
He also helps small groups of traders significantly increase their trading prowess via his award winning algorithmic trading “Strategy Factory®“ workshop.
Beyond his course, Kevin also helps educate the trading community via his best selling trading books, “Building Winning Algorithmic Trading Systems“, "Introduction To Algo Trading" and "Entry and Exit Confessions Of A Champion Trader."
Copyright, Kevin Davey and KJ Trading Systems. All Rights Reserved.