What is algorithmic trading?
Algorithmic trading is a trading style in financial markets. Stock, Forex, Futures, etc, characterized by following those markets with a set of objective rules that generate entries and exits to the market. Basically an informatic system evaluates certain rules taking market data and executes orders towards this market automatically. The decisions are taken by a computer in an autonomous way.
What is an algorithm?
An algorithm is a set of rules intended to solve a problem in a predefined way. This simple and brief definition is a bit abstract, let’s take an example:
Imagine that we need to make decisions during trading. So we designed a system based on moving averages (very primitive and simple to serve as an example).
- If the MM20 becomes larger than the MM50 buy N lots.
- If the MM20 is made smaller than the MM50 sell N lots.
Where MM20 is moving average 20 and the MM50 is moving average 50.
Thus a computer system monitoring and calculating this data can execute automatic orders all the time and execute them in a very fast way. This is a very simple and very bad algorithm but as an example it allows us to understand how a system of these would behave. Some trading systems are very complex and even employ Artificial Intelligence, machine learning, genetic algorithms etc.
What are the advantages?
An obvious advantage is that it allows a market presence uninterruptedly, something that a human being can not do unless it is a team that takes turns.
Another advantage is that they can be run in many markets at once and even using correlations between them. Example if the price of iron falls this will cause a fall in the price of corn? These correlations can be determined by statistical analysis. Did the price of iron fell? Is it time to sell corn contracts?
This algorithmic trading mode also allows to operate during the whole session without experiencing the slightest fatigue or reduction of its performance. In addition, these systems respect the rules to the letter and do not experience any emotion during trading. This allows to operate with zero psychological affectation. In other words, market movements and mass psychology do not cause any emotional effect on the system which is one of the main sources of bad operation. So we can say goodbye to psychotrading.
It also has verifiable risk / benefit expectations. Algorithmic trading is based on tests and not on assumptions as they are subjected to rigorous back-testing and robustness tests before starting to operate.
These allow another advantage and is channeling orders to the market only at the precise moment. In other words, not leave an open order waiting for it to execute but when the indicated moment arrives, execute the order. This allows to not show the cards to the rest of the traders that are operating in the market.
One of the obvious disadvantages of these systems is that if they contain errors they can cause huge losses.
The other disadvantage is that past earnings do not imply future earnings as markets are always evolving and this triggers other disadvantages that we will explain later.
How to reduce those disadvantages?
One of the things that is done to reduce the disadvantages of algorithmic trading is to provide them with a catch system that will stop them if their performance starts to be very bad.
Example if one of these algorithmic trading systems has 3 or 4 consecutive losses or if it is not so profitable, it stops and notifies that it has stopped for a human to intervene.
This is not perfect and certainly there have been reports of large losses due to errors in these systems, such as Knight Capital. But is like a lifeboat in case the ship starts to sink. Of course these systems also operate with risk management and are also monitored not only by humans but also by other systems developed for this purpose.
The other thing that is done is to put them to work in a Timeframe or period of time. After this period, its performance is evaluated, its faults analyzed, it is readjusted and restarted in another Timeframe.
That is why these systems require constant maintenance and software engineers able to adjust complex programs. And this triggers another disadvantage is the high cost of maintenance of these systems because they require highly trained personnel not only in trading but also in software engineering that must work very fast.
That is why its obsolescence is very fast. A high value system that worked excellently a while ago today may simply be junk code with very little value. They are short-lived.Unlike other systems that are made and then are being exploited / marketed for years.Therefore investing capital in developing them carries a high risk.
As a result, these systems are not used by everyone. Generally large organizations that because of their volume of capital can afford to pay these costs and risk that capital.
Not everything ends up there
Another problem with these algorithmic trading systems is that they are adjusted with historical data. In other words, actual performance may vary. And this performance as it is simulated are not real orders to the market. What happens, that the orders to the market affect the price in the market but in simulated no. Therefore you can never know exactly how these algorithms will work in reality and you can only know an estimate. Although this can be very close to reality with a very acceptable margin of error. This becomes a variant of the observer’s effect, in which the object to be measured is modified when making the observation.
What happens is that usually orders of low volume in a large market cause little effect. Usually, we must clarify. But as it is said in the markets the flapping of a butterfly in Hong Kong can provoke a storm in New York if a domino effect occurs. This is known as the Butterfly Effect. Something that HFTs exploit a lot in some of their strategies that I will talk about later. These use low latency algorithmic trading.
Conclusions for the retail trader
Why the retail trader? Because he/she is often ignorant in the matter and is the most abused, product of that ignorance. So with this we can help in such case. Well an important conclusion that can be drawn from all this is that sometimes we see on sale robots especially Forex that claim to be the holy grail of trading. A robot that was made long ago and is shown in videos how it operates and earns reaching tens of thousands of dollars. And of course sold at a very high price. Which is not necessarily false or unbelievable.
What is the problem? I think some readers are already imagining. The first is that many are not maintained and / or are not made by people with solid knowledge in the subject. And starting from the axiom (or premise) that past earnings DO NOT imply future earnings the result is that not all but most of these robots are a scam. The fact of showing a robot winning in a video of the past does not imply that when you buy it, it will do it or that it will cover your investment.
In the first place a robot to work well has as we said before, needs having undergone a rigorous back testing. And from there it can be inferred that many of these people that market them do not have solid knowledge or at least pretend not to have them. And in second place. It only starts to work in a timeframe. Then it must be re-adjusted / modified. Even this is no guarantee of anything. So if someone sells you a super robot and does not assure you that he/she will be updating it, is definitely ripping you off.
If still goes and tells you that is going to make you a millionaire with it, is inherently false. First because the only thing that can be talked about in all this is probability, because in the market there is never anything 100% safe even for the big operators. The other is that the market gains or losses are directly proportional to the capital with which you operate. No matter how good a robot is, if it does not operate with enough capital it will not have great results. At least not in a short time. Well, it can be assumed that the accumulated profits eventually create a relatively acceptable capital if you are trading effectively. As trading can become something similar to a compound interest or an arithmetic progression. What happens is that by the time it starts to approach a “respectable” capital doing trading, most likely that robot will become hopelessly obsolete.
Another important issue to consider is the following. Many of these robots are sometimes marketed preaching to the four winds that have artificial intelligence, that is intelligent. That is actually not a big deal today. Artificial intelligence is many things and can be very good but can also be lousy. In fact it is very simple to put “artificial intelligence” to a robot. Result, it can not be concluded that because a robot has artificial intelligence is already good. Perfectly a well planned strategy that has nothing of artificial intelligence can perform better in a market than many of these “smart robots.”
I imagine some readers are wondering … I know what I can not use to guide me and I have to avoid, but … then how to know if a robot is good?
I think it’s a good question and more than that the question I think is: How do we evaluate a trader, whether it’s human or not, and decide whether it’s good or bad? How do we decide which is best when comparing? This is already coming out of the article and I will leave it in an upcoming publication, although it is not a question that has a single answer because there are many variables to consider. I tell you that not only does the net profit matter and this is simply the most obvious of the variables but not the most important.
Note: The theme image was created with a Markov Decision Process graphic and was taken from raster to vectorized to be able to be expanded with a convolutional neural network with later manual adjustments (the network was not made by us but as a curiosity).
The adjustment graph was taken from the Department of Statistics and Mathematics Finance at the University of Toronto.