High-frequency trading (HFT): algorithms and strategies
High-frequency trading (HFT): algorithms and strategies

Video: High-frequency trading (HFT): algorithms and strategies

Video: High-frequency trading (HFT): algorithms and strategies
Video: SIMPLEST TRADING STRATEGY FOR BINARY OPTIONS IF YOU ARE A BEGINNER / pocket option 2024, March
Anonim

People are no longer responsible for what happens in the market because computers make all the decisions, says Flash Boys author Michael Lewis. This statement most fully characterizes high-frequency trading HFT. More than half of all promotions being implemented in the US are not done by humans, but by supercomputers capable of placing millions of orders every day and gaining millisecond advantage by competing for markets.

HFT history

History of HFT creation
History of HFT creation

HFT is a form of algorithmic trading in finance created in 1998. As of 2009, high-frequency talks accounted for 60-73% of all stock trading in the US. In 2012, this number dropped to about 50%. The level of high-frequency transactions today ranges from 50% to 70% of financial markets. Companies that work in the field of high-frequency trading compensate for low margins with incredibly hightrading volumes in the millions. Over the past decade, the opportunities and returns from such trade have declined sharply.

HFT uses sophisticated computer programs to predict how markets will perform based on a quantitative method. The algorithm analyzes market data in search of placement opportunities by monitoring market parameters and other information in real time. Based on this information, a map is drawn, in which the machine determines the right moment to agree on price and quantity. Focusing on the division of orders by time and markets, it selects an investment strategy in limit and market orders, these algorithms are implemented in a very short time.

The ability to directly enter the markets and place orders on positions, at a speed of milliseconds, led to the rapid growth of this type of operations in the total market volume. According to experts, high-frequency trading accounts for more than 60% of transactions in the US, 40% in Europe and 10% in Asia. HFT was first developed in the context of equity markets, and in recent years has been expanded to include options, futures, ETFS (Treaty Funds Exchange) currencies and commodities.

Algorithmic trading terms

Algorithmic trading: terms
Algorithmic trading: terms

Before getting into the topic of HFT, there are some terms to be aware of that make strategy explanations more precise:

  1. Algorithm - an ordered and finite set of operations that allows you to find a solution to a problem.
  2. Programming language - a formal language designed to describe a set ofsequence of actions and processes that the computer must follow. This is a practical method by which a person can tell the machine what to do.
  3. A computer program is a sequence of written instructions for performing a specific task on a computer. This is an algorithm written in a programming language.
  4. Backtest - the process of optimizing a trading strategy in the past. It allows you to know, as a first approximation, the possible performance and evaluate whether the operation is expected.
  5. Message server - a computer designed to match buy orders with sales of a particular asset or market. In the case of FOREX, each liquidity provider has its own servers that provide online trading.
  6. Co-location - determines how to place the execution server as close as possible to the message server.
  7. Quantitative analysis is a financial section of mathematics that, through the prism of theories, physics and statistics, trading strategies, research, analysis, portfolio optimization and diversification, risk management and hedging strategies, produces results.
  8. Arbitrage is a practice based on exploiting price differences (inefficiencies) between two markets.

Nature of High Frequency Trading System

The Nature of the High Frequency Trading System
The Nature of the High Frequency Trading System

These systems have absolutely nothing to do with Expert Advisors. The algorithms that drive these machines do not match the main style of the adviser - if the price crosses down, the moving averageenters a short position. They use quantitative analysis tools, prediction systems based on human psychology and behavior, and other methods that most users will probably never know about. The scientists and engineers who develop and code these high-frequency trading algorithms are called quants.

These are systems that really make money, with huge potential up to $120,000,000 a day. Therefore, the cost of implementing these systems is certainly high. It is enough to calculate the costs of software development, the salary of quants, the cost of the necessary servers to run the specified software, the construction of data centers, land, energy, colocalization, legal services and much more.

This trading system is called "high-frequency" by the number of transactions it makes every second. Therefore, speed is the most important variable in these systems, the key from which the decision follows. Therefore, the co-localization of servers that calculate the algorithm for high-frequency trading of cryptocurrencies is very important.

This follows from this specific fact: In 2009, Spread Network installed a fiber optic cable in a straight line from Chicago to New Jersey, where the New York Stock Exchange is located, at a cost of $20,000,000 for the job. This network overhaul reduced the transmission time from 17 milliseconds to 13 milliseconds.

Example of a trade deal. A trader wants to buy 100 shares of IBM. There are 600 shares in the BATS market at $145.50 andthere are 400 more shares on the Nasdaq market at the same price. When he fills his buy order, high-frequency machines detect him before the order reaches the market and buy those shares. Then, when the order hits the market, these machines will already put them up for sale at a higher price, so eventually the trader will buy 1,000 shares at 145.51, and the market makers will get the difference due to the faster connection and processing speed. For HFT, this operation will be risk-free.

Opaque platforms and infrastructure

Given the previous example, you need to understand how the HFT will know in the market about an order to buy 1000 shares. This is where opaque algorithmic trading platforms come in that use the same “brokers” and are a server room. The upside is that instead of sending orders to the market, some brokers route them to their opaque HFT platform, which uses speed and buys shares in the market and then sells them for more than the initial price to the investor, in just a few milliseconds. In other words, a broker who theoretically follows the interests of a trader actually sells him HFT, for which he charges a good fee.

Opaque platforms and infrastructure
Opaque platforms and infrastructure

The infrastructure that high frequency markets need is amazing. It is located in data centers, often financial institutions themselves, next to the offices of exchanges, which are also data centers. Proximity to data centers is extremely important as speed matters in this strategy,and the shorter the distance the signal must travel, the faster it will reach its destination. This includes large financial firms that can take on the cost of buying land and building their own data center with thousands of servers, emergency power systems, private security, astronomical electricity bills and other expenses.

More "smaller" companies that are dedicated to this business prefer to host their servers inside non-transparent broker platforms or data centers in the same markets. This is a moot point as the same brokers and markets are 'renting' space for HFT to minimize price access times.

Advantages and disadvantages of trading

Advantages and disadvantages of trading
Advantages and disadvantages of trading

According to the above, the image of HFT in public debate is very negative, especially in the media, and in a broader sense it is perceived as an emanation of "cold" finance, dehumanization with harmful social consequences. In this context, it is often difficult to talk rationally about a subject that is traditionally based on financial passion and sensationalism, whether in the political or media arena.

In certain circumstances, HFT may have implications for the stability of financial markets. In addition to the purely technical aspects associated with trading strategies for high-frequency trading on low-volatility securities, the main risk at the global level is systemic risk and system instability. For some HFT requireda requirement for adapting to the market ecosystem is innovation, which increases the risk of a financial crisis.

Three main reasons for the instability of high-frequency trading in Russia:

  1. Retroactive loop can be built and self-reinforcing through automated computerized transactions. Small changes in the cycle can cause a big modification and lead to undesirable results.
  2. Instability. This process is known as "normalization of variances". Specifically, there is a risk that unexpected and risky actions, such as small failures, will gradually be considered more and more normal until disaster strikes.
  3. Not the instinctive risk inherent in financial markets. One reason for potential instability is that individually tested algorithms that give satisfactory and encouraging results may actually be incompatible with algorithms introduced by other firms, making the market unstable.

In this controversy about the benefits and harms of HFT high-frequency trading, there are enough fans of this type of global trading with their own arguments:

  1. Increase liquidity.
  2. No psychological dependence on market operators.
  3. The spread, which is the difference between the ask price and the ask price, is mechanically reduced by the increased liquidity generated by HFT.
  4. Markets can be more efficient.
  5. Indeed, algorithms can exhibit market anomalies thathumans cannot see due to cognitive abilities and limited computation. Thus trade-offs can be made between different asset classes (stocks, bonds and others) and stock markets (Paris, London, New York, Moscow) so that an equilibrium price.

Financial industry opposes

The financial industry opposes such regulation, arguing that the consequences would be counterproductive. Indeed, too much regulation is equivalent to less exchange and circulation of credit, mechanically increases the cost of the latter, ultimately makes access to capital more expensive for business, and has negative consequences for the labor market, goods and services.

Therefore, several countries want to formally regulate and even ban HFT. However, any purely national regulation will only affect a small area, since, for example, HFT for securities in that country can be done on platforms located outside of that country. A purely national law will have the same weakness as any territorial law in the face of free capital that can be distributed and exchanged throughout the world. A country that wants to unilaterally implement such regulation will lose. At the same time, other countries will benefit doubly from its weakening.

The only viable option in the short to medium term is legislation at the regional level. In this context, it can be accepted by Europe if it makes significant progressin this direction, then countries outside of Europe, the United Kingdom and the United States will benefit.

Trading table characteristics

Agents using these trades are private trading table firms in investment banks and hedge funds that are able to generate large volumes of transactions in short periods of time based on these strategies.

High frequency trading companies have:

  1. The use of computer equipment equipped with high-performance software and hardware - generators for routing, execution and cancellation of orders.
  2. Using collocation services that install their servers physically close to the central processing system.
  3. Introduction of numerous orders canceled shortly after the presentation, the purpose of the income of such orders is to capture extended sales in front of other players.
  4. Very short time to create and liquidate positions.

Features of different strategies

Features of different strategies
Features of different strategies

There are different types of HFT strategies, each with its own signature features, usually:

  • creating a market;
  • statistical arbitrage;
  • detection of liquidity;
  • price manipulation.

The Market Creation Strategy constantly issues competitive buy and sell limit orders, thus providing liquidity to the market, and its average profit is determined bybid/ask spread, which, along with the introduction of liquidity, provides its advantage as fast transactions are less affected by price movements.

In strategies called liquidity detection, HFT algorithms try to determine the benefits of the actions of other large operators, for example, by adding several data points from various exchanges and looking for characteristic patterns in variables such as order depth. The purpose of this tactic is to capitalize on price fluctuations created by other traders so they can buy, just before large orders are filled, from other traders.

Market manipulation strategies. These methods used by high-frequency operators are not so clean, create problems in the market and, in a certain sense, are illegal. They mask offerings, preventing other market participants from revealing commercial intent.

Common Algorithms:

  1. Fueling is when the HFT algorithm sends more orders to the market than the market can handle, potentially causing problems for so-called slower traders.
  2. Smoking is an algorithm that involves submitting orders that are attractive to slow traders, after which orders are quickly reissued with less favorable conditions.
  3. Spoofing is when the HFT algorithm posts sell orders when the real intent is to buy.

Online trading courses

Online trading courses
Online trading courses

Creating automated trading systems is a great skill for tradersany level. You can create full-fledged systems that trade without constant control. And effectively test your new ideas. Trader save time and money by learning how to code yourself. And even if you outsource coding, it's better to communicate if you know the basics of the process.

It is important to choose the right trading courses. When choosing, the following factors are taken into account:

  1. Quantity and quality of reviews.
  2. Course content and curriculum.
  3. Variety of platforms and markets.
  4. Coding language.

If the future trader is new to programming, MQL4 is an excellent choice where you can take a basic programming course in any Python or C language.

MetaTrader 4 (MT4) is the most popular graphical platform among retail Forex traders with a scripting language - MQL4. The main advantage of MQL4 is a huge amount of resources for Forex trading. On forums like ForexFactory, you can find strategies used in MQL4.

There are enough online courses on this strategy on the Internet, with several basic and common strategies, including crossovers and fractals. This gives the beginner enough knowledge to learn advanced trading strategies.

Another "Black Algo Trading: Create Your Own Trading Robot" course is a high quality product and is the most complete for MQL4. Notably, it covers optimization techniques that other courses skip and is comprehensive for any beginner.

Teacher, Kirill Eremenko,has many popular courses with rave user reviews. Course "Create your first FOREX robot!" is one of them. This is the main practical course that introduces high-frequency trading programs in MQL4. It is aimed at absolute beginners and starts with learning how to install the MetaTrader 4 software.

Moscow Exchange

Moscow Exchange
Moscow Exchange

Young traders think that the largest Russian exchange holding trades exclusively on the stock market, which is certainly wrong. It has many markets such as urgent, innovative, investment and others. These markets differ not only in the types of trading assets, but also in the way sales are organized, which indicates the versatility of MB.

Last year, the CBR analyzed trading on the Moscow Exchange of HFT participants and their impact on the work of the CBR. It was carried out by experts from the Department for Combating Unfair Practices. The need for this topic is explained by the growing importance of HFT in the Russian markets. According to the Central Bank, HFT-participants account for a significant part of transactions of the Russian MB, which is comparable to the data of developed financial markets. In total, 486 solid HFT accounts officially operate on the MB markets. Bank experts divided HFT participants into four categories depending on the amount of work on the IB:

  • Directional;
  • Maker;
  • Taker;
  • Mixed.

According to the results, HFT firms are actively participating in the work of the IB, which allows online trading dealers to quote rates in verya wide range and confirms the positive result of HFT operations on market liquidity. In addition, the transaction costs of HFT participants performing currency purchase / sale operations will decrease. This level of instant liquidity increases the prestige of the foreign exchange market, according to CBR experts.

Specialists record a variety of trading activity on the Moscow Exchange, which have the ability to influence market characteristics. These are real algorithmic trading systems of financial markets. There are systems responsible for absorbing or injecting liquidity in very short periods of time, which embody the "watcher" pattern, which ultimately makes the price move.

HFT outlook

In this trading market makers and big players use algorithms and data to make money by placing huge order volumes and earning small margins. But today it has become even smaller, and the opportunities for such a business have decreased: income in world markets last year was about 86% lower than ten years ago at the peak of high-frequency trading. With continued pressure on the sector, high-frequency traders are trying to defend tougher operating conditions.

Prospects for high-frequency trading
Prospects for high-frequency trading

There are many reasons why the income of this practice has declined over the past decade. In a nutshell: increased competition, increased costs and low volatility have all played their part. Vikas Shah, an investment banker at Rosenblatt Securities, told the Financial Times thatHigh-frequency traders have two raw materials they need to work effectively: volume and volatility. The algorithm boils down to a zero-sum game based on how fast current technology can be. Once they reach the same speed, the benefits of high-frequency trading will disappear.

As obviously, this is a very big and interesting topic, and the secrecy that surrounds it is fully justified - whoever has the goose that lays golden eggs will not want to share it.

Recommended: