Basic algorithmic trading strategies. Algo trading on Forex: details about the automated trading style. What is algorithmic trading

Now everyone is talking about how human consultants will be replaced by machines. How does this correspond to reality?

Robots are made by people, so someone will definitely remain alive... But seriously, let's first define what we actually call robots. There is robo-advising, there are algorithmic strategies, there is auto-following.

Let's start with robo-advising. What does this concept include?

Robo-advising is a program that allows you not only to create a portfolio for a client, but also to rebalance the portfolio without the client’s participation.

There are not many similar services in Russia, but if we talk about Western practices, There is a clear division between passive and active control:

  • active control consists of deciding which tool and when to buy;
  • passive control— when the portfolio has already been formed and is intended for clients who do not want to go into details.

Algo trading

Algotrading is understood as a type of trading in which the trader’s actions are completely formalized in the form of an algorithm, by implementing which the trader expects to make a profit. In simple words, algorithmic trading is a predetermined, conscious algorithm of a trader’s actions during trading.

What is the future of algorithmic trading in Russia? There is high interest in this service both from clients and from professional market participants.

The share of such services will grow - this is obvious.

The development of the segment poses new challenges for both the regulator and the market. There is an active discussion regarding the future of these services for individuals. A large number of people use such services, and The regulator cannot ignore this.

Advantages and disadvantages

The client needs to receive full information about the conditions of a specific strategy, including, for example, taxes, commission amounts.

At the same time, the prices at which the client makes transactions do not always coincide with the prices at which the author of the strategy makes transactions. Sometimes this leads to the client being disappointed in the service. But ultimately The market for autofollowing and algorithmic trading services should become clear to both brokers and clients.

There are two advantages: speed and low cost. Robot services are several times cheaper than consultants. Even with a modest amount of $5 thousand. you can get a balanced portfolio. But such a service will not take root in Russia. We like to “look into the eyes” of those who manage money.

Investing is a slow and careful process.

A robo-advising service is aimed at lazy speculators who want to earn money by shifting the burden of decision-making to someone else. This doesn't lead to anything good.

But the number of people who want to earn money without making independent decisions is very large. That's why Robo-advising will be in demand in any case.

The problems of robo-advising in Russia are associated with the weakness of the market itself - low, depreciation of the importance of the brand and name of the developer company, and the possibility of price manipulation.

Another problem is the number of active investors. The product will become interesting when Private Banking leaves the market. But this requires a unique service that takes into account the interests of a particular investor.

Considering the widespread adoption of chatbots and the pace of development of such services, the widespread adoption of such technologies is a matter of the near future. In Russia, the main players are in a state of serious competition, introducing new products and services, and improving service.

We believe that robo-advising will soon be affordable for medium-sized and niche players who will be happy to compete for clients’ funds.

Additionally, watch a short video about what algorithmic trading is:

Manual trading on the stock exchange, despite all its promise and profitability, is slowly but surely becoming a thing of the past. Nowadays, it is mainly old-school traders who trade manually, while beginners, who are just learning the basics of competent trading, are increasingly following the path of automatic trading or, as it is also called, algorithmic trading. Trusting the conclusion of transactions, opening positions, etc. an impassive mechanism, a trading robot, which is devoid of emotions and which does everything the developer has put into it, without being distracted by external stimuli.

And today we will talk about what algorithmic trading is in principle, how to work with it, where to get a good trading robot, and also consider the differences between automatic and high-frequency trading. Let's start.

So, as usual, let’s first formulate the definition of algorithmic trading.

Algorithmic trading is a type of exchange trading that involves the automatic conclusion of transactions by a trading robot, within the framework of a certain algorithm incorporated into it by the trader.

I think everything is clear here - the trader, based on his experience and trading strategy, creates a system within which he prescribes the rules for opening and closing positions, the conditions that the market and the asset must satisfy, as well as general rules capital management.

The number of securities that need to be purchased, the amount of funds allocated for this, the principle of placement - all this is often laid down by the trader in advance.

One of the main advantages of algorithmic trading is that it relieves concluded transactions from the trader’s emotions, premonitions and intuition, which often play a cruel joke on him, preventing him from adequately assessing the current market situation and making the right decision.

The second name of automatic trading best describes its essence and main task; it sounds like this: trading using mechanical systems.

Accordingly, to implement algorithmic trading in practice, a trading robot is needed. Let's talk about them.

Trading robots

A computer program with a trading algorithm embedded in it, which independently concludes transactions and other operations on stock market.

Types of robots

Trading programs can be divided into two large groups:

  1. Without the authority to independently open positions, they analyze large amounts of information about the current market conditions and provide them to the trader so that he can independently decide whether to enter into a transaction or not.
  2. A fully automated robot that does not ask permission to open a trade. At the same time, the program takes into account all market risks and possible losses.

Naturally, when we talk about algorithmic trading, we are primarily interested in the second type.

In addition to trading robots, the algorithmic strategies within which they operate can also be divided into two parts.

  1. Execution strategy(execution strategy) – implies the purchase/sale of assets in large volumes, at a weighted average price, as close as possible to the price of the last concluded transaction. It allows you to significantly reduce the costs associated with opening and closing positions and is used mainly by large players in the financial market, such as brokerage companies And investment funds. Private investors often use the second strategy.
  2. Speculative strategy– a classic system for traders, aimed at obtaining maximum profit based on the price difference between the cost of buying and selling an asset.

In relation to algorithmic trading, speculative strategies can be divided into several types, differing in their approach to work, but pursuing the same goal - obtaining maximum profit. Let's take a quick look at them:

  1. Market meeting– simultaneous entry and containment of buy/sell positions within the boundaries of the price movement for a certain asset.
  2. Peyers trading– simultaneous technical analysis of two highly correlated assets, when the purchase of one asset is accompanied by the simultaneous sale of the second. This type Speculative strategy is also called pairs trading.
  3. Basket trading– the same pair trading, only here the work is carried out not with two private assets, but with their groups.
  4. Tracking strategy– implies constant monitoring of asset quotes by a trading robot in order to identify signs of a stable trend and conclude transactions in accordance with it.
  5. Arbitration– again, parallels can be drawn with pairs trading. The work here is carried out with two assets, the correlation ratio of which is equal to one.

How to create a trading robot

The first thing you need to create an automatic trading program is a special application with the so-called algorithm designer. Modern systems automatic trading systems are quite easy to use, and even those who have little knowledge of programming can create a full-fledged trading system.

For example, a universal program that has wide functionality for algorithmic traders, it makes it possible to create your own robot by drawing it as a flowchart. All program commands, scripts, etc. TSLab will do it itself, you just need to set the direction.

Advantages of algorithmic trading

I’ll say right away that there are many of them. It’s not for nothing that algorithmic trading is extremely popular. Its main advantages include:

    • High accuracy– the robot cannot put an extra symbol after the decimal point, deviate from the planned price, under the motto “And so it will do” and open a deal at random. Whatever sequence of actions you put into it, that’s how it will trade.
    • Opportunity to make a profit from the first days. Independent trading is a rather complicated thing, you need to learn, gain experience and, what to hide, get into trouble in the form of monetary losses. Even beginners who have purchased a trading robot from more experienced colleagues can make money from algorithmic trading.
    • Ready to go– experienced traders know that sometimes they have to wait for hours, or even days, for a favorable moment to open a transaction. Naturally, this is quite difficult. After all, even being in constant readiness (which in itself is extremely tiring), you can literally walk away from the terminal for a couple of minutes and miss that very price jump that you have been waiting for a week. The program doesn't care about all this. She will wait patiently according to the schedule 24/7 and this will not in any way affect the effectiveness of her actions.
    • Operating speed– the system is capable of simultaneously analyzing several charts, quotes and indicators, as well as sending ten orders per second. And the more transactions, the more profit.
    • Lack of emotions– I already talked about this. The program makes decisions that directly follow from the algorithm embedded in it. She cannot rush, be lazy, be afraid, etc.
    • Versatility and scalability– a good algorithm can be adapted to work with hundreds of different assets, currencies, stocks, futures, etc. Its capabilities directly follow from the abilities of the developer, therefore robots created experienced traders can be used literally anywhere, on any market or exchange. In addition, if necessary, they can be changed and improved, making the algorithm completely ideal.

In principle, all the benefits are quite expected, right? Algo trading can bring huge profits, and functionality trading robot depend only on the experience of the developer.

Disadvantages of algorithmic trading

    • Technological complexity. No, the process of algorithmic trading itself is incredibly simple: connect the program to the terminal and go to rest. It is difficult to create this very program. The market is unpredictable and so far few people have been able to create the perfect algorithm.
    • Expensive– relevant only for those who do not develop algorithms on their own, but buy them from more experienced colleagues. If the robot is really good, you will have to fork out a lot of money. Independent creation of costs does not require.
    • Lack of ability to improvise. One of the main advantages of algorithmic trading is also its disadvantage. Financial markets are extremely volatile and the algorithm does not always fit into their current state. Whereas a trader, seeing changes, can go against his strategy and benefit from it.

You can, of course, highlight several more negative aspects of algorithmic trading, but they all boil down to one thing - the difficulty of creating an ideal robot. Too many factors need to be taken into account and included in it in order to consistently make a profit.

Why are algorithmic trading and algorithmic traders beneficial to exchanges?

Automated trading brings a lot of benefits not only to traders, who make their lives much easier and receive a very decent income. By the way, algorithmic trading is also a good help in studies. You observe the actions of the robot and try to explain why it made this or that decision; this allows you to quickly understand the essence of market processes and teach you how to trade on your own.

As for exchanges, they also need algorithmic traders who, through their activities and a large number of transactions carried out, provide high liquidity to assets and increase the trading turnover of the exchange. As already mentioned, a robot works much faster than a human.

High Frequency Algorithmic Trading

And now I would like to debunk one extremely common misconception, which is that many people consider algorithmic trading and high-frequency trading (High-frequency trading, HFT, editor's note) the same phenomenon.

Yes, they are similar, high-frequency trading can even be classified as one of the varieties of algorithmic trading, but it is still impossible to put an equal sign between them.

Trading using the High-frequency system involves opening a huge number of transactions on dozens of different assets, literally in a split second. The work is carried out in small volumes, which is compensated by the number of operations. Traders who use this technology make profits literally instantly. Moreover, its size is often very, very good.

Algotrading in general is a broader concept. It can be both high-frequency and quite moderate. You decide for yourself what is best for you: 10 small-volume transactions or one, but for a large amount.

What you need for algorithmic trading

Firstly, as I already said, a trading terminal and a robot that will conclude transactions.

Secondly, a good connection speed to the server, which would guarantee minimal time delays. Don't forget that high-frequency trading involves making split-second decisions, and delay here can be fatal.

Thirdly, it would be desirable if they were displayed directly in the working terminal. The program is capable of analyzing hundreds of assets at once, so why limit it and yourself? You need to get the most out of trading, so you need to take care of quotes in advance.

All three things necessary for successful algorithmic trading are provided by the Roboforex broker to its clients. There is a separate section dedicated exclusively to algorithmic traders, with all the functionality they need.

Roboforex offers traders a direct connection to the servers of the Moscow Exchange, in all areas - foreign exchange, stock and derivatives. The connection is made through specialized data transfer protocols, adapted to large volumes of information and its fast transfer.

The company also has software for creating trading algorithms, as well as ready-made algorithms that can be connected to your terminal.

And, of course, a service for connecting to quotes of all domestic and foreign assets, with their broadcast in the working terminal, without delays or delays.

After analyzing all the offers prevailing on the domestic market, our team came to the conclusion that there are no more profitable and comprehensive offers like the one coming from Zerich. This broker has done a really great job of creating optimal working conditions for algorithmic traders.

Algo trading training

I specifically highlighted this issue as a separate paragraph, because... Even such a simple thing as algorithmic trading requires at least minimal training, in which a beginner will be told what’s what, taught how to set up trading robots and make a profit from them.

Services of this kind are also provided by the company Roboforex, which offers everyone a whole range of training events, which includes courses, webinars, and face-to-face classes. On them you can learn everything related to algorithmic trading, creating trading systems and many other related things.

Conclusion

Summarizing all of the above, we can make an unambiguous conclusion that algorithmic trading is one of the most promising areas of activity today, which will only increase over time.

Exchange trading, like any other field of activity, does not stand still and automatic trading is perhaps the most modern and relevant of its areas.

And what to hide, it’s the most profitable. The results that stock exchange algorithms have demonstrated over the past few years are often beyond the capabilities of even the most experienced and advanced traders. And without a shadow of a doubt, we can say that the future of the industry lies in algorithmic trading.

Best regards, Nikita Mikhailov

P.S: and now, I suggest you watch a good video that once again describes all the advantages of algorithmic trading.

Algo trading in the form in which it is known today originated in the 80s of the last century. At that time, this type of trading was impossible for ordinary traders and was used only by institutional investors who could afford large computing power and possessed impressive intellectual resources. Today, automated trading is available to anyone with a simple personal computer.

What is algorithmic trading

There are two main definitions that give the idea of ​​what algorithmic trading is.

  1. Algorithmic trading is a method of executing a very large market order by breaking it down into a number of smaller sub-orders. To do this, a set of instructions is used, including splitting algorithms, price characteristics and other parameters that determine the conditions for sending orders for execution. Automating this process does not aim to make a profit, but it allows you to reduce the cost of executing a large order and reduce the likelihood of its non-execution. It also reduces the impact of large transactions on the markets. Among the popular algorithms are Target Close, Percentage of Volume, VWAP, Shortfall, Pegged, TWAP, Implementation .
  2. Currently, it is more often understood that algorithmic trading is a clearly formalized mechanism for opening and closing transactions, using an algorithm specified by the trader using mechanical trading systems MTS and automatic trading systems- ATS. The difference between them is that in the case of MTS, a trader can perform some of the actions independently, controlling all actions, while the operating algorithms for MTS and ATS may be the same.

Algorithmic trading in simple words is the automation of routine actions of a trader, which allows reducing the time of analyzing stock exchange information, calculating mathematical models, and making transactions. In addition, ATS rid market operations of the human factor, manifested in the form of emotions, conjectures or “trader intuition”, which often reduce the entire profitability of even the best strategy to zero.

The beginning of algorithmic trading is considered to be the moment of creation of the first automated system stock trading ( National Association of Securities Dealers Automated Quotation) in 1971. And the first negative consequences were recorded in October 1987, when program trading collapsed the US stock market.

The essence of algorithmic trading

In their work, algorithmic traders use the existing probability of quotes moving in the desired range. For calculations, historical data of the selected asset or a set of several instruments are used.

Since the market is volatile, developers are constantly busy looking for repeating patterns and calculating the likelihood of their occurrence in the future. Therefore, from a technical point of view, algorithmic trading comes down to identifying algorithms for opening and closing transactions, as well as selecting trading robots for their implementation.

There are three ways to select rules:

  • Genetic: Algorithms design computer systems.
  • Manual: a scientific approach is used, based on physical and mathematical models.
  • Auto: specialized programs are used to sort through large arrays of rules and test them.

Large algorithmic trading investment companies, including Virtu, Renaissance Technologies, Citadel, work with thousands of instruments, using dozens of families of robots. In this way, a certain diversification of algorithms is carried out, which can significantly reduce the likelihood of failures and trading errors.

Types of Algorithms

An algorithm is a set of precise instructions that are created to perform specific tasks. On financial markets User algorithms are executed by computers. To create sets of rules, data on prices, volumes, and execution times of future transactions are used.

Algorithmic trading in the stock market and Forex is divided into four target types:

  • Statistical strategy. This method is based on searching for trading opportunities using statistical analysis time series on history.
  • Automatic hedging. The purpose of the strategy is to generate rules that will allow the market participant to reduce risk exposure.
  • Algorithmic execution strategy. This method is designed to perform certain tasks related to opening and closing trading orders.
  • Direct access to liquidity. This technique is aimed at obtaining the highest speed of access to markets, reducing the cost of gaining access and connecting to trading terminals for algorithmic traders.

High-frequency algorithmic trading can be identified as a separate area of ​​mechanized trading. The main feature of this category is the very high frequency of opening orders: transactions are completed within milliseconds. This approach can provide significant benefits, but also carries certain risks.

The mechanical trading system was first described by the author of the book “ Beyond Technical Analysis» Tushar Chand(Tushar S. Chande) in 1997. MTS is called in Forex. These are software blocks that monitor the markets, issue orders for transactions and control the execution of commands.

Robotic trading programs are divided into two types:

  1. Fully automated, that is, independently making trading decisions.
  2. Giving signals for manual opening of trades by a trader.

In the context of algorithmic trading, only the first type of robots or advisors is considered, “ super task» which is the implementation of trading strategies that are impossible with manual trading.

Renaissance Institutional Equities Fund(RIEF) is the largest hedge fund using algorithmic trading. It was discovered by the American investment company Renaissance Technologies Corp., which was founded in 1982 by mathematician James Harris Simons. Edition The Financial Times in 2006 awarded Simons the title of " the smartest billionaire».

How trading robots are created

Robots used for algorithmic trading in the stock market are special computer programs. Their development begins with drawing up a clear plan for all the tasks that they will perform, starting with the main thing - strategy.

The programmer-trader is faced with the task of creating an algorithm that will take into account his knowledge and personal preferences. And, of course, it is absolutely necessary to clearly understand in advance all the nuances of the trading system that will be automated. Therefore, creating algorithmic trading systems on your own is not recommended for novice traders.

To technically implement a trading robot, you will need knowledge of at least one programming language. Used to write programs mql4, Python, C#, C++, Java, R, MathLab. The ability to program opens up a number of advantages for a trader: creating databases, execution and testing systems, the ability to analyze high-frequency strategies, as well as quickly eliminating errors.

Many very useful open-source libraries and projects have been created for each language. One of the largest algorithmic trading projects is QuantLib, created in C++. And if necessary, direct connection to Currenex, LMAX, Integral or other liquidity providers, in order to work with high-frequency algorithms, will have to master the Java language in which the APIs for connecting are written.

If you don’t have programming skills, you can use special algorithmic trading platforms to create simple MTS, for example:

  • TSLab;
  • WelthLab;
  • MetaTrader;
  • S#.Studio;
  • Multicharts;
  • TradeStation;

Algorithmic Forex trading

The growth of algorithmic trading on Forex in recent years is largely due to process automation and reduction in implementation time foreign exchange transactions using software algorithms. Automation also reduces operating costs, including those for fulfilling trade orders.

Algorithms are also used by banks when updating currency pair quotes on trading platforms, increasing the speed of price delivery and reducing the amount of manual labor hours used in calculating prices. Algorithms also allow banks to meet the planned level of risk when holding currencies and reduce transaction costs.

In addition, algorithmic Forex trading is increasingly being used to implement speculative strategies, paving the way for the use of arbitrage on small price deviations between currency pairs. This is made possible by the high frequency, which is combined with the algorithm's ability to interpret the data stream and execute orders.

Quantitative trading

Quantitative trading is a direction in trading aimed at creating models that describe the dynamics of various financial assets and capable of making accurate forecasts.

Quantitative traders, also called quanta(quants, short for quantitative analyst) are, as a rule, highly educated people: economists, mathematicians, programmers. To become a quant, you must at least have knowledge of mathematical statistics and econometrics.

The activities of quantitative traders are focused on creating mathematical models based on the discovered inefficiencies of various market instruments in order to make a profit. Quants often work in teams on the staff of hedge funds that practice algorithmictrade, because it is simply impossible to compete with large investment structures alone. Quantitative funds strive for a defensible and capital-intensive management strategy financial instruments, independent of market fluctuations.

Largest fund Bridgewater Associates, founded by Ray Dalio, manages $160 billion in assets based on quantitative investments ( quantitative investing). Based on the results of 2016, the profit of the company's investors amounted to $5 billion.

High frequency algorithmic trading or HFT trading (High-frequency trading) is the most common form of automated trading. A special feature of the method is the high-speed execution of transactions on multiple instruments, in which the cycle of opening/closing a position is completed in a fraction of a second. HFT trading uses the main advantage of a computer over a person – speed.

The term "High Frequency Trading" was coined by New York Times journalist Charles Duigg in 2009 while writing the article "Stock Traders Find Speed ​​Pays, in Milliseconds."

High-frequency transactions are carried out in microvolumes, which are compensated by a huge number of transactions. In this case, profit or loss is recorded instantly. High-frequency strategies require complex technicalconditions, it is also impossible to do without high-quality direct communication with liquidity providers. But to realize all the benefits of HFT, territorial proximity to exchange communication gateways (Colocation) is required.

The author of the idea of ​​ultra-high-speed trading is considered to be Stephen Sawson, who, together with David Whitcomb and Jim Hawkes, created the world's first automated trading platform in 1989 Automated Trading Desk(ATD). The official development of this technology began only in 1998 with the issuance of the SEC (Commission on securities and US exchanges) permission to operate electronic trading platforms on major American exchanges.

Basic principles of HFT trading

The features of high-frequency algorithmic trading are the following principles:

  • The use of high-tech systems to keep the execution time of positions at around 1–3 milliseconds.
  • Making profit from micro-movements in prices, as well as from margins.
  • Conducting high-speed transactions with large volumes and making profits at the minimum possible level, sometimes calculated in fractions of a cent. Thus, the potential of the Sharpe ratio of HFT companies is many times higher than classical strategies.
  • Application of all types of arbitrage transactions.
  • Trading is strictly intraday. Moreover, the volume of transactions per session can reach tens of thousands.

High Frequency Trading Strategies

High-frequency trading makes it possible to use any algorithmic trading strategy, but at speeds inaccessible to humans. As an example, we can consider several exchange HFT strategies.

  1. Electronic market making (Electronic market making). Profit is achieved by trading within the spread in the process of adding liquidity to the market. Often during trading on the exchange, the spread widens, and if the market maker does not have clients capable of maintaining a balance, then HFT must cover the supply/demand for the instrument with its own money to fix the spread. Exchanges and ECNs additionally pay rebates or discount transaction costs as a reward for providing liquidity.
  2. Arbitration of delays (Latency arbitrage). The strategy takes advantage of advanced access to stock market data by being geographically close to its servers or purchasing an expensive direct connection to the main trading platform. In most cases, it is used by traders dependent on exchange regulators.
  3. Statistical arbitrage (Statistical arbitrage). This method of HFT trading is based on identifying correlations of various market instruments between trading platforms or correlating forms of assets - futures on currency pairs and their spot counterparts, derivatives and equities. Such operations are often carried out by private banks, investment funds and other licensed traders.
  4. Identification of high liquidity pools in the order book(Liquidity detection). This technology is aimed at searching for hidden (dark pools) or large orders by opening small test transactions. The goal is to get into the strong movement generated by volume pools.
  5. Frontrunning (Front running). The name of this strategy can be translated as “running ahead.” It is based on the analysis of current buy/sell orders, asset liquidity and average position volumes. The essence of the method is to detect a large order to buy and place your own small order at a slightly higher price, since in this case the large order plays the role of protection against a sharp drop in price. After executing its order, the algorithm immediately places another one slightly higher, taking advantage of the high probability of quote fluctuations around a large order. In this strategy, among other things, analysis of the state of the order book is very important.

Algorithmic trading in the stock market

In 2013, 73% of US stock market transactions and 63% of global securities trading turnover were accounted for by algorithmic trading systems.

Robots carry out order on the Moscow Exchange platform 90% of transactions, and on – almost 60 % .

  • Currently, the share of algorithmic trading has stabilized, and robotic operations supply at least 55% of liquidity to global exchanges.

The main official participants in high frequency trading are Citadel LLC, ATD, Hill, Virtu Financial, Tradebot, Timber Chicago Trading and GETCO. However, the most active in this direction are the HFT divisions of the largest financial institutions - Goldman Sachs, Morgan Stanley and the like.

It is noteworthy that as technology advances, making a profit for algorithmic traders is becoming increasingly difficult and expensive. Continuously increasing costs for up-to-date software, equipment modernization and the creation of new systems are gradually pushing small and medium-sized companies out of the market.

Algo trading training

Naturally, it is better to start the process of learning algorithmic trading by learning the basics of stock trading and technical analysis, and only then buy books on algorithmic trading. You should also take into account that most specialized publications can only be found in English.

According to an expert in the field of quantum trading Michael Hulls-Moore, you should not dive into the areas of complex mathematics until you have learned the basics of algorithmic trading. For aspiring quants, he recommends several books:

  • Ernest Chan "Quantitative Trading" (Ernest Chan).
  • Rishi K. Narang “Inside the Black Box” (Inside the Black Box, Rishi K. Narang).
  • Ernest Chan "Algorithmic Trading" (Algorithmic Trading, Ernest Chan)
  • Barry Johnson "Algorithmic Trading & DMA, Barry Johnson."
  • Larry Harris, Trading and Exchanges: Market Microstructure for Practitioners, Larry Harris.

Developer of MTS and creator of the SmartX trading terminal Andrey Gorkovenko suggests starting to study algorithmic trading with the following materials:

  • from the books of Nassim Taleb, primarily “Fooled by Randomness”;
  • methodological materials on options and futures of the Moscow Exchange;
  • lectures by the Vice-Rector of the State Institution “Higher School of Economics” Grigory Kantorovich;
  • books by Yuh-Dauh Lyuu “Methods and algorithms of financial mathematics” (Financial Engineering and Computation, Yuh-Dauh Lyuu);
  • publications by Marco Avellaneda & Sasha Stoikov.

Risks of algorithmic trading

With the widespread use of algorithmic trading in recent years, its influence on the markets has increased significantly. Naturally, new trading technologies entail previously unforeseen specific risks. HFT trading is especially fraught with risks, and these need to be taken into account by both institutional and individual market participants.

All risks associated with algorithmic trading can be divided into several categories.

Operational risks. One of the most common problems is technological failures: algorithmic robots can increase the volume of orders to a level at which trading servers are simply “choked” by the huge flow of data. This leads to system failure and suspension of trading, which inevitably leads participants to losses or loss of profit. Another aspect of operational risk manifests itself in algorithmic errors made by developers. Software flaws also provoke hardware failures that can affect the dynamics of instrument quotes.

Probability of a sharp jump in volatility. All the world's largest markets from time to time record abnormal, fundamentally unjustified rises and falls in asset prices - the so-called flash crashes. Most often, this price behavior is caused by the work of HFT algorithms, which have a very large share in the total volume of trading operations.

According to the company Nanex, which monitored stock exchange anomalies in the US and EU, about 100 flash crash cases were recorded in 2013, and 42 in 2014. Analysis of more than 60 markets in 2006–2011. identified 18,520 episodes of ultra-fast and unusually strong price surges provoked by algorithmic systems.

Risk of sudden liquidity outflow. Market turbulence, often caused by algorithmic traders, increases the risk of sudden liquidity withdrawals. In the event of stressful movements in the market, algorithmic traders may stop operations. Due to the fact that the lion's share of transactions comes from orders from robots, a large-scale outflow of liquidity is inevitable, instantly collapsing quotes. The departure of algorithmic players from the market could have dire consequences for the pricing of some instruments, as well as for the functioning of the entire market as a whole. In addition, such events provoke panic, which only aggravates the emerging trends.

The danger of rising costs. The increase in the number of algorithmic traders, coupled with the complication and speed of algorithms, increases the costs of regulators and trading platforms. Exchanges need to constantly increase the level of technology in their terminals to meet the growing demands of algorithmic traders. In turn, regulators are improving control systems for shadow transactions and trading in general. Thus, rising costs lead to changes tariff policy for market participants in the direction of increase.

Possibility of price manipulation. Algorithmic systems can be configured to influence individual instruments. An example of such an impact is the disruption of BATS Global Markets' IPO in 2012, when its shares fell to a few cents on the first day of trading from an initial $16 in 9 seconds. The reason was the work of a high-frequency robot, deliberately programmed for such actions. It is believed that HFT traders are able to artificially increase market volatility to increase profits, which is also a risk factor. Robots can also be configured to change the best buy/sell prices to mislead other traders. As a result, the stock market ceases to reflect the actual supply and demand for assets.

Risk of reduced market predictability. The impact of algorithmic robots on stock markets leads to a loss of transparency in pricing, which significantly reduces the accuracy of forecasts. Fundamental analysis is losing its value, and determining the intentions of algorithmic traders comes to the fore. In addition, robots take away all the best prices from classic traders.

Robotic systems deprive traditional participants of confidence in the efficiency, which leads to a gradual abandonment of manual trading. This situation only strengthens the position of algorithmic systems, which inevitably leads to an increase in the risks that accompany their activities.

If you find an error, please highlight a piece of text and click Ctrl+Enter.

The procedure for opening and closing transactions formulated by the trader, which is based on a clear algorithm for the operation of automatic or mechanical trading systems - ATS and MTS, respectively.

Specifics and application of algorithmic trading

Algo trading is a convenient opportunity to automate a trader’s routine manipulations, resulting in a reduction in the time required to analyze the stock market situation, perform operations, and perform mathematical calculations. ATS help to minimize the influence of the human factor - emotions, panic, haste, speculation, which often make even professional strategies unprofitable. Trading is based on the existing probability of quotes falling within a given range. Calculations are based on historical data regarding a specific asset and may include a whole set of working tools. Following the continuous changes in the market, algorithm developers are constantly searching for repeating models, on the basis of which they formulate rules for making transactions and select trading robots that help implement this mechanism. Methods for selecting models:

  • genetic - the creation of algorithms is entrusted to computer systems;
  • automatic - programs are used that can work with huge amounts of data and test strategies;
  • manual - the scientific approach takes into account mathematical and physical models.

Leading algorithmic trading companies use thousands of tools that significantly reduce the likelihood of errors and failures.

Types and potential

An algorithm is a set of precise instructions that achieve specific goals. Depending on the latter, there are 5 types of trading in the stock market:

  • statistical;
  • algorithmic execution trading;
  • automatic hedging;
  • direct access;
  • high frequency algorithmic trading.

The growing popularity of MTS and ATS among speculators is due to increased automation of processes, the transience of foreign exchange transactions, and reduced operating costs. Banks also began to use algorithms to provide up-to-date quotes on trading platforms, increase the speed of data updating, reduce the role of manual labor in calculating prices, and minimize transaction costs.

The essence of high frequency algorithmic trading

High-frequency algorithmic trading is also called HFT trading; it is the most popular among other forms of automated transactions. Its advantage is the ability to quickly conclude transactions with more than one instrument; here, work with positions (opening and closing) is performed in a fraction of a second. Operations are characterized by microvolumes, moreover, they are balanced by a large number of them. The results - losses and income - are recorded instantly, so a complex technical base and high-quality direct connection with communication gateways are needed. Key features of high frequency trading:

  • the use of innovative systems capable of executing positions in milliseconds;
  • carrying out high-speed transactions characterized by large volumes and the lowest possible profit;
  • exclusively intraday trading;
  • making a profit from margins and micro-fluctuations in prices;
  • use of all categories of arbitrage transactions.

The most common HFT strategies are market making, delay arbitrage and its statistical form, front running. The latter consists of searching for large purchase orders and placing your own small order, characterized by a higher price. As execution proceeds, the algorithm automatically places orders a little higher, counting on the manifestation of accompanying fluctuations. Robotic operations performed as part of algorithmic trading create about 55% of the liquidity of global stock exchanges. With the technological development of tools, the process of making a profit becomes more complicated and more expensive. Mid-level companies are gradually being forced out of the core market, as costs for modernizing the technical base and updating software are increasing.

If you also decide to engage in algorithmic trading on the stock market, then you will need to implement a number of strategic (trading) and technical (algorithmization) complexes in order to develop a truly high-quality and competitive algorithm for trading on the stock exchange. We will devote a separate section ““ to these topics, in which you can already view published materials, and also expect the release of new articles useful for algorithmic trading.

In this article I would like to talk about methods that allow you to determine the most promising algorithmic strategies applicable when creating trading robots. Here it is important to find, correctly evaluate and select the appropriate systems, correctly determine the data to be tested, evaluate the trading strategy, as well as conduct a backtesting phase and implement the strategy as a whole.

How to Develop a Good Algorithmic Trading Strategy

First of all, algorithmic trading in the stock market starts with detailed planning of all aspects. The first of which is strategic strategy development.

Personal achievements, developments and knowledge in trading

To achieve success when trading, either independently or using trading algorithms, you need to fully define your own individual characteristics in trading, identify strengths and weaknesses. When trading financial instruments, you can lose money extremely quickly, so you need to imagine not only the strategy you prefer, but also your capabilities, as well as your expected behavior options.

It is very important to be able to follow the trading system, be patient enough, and try to maintain emotional balance.
Since the algorithmic trading system uses a certain algorithm, which, in fact, works independently, you must clearly understand when you can interfere with its actions, and when it is better to stay away.

In some periods, especially when the recession lasts for a long time, it is quite difficult to stay away. However, in most cases, this is simply necessary, since strategies that can bring good results lose their effectiveness with the slightest intervention.

Another point of great importance is time.

How much of your time can you devote to trading? Full time, every day? A few hours a week? The type of strategy used also depends on this. For example, those who are employed full-time should not choose intraday futures trading, at least until it is fully automated.

The strategy methodology also depends on how much time you are willing to devote to trading. If this strategy is traded frequently and is dependent on expensive news events (for example, Bloomberg), it is important to evaluate the available opportunities with maximum realism and successfully manage them.

For those who have a lot of time or great practical skills to automate trading, you can work with a high-frequency trading strategy, which is more technological.
In any case, it is important to conduct regular research regarding the vehicle - in this case, the portfolio will become profitable in stages. Most strategies disappear from the scene over time, so research work is carried out almost constantly.

In addition, you need to evaluate your available trading capital. For a quantitative strategy, the appropriate amount of capital is $50,000. Of course, if a trader has a larger amount, this always has a beneficial effect on his portfolio of strategies. This is due, not least of all, to the fact that both medium and high frequency strategies involve transaction costs, the size of which can reach significant amounts.

If you plan to start trading with an amount of less than $10,000, then you will have to limit yourself to using low-frequency strategies that trade one or two assets, otherwise all the profit you receive will go to operating expenses.

What is it for?

All these determination procedures, as well as comparisons, are important, since algorithmic trading in the stock market should be based on the knowledge and preferences of the trader-programmer. You shouldn't try to create an algorithmic system that you don't understand. Even a similar system in a different time period will work differently, and without understanding all the processes, you are unlikely to be able to properly adjust it. For example, if you worked in the medium term and are trying to create a scalping system.

It is better to start the process of creating algorithmic robots for trading in the stock market with those strategies that you are well versed in.

The strategy has been chosen, what next?

Creating algorithmic trading systems requires a skill such as programming.

If you can program in C++, Java, C#, Python or R, this will give you the opportunity to personally build data warehouses, backtesting and runtime systems, which will provide you with a number of advantages, the main one being the ability to understand all aspects of the infrastructure. Thanks to this, you will also have the opportunity to analyze high-frequency strategies. As a result, you will be able not only to test your own software, but also to troubleshoot errors. In addition, it will be possible to devote more time to coding infrastructures and directly implementing strategies. It is likely that for some processes of performing calculations, forecasting or tracking test results, it will be much more convenient to work using Excel or MATLAB, and outsource the development of the remaining components. But the latter is not highly recommended, since again, you will not be able to properly calibrate the system, since you will not understand someone else's code.

If programming is currently difficult, but you plan to move in this direction, you can start by mastering , which allows you to build simple robots without knowledge of programming languages.

Above all, anyone planning to engage in algorithmic trading should have a clear idea of ​​what exactly they want to get out of algorithmic trading. It would not be superfluous to determine the material work plan, whether regular income is needed, through which profit will be made from a trading account or capital growth by long term basis. The goal will determine the appropriate strategy. Higher frequency trading strategy with less volatility will allow you to regularly withdraw profits. And low-frequency trading, in turn, is available to long-term traders to accumulate a deposit.