ICMarket

Algorithmic Trading Explained: The Basics

While many still think of traders dressed in coloured jackets in a crowded trading pit, few people picture a computer server churning away making millions of decisions.

Algorithmic trading

It is estimated approximately 75% of all US equity trades are not placed by humans, but by machines, also known as ‘algorithms’. The same algorithmic trend is also evident in other electronically traded asset classes, such as foreign exchange (FX or forex), the futures market, bonds, energy and so on.

With such huge volumes, it’s a subject traders must be at least mindful of.

What is an algorithm?

The term algorithm attracts several definitions, though in essence it is a computational procedure beginning with an input value that yields an output value.

Surprisingly, algorithms are used in everyday life, a cooking recipe or a route finder on maps, for example. Despite living in a society where algorithms have become ubiquitous, the main theme of this article is focused on trading and how algorithms fit into this field.

Algorithmic trading

Today, algorithmic trading (also referred to as ‘automated trading’, ‘machine learning’, ‘algo trading’ or ‘black-box trading’) is amongst the most talked about technologies in the financial sector.

This wasn’t always the case. Exchanges only began transitioning from the ‘physical’ ­to electronic trading in the early 1970s, a notable exception being the New York Stock Exchange (NYSE), now largely a promotional backdrop for companies listed there. The real action on the NYSE takes place in suburban Mahwah, New Jersey, at a data centre ringed by telecommunication masts. In the late 1980s into early 1990s, electronic communication networks became increasingly popular for traders looking for more efficient access to the markets, consequently setting the stage for automated trading.

With respect to algorithmic trading, algorithms are a series of conditions which must be met to execute a buy or sell order. Powerful computers directly interact with trading platforms, executing orders without human intervention. Based on a built-in algorithm, computers observe market data at high frequency and send back trading instructions, often within milliseconds.

Algorithmic trading strategies and limitations

Several algorithmic trading systems are implemented across various asset classes in the financial sector, and remains a highly competitive segment:

  • Arbitrage. Arbitrage strategies aim to profit from price differences between assets that are strongly correlated. Since the foreign exchange market price differences tend to be incredibly small, large positions are required to generate profits. ‘Triangular arbitrage’ is a popular technique within this domain. It involves two currency pairs and a currency cross between the two. For example, EUR/USD, USD/JPY and EUR/JPY. Without getting too technical, the trader first buys EUR using USD, then sells EUR in exchange for JPY, and finally buys USD with JPY. This is considered a USD-to-USD triangular arbitrage. By definition, a triangular arbitrage opportunity is exploited if a trader carries out the corresponding three-leg trade to remove it from the market.
  • High-frequency trading (HFT). This is a special category of automated trading using proprietary algorithms characterised by brief position-holding periods, low-latency response and high trading volumes in a day. Success depends on the speed and the efficiency of technology. Financial institutions continually work to find ways to modernize their IT to execute trades faster than competitors. The constant need for speed has created competition to see who can achieve the fastest performance in terms of connectivity, data access, computation and real-time analytics.

High frequency trading

Overclocking is a practice commonly seen in this sector: running hardware at faster speeds than the manufacturer-specified clock of frequency. Though this improves performance, speed and reduces system latency, this practice carries risks, such as overheating, individual component breakdown, unreliable functioning etc.

Two common types of HFT:

  • Execution trading is when an order (often a large order) is executed via a computerized algorithm. The program is designed to get the best possible price. It may split the order into smaller pieces and execute at different times.
  • The second type of high frequency trading is not executing a set order but looking for small trading opportunities in the market.
  • News-based algo trading. Most traders understand news events tend to produce rapid movement across multiple asset classes. Owing to the vast array of news released by modern electronic communication, it’s increasingly difficult for human eyes to process this information in a timely manner. A computer would do a better job given its ability to respond immediately and process vast amounts of information. The challenge, nevertheless, is building an algorithm capable of converting news to quantified numbers, which can be used to make objective quantitative trading decisions.
  • Mean reversion. This strategy is based on the idea that assets revert to their mean periodically. Identifying a range allows algorithms to place trades when the asset breaks in and out of its predefined range.
  • Market makers. Agents who are ready to buy and sell financial instruments to guarantee traders counterparty for their transaction. Market-maker algorithms tend to reduce transaction costs, increase liquidity, reduce volatility and control risk management more effectively.

Although not an exhaustive list, automated systems boast extensive capabilities, able to program a simple moving average crossover approach right up to the most complex. The latter tends to be kept secret within financial institutions.

Though many benefits are evident in the automated world, limitations exist:

  • Lack of control. While measures are often put in place to protect capital, things can malfunction. Since trades are automated, if the program runs in a way it’s not supposed to, controlling losses may be a challenge. Programs need to be tested thoroughly to avoid these mistakes. Trading algorithms must also be modified over time in order to keep ahead of front-running competition. If an edge is lost, trades can quickly turn negative, especially if no one is paying close attention.
  • Technical expertise. Automated trading requires specialised skills usually from ‘quants’ – a person who specializes in the application of mathematical and statistical models. As the core of algorithmic trading revolves around algorithms, data, and high-level programming skills, a thorough understanding of statistics and calculus is required. On top of this, an understanding of financial markets and theoretical knowledge is necessary.

Some of the types of quants employed at financial institutions are statistical arbitrage quants, research quants, desk quants and front office quants.

  • Like manual trading, a one-size-fits-all approach cannot be applied to every trading situation, hence constantly monitoring/altering the algo’s parameters is essential to ensure smooth running in all market conditions.

The future of algorithmic trading

Some financial experts consider high-level automation is set to expand. It is common belief algorithms will become more complex, able to adjust to different market patterns using artificial intelligence ‘AI’.

Historically, automated trading was reserved for the elites – large institutional banks. With the explosion of technological advances in recent decades retail traders are making an appearance. Retail traders have the option of designing their own algorithmic systems or having programmers code the system for them. It’s also common to purchase existing systems from established institutions which have shown a good track record and hold a strong reputation in the financial industry. Of course, though, this does not come cheap.

Does algorithmic trading improve liquidity?

Over the years, there’s been widespread interest in understanding the potential impact of algo trading on market dynamics. Some experts have highlighted the possibility of improved liquidity (liquidity is best described by three measures: size, price and time – basically it is the depth of the market to absorb buy and sell interest), and more efficient price discovery, while others expressed concern it may be a source of increased volatility and reduced liquidity, particularly in times of market stress.

As traders, we know one of the most essential parts of any trading method is liquidity. In terms of high-frequency trading, due to the sheer volume of trades, the effectiveness of the overall markets and narrowing of the bid-ask spread is enhanced, according to some analysts. Challengers, nevertheless, feel whatever liquidity high frequency trading brings to the table is artificial, owing to brief holding periods. The topic remains subjective and will likely remain a point of debate going forward.

Market impact

Trading decisions made by machines are based on algorithms derived from a statistical model. Essentially, these algorithms monitor when the market is considered overbought/oversold, and then act accordingly.

It is of the opinion of some experts when prices fall, algorithms can exacerbate the decline and, therefore, cause markets to crash. The argument is machines fail to apply human common-sense values.

There are a number of cases where the finger has been pointed to machine trading. One in particular is the GBP selloff back in October 7, 2016. In seconds, the currency fell sharply across the board (figure 1.1). The Bank of International Settlements (BIS) found that ‘automatic stop-loss orders’ were a factor contributing to the ‘flash crash’. The BIS report, however, also stated sell orders from human traders were partially responsible for the precipitous drop in price.

(FIGURE 1.1)

In the equity domain, a well-known case was the Knight Capital Group. The company announced in August 2012 it lost $440 million because of a computer glitch, causing a stock market disruption. Shares of Knight Capital finished the day down a whopping 63%.

While there’s evidence automated trading does influence market movement, certain experts state machines are used as a scapegoat for human mistakes.

With debate on-going, and multiple research papers printed over the years, one thing for certain is machine trading is here to stay.

Going forward

With the algorithmic trend expanding, and likely to continue to do so into the future, it is certainly an exciting time for retail traders.

IC Markets MetaTrader 4 and 5 platforms have absolutely no restrictions on trading. We offer some of the best trading conditions in the market for both scalping and high-frequency trading, allowing traders to place orders between the spread as there is no minimum order distance and a freeze level of 0. This means orders, including stop-loss orders, can be placed as close to the market price as you like. Furthermore, traders can hedge positions with IC Markets as there is no first in first out rule (FIFO) – traders also do not pay margin on hedged trades and enjoy the benefits of margin netting.