When the DeepBlue chess supercomputer defeated the reigning world champion Garry Kasparov on May 11, 1997, many realized for the first time that computers are capable of solving many "purely human" tasks as well as we are, and this trend is clearly not going to change in the future.
Now, years later, when neural networks write poems and paintings, we are just waiting for the next milestone to fall under the onslaught of technology and artificial intelligence. However, in the world of investment and market trading - an art that has been perfected by man since ancient times - no one seems to be concerned about the "invasion of robots" and the prospect of being left out of work.
The penetration of robots into the investment process is realized through algorithmic trading technology – when computers take over part of the tasks of placing orders for the sale/purchase of investment assets in financial markets.
In this article, we will take a deeper look at the term "algorithmic trading": what is it, a new opportunity for investors or a technology that will replace a person in the world markets?
Prerequisites for creating algorithmic trading
In fact, stock trading, as a very pragmatic type of activity, has always easily accepted technological innovations that helped to carry out a larger volume of transactions and extract more profit.
The market has always encouraged those who made the right decisions quickly. Therefore, people have always tried to get up-to-date information as quickly as possible. Back in the first half of the XIX century, the invention of the optical telegraph marked the beginning of a technological race for the right to possess the latest data.
The volume of data on transactions on exchanges grew, and the next task for engineers was to automate brokerage services and the trading process itself - the search for counterparties and the conclusion of transactions. Thanks to this, today we can send a purchase or sale request in an instant, while being anywhere, and not in the "stock pit".
Naturally, progress increased the number of bidders and the volume of information. But, at the same time, traders and investors still performed fairly routine actions based on very monotonous data. Why not delegate the adoption of standard solutions to more and more efficient machines?
Computers were originally created as a tool capable of compensating for the weaknesses of human thinking. Therefore, it is not surprising that they are strong in those areas where our capabilities are lacking.
Judge for yourself:
- We count slowly, process and transmit information slowly. Modern computers do this millions of times faster.
- We can't keep too much information in our head. At least so as not to do anything stupid when processing it. The possibilities of computers here are almost limitless.
- We are emotional. Even the most cold-blooded of us are at risk of making an impulsive decision with irreparable consequences. Cars, obviously, are absolutely devoid of emotions.
Simply put, you can expect that the computer will make a decision faster than you, will not accidentally make a mistake by a couple of zeros when placing a purchase order, and will not "jump out of the window of a skyscraper" in the event of a sharp drop in stock indices.
History is full of curious cases of purely human mistakes. For example, in 2006, a trader at J.P.Morgan simply made a mistake with a key, as a result of which he put up the wrong shares for sale. Later, the company had to buy them back at a higher price, resulting in a loss of about $ 50 million.
It looks like a "one-way loss". But don't jump to conclusions. Let's be honest, with all their advantages, computers are just diligent performers. They are not able to assess the situation beyond the criteria that can be quantified. Well, they're not really able to understand what they're doing. Therefore, to expect that a computer will be able to adequately respond to global economic shocks and other global force majeure, to put it mildly, is meaningless. And if we consider that many large and successful investors make only a few transactions a year, completely not following the stock charts and receiving information from their own exclusive sources, then, obviously, computers remain only tools that give an advantage when used correctly.
Let's see exactly how computer algorithms are used in investment and trading today.
Read more: How to choose music for trading
Use cases of algorithmic trading
The term "algorithmic trading" itself has several definitions. But all of them, as a rule, describe one or another type of investment activity using computer algorithms. Although, obviously, it is possible to trade following some algorithm without a computer.
Therefore, we will consider everything that is usually described by this term, namely, 4 categories:
Splitting of large positions
This area is the least talked about, although the computerized solution of these tasks was first called "algorithmic" trading. Individual actions of private investors and small investment firms do not have any noticeable impact on the market, and therefore for them the task is simply to find successful opportunities to buy or sell assets. But hedge funds, to which the richest people in the world entrust their finances in order to save them from depreciation, are giant "whales" capable of causing "huge waves" in the markets with any movement. Although it often only harms them.
Therefore, hedge funds that can afford to hire the best programmers and mathematicians have found a way to bring large positions to the market, breaking them into many small ones, which reduces the market reaction and makes a deal at a predictable price.
High-frequency trading
This is a completely different story, but "quants" are also involved here - brilliant mathematicians and programmers looking for a way to exploit the inefficiency of the market. The "efficient market theory" implies that all information concerning a certain asset and the market as a whole is already embedded in its price. This theory has its supporters and opponents. But there are also those who decided to be faster than the market itself — to place a huge number of transactions using super-powerful computers and ultra-fast means of communication before the market has time to react to it in any way. Moreover, we are talking about infinitesimal fractions of a second, when even the length of the fiber-optic cable and the remoteness of the equipment from the exchange servers matter.
However, like the previous paragraph, this is a very specific area that an ordinary investor will not have to face under any circumstances. But for the sake of completeness, it's worth knowing about it. And we will also draw some conclusions from this.
Money management
Managing a large investment portfolio is already something quite "tangible", which it is quite possible to encounter with having a small capital. And if passive investors can easily manage with simple "recipes" for the proportions of different types of assets in the portfolio (diversification), then with active investment in a wide range of securities, the task of rebalancing the portfolio can become a difficult task.
In this case, algorithms can automatically receive up-to-date information on many assets, perform calculations and give recommendations to the investor regarding the purchase or sale of certain securities in order to balance the portfolio according to the established rules.
Read more: Signals to Buy Cryptocurrency
Trading systems
A clear algorithm as a set of rules for buying and selling investment assets is an absolute necessity for traders and investors. First of all, in order to avoid impulsive emotional decisions. The task of fulfilling unambiguously and clearly formulated rules, in turn, is ideally suited to robotize it - delegate it to a computer that is able to accurately evaluate criteria and act according to established rules.
A full–fledged trading system is a combination of a trading algorithm and a trading robot (a machine that takes over the execution of the mechanical part). Such trading systems are also called algorithmic trading systems or exchange trading robots.
Types of algorithmic trading systems
There are two well-established categories of algorithmic trading systems - automatic (PBX) and mechanical (MTS).
This is almost the same thing — the system itself receives price data, checks them for compliance with the criteria, determines the lot size in accordance with the capital management strategy. The only difference is that in mechanical, the final decision on placing an order is made by the trader himself, and in automatic, human participation is not required at all.
Principles of algorithmic trading
Algorithmic trading systems, as a rule, use the principles of technical analysis, since most of the criteria in this method are measurable, they are easy to "explain" to a machine. Fundamental analysis data is more difficult to interpret unambiguously, so this area remains for a person, but, nevertheless, the trading system can specify some parameters separately, for example, data on expected volatility, in order to correct its behavior.
There are also systems that use data on the correlation between different instruments, systems that look for opportunities for arbitration between different platforms, systems that work with applications directly in the exchange "glass". And, of course, systems combining different approaches, since modern computers allow such a complex analysis to be carried out in fractions of seconds.
Read more: Forex Signals - what is it? How to use them?
Decision-making principles
It is worth noting how trading systems make decisions. The simplest systems are based on clear rules with set parameters. For example, the most famous strategy is the intersection of moving averages (MA). We can denote two rules:
- if the fast MA(5) crosses the slow MA(20) from the bottom up, we buy,
- if from top to bottom, we sell.
This strategy is often cited as the simplest example, and it is hardly worth waiting for results from it. But, nevertheless, we at least have to choose the correct values of the periods (5 and 20), which will provide the best result.
What if our system uses 10 different indicators, each of which in turn has several parameters? And also makes decisions about the size of the lot, or about the control of stop orders. Here it's not that choosing values, in general, describing all possible rules for all situations can be an impossible task.
Then neural networks come to the rescue. This technology is shrouded in many myths, but, in fact, it is just a network consisting of many nodes connected to each other. By adjusting the relationships between these nodes in a certain way, you can configure the system to get a certain result with certain input data.
The "highlight" is that these connections are not set up manually, like logical rules, but by training. We submit certain data, look at the result - if it's bad, the system corrects the connections between the nodes and tries again. Thus, it is possible to train a neural network to respond to certain price patterns or patterns in other indicators. The trained neural network eventually looks like a complicated complicated algorithm that works, but it's unclear how. And this is the main thing!
Read more: 15 forex trading signals for beginners that you need to know
Optimization and backtesting
How can we understand how effective our trading system is? Of course, only after checking it in the case. But to launch it immediately into real trading, obviously, would be madness. Therefore, the only way to judge the potential of a trading system was and remains testing it on historical data or backtesting. This is similar to the backtest of an investment portfolio. In fact, this is a simulation of real trading on past data, since now the archive of quotes for any instrument can be easily found in a variety of sources.
But not everything is so simple. Even if backtesting is the only way to get an idea of the effectiveness of the system, this does not mean that it is correct. The fact is that, obviously, the behavior of markets changes over time and is absolutely not obliged to obey the same laws. The factors affecting the market are changing - technological progress, for example. Macroeconomic cycles are changing. There are force majeure and political upheavals. All this can lead to the fact that a system that is profitable on historical data can very quickly turn into a loss generator.
Moreover, the problem is aggravated by the process of optimizing the system, when we not only test it, but with each attempt we select more and more effective parameters that give "on paper" more and more profit. Sellers of ready-made trading systems often use such results to impress inexperienced beginners.
It would seem, what would prevent such a "fine-tuning"? However, this leads to the fact that the system becomes "over-optimized", that is, ideally configured for a specific area of historical data, which can lead to even more disappointing results in real trading.
Technical means for algorithmic trading
As you can see, the tasks that fall under the definition of "algorithmic trading" can differ significantly from each other both in essence and in the complexity of the organization. Therefore, let's use the example of the most accessible type - trading systems, consider the technical means available to an ordinary investor.
If you want to understand whether the game is worth the candle, it is better to start by exploring the possibilities of the trading platform that you are already using. Most popular trading platforms, such as, for example, Metatrader, already have built-in capabilities for creating or connecting trading "robots".
The advantage of using a familiar trading platform is that you probably already get all the necessary market data from your broker. And then the task simply boils down to the need to describe the rules of your trading system in the appropriate programming language - it is usually different for each trading platform. Or you can simply delegate this task to the programmer.
If you create a trading system that is not tied to a trading platform, you will also need to at least take care of obtaining up-to-date exchange data. But you will not be limited in the choice of technology for your task.
Buying ready-made trading systems whose algorithm is unknown to you is a very risky undertaking. The "Holy Grail", that is, a system that would guarantee, stably and automatically bring profit, alas, does not exist despite the assurances of numerous sellers.
Read more: What are stock trading robots and how do they operate
Advantages and risks of algorithmic trading for the investor
Algorithmic trading may not be so easy to approach, but we live in a world of big data. And a significant part of them is available, and often free for everyone. Definitely, it makes sense to delegate to the machine part of the work on data analysis and making informed decisions.
Algorithmic systems allow:
- test your hypotheses,
- eliminate emotions from the trading and decision-making process,
- quickly analyze a large amount of data.
But it is important to understand that no algorithm can replace the knowledge of technical and fundamental analysis, and the ability to assess the market situation and the potential of certain assets. It is possible to beat the market only in the long term, using a deep, versatile analysis.
The combined use of deep fundamental analysis combined with the use of a clearly formalized trading system can give a powerful synergistic effect and bring investment results to a new level.
Among the disadvantages, it is worth highlighting the technical difficulties in creating a working trading system. Remember that large funds hire the best specialists and use the most advanced technologies. Therefore, do not expect that you can quickly and easily find a profitable algorithm that no one has guessed about.
You can buy ready-made trading systems. But there are risks here. It's like buying a "pig in a poke" — the principle of operation of ready-made trading systems, as a rule, is not known. Whatever indicators sellers would brag about, remember: there is no "magic button". Use algorithms in addition to your knowledge and skills of investment analysis.
When testing your system, remember about re-optimization. A good system should work stably on various data. Don't forget, a result in the past does not guarantee a similar result in the future.
Read more: Trading robots on the stock market
Conclusion
In any of its manifestations, algorithmic trading is just a tool. The algorithm can be compiled on paper. The computer will only enhance and accelerate the effect. If the algorithm is bad, then there are assumptions that you will simply lose your money. But even if the trading algorithm shows brilliant results on historical data, this is not a guarantee that the result will be repeated in the future.
An exchange trading robot is essentially the same good old automation of labor, only with the use of increasingly "smart" and productive systems. Is it worth using such a tool in work? It's up to you.
One has only to understand that you can't mindlessly trust everything to the "machine" and even more so to entrust the computer with making decisions that you don't understand yourself. This tactic is similar to a casino or lottery. Despite the apparent convenience, algorithmic trading carries significant risks, which are realized in the form of losses, loss of funds. Traders often resort to the use of software solutions in trading.