Algorithmic Trading

Algorithmic trading is the process of using a computer programme that follows instructions based on mathematical formulae, in order to make automated trading decisions.

By following the algorithm’s instructions, the computer makes the decisions for the trader as to whether to buy or sell various financial instruments, often by monitoring price charts. It will exit the position upon meeting the algorithm’s specified requirements.  

Algorithmic trading is an effective way of minimising risk when executing an order, as once the trader has chosen the model’s predefined principles, such as the exit price and position size, the computer makes the decisions based on this. This then lessens the likelihood of the trader making decisions based on emotion, rather than logic.

It’s predominantly used by hedge funds and investment banks, as algorithmic trading is most suitable for large orders, whether that be size or volume. Over 75% of share trades on U.S. stock exchanges originated from automated trading systems. 

Algorithmic trading strategies

There are numerous algorithmic trading strategies which can be adopted by traders in order to save themselves both time and money.

High-frequency trading

This trading strategy involves a high volume of trades at a rapid speed in order to profit from small movements in price, typically trades will be open for less than a minute, and sometimes just milliseconds. The aim of high-frequency trading is to make small profits, so there are often very high volumes of these trades occurring in one day. An example of high-frequency trading is scalping.

Arbitrage trading

Arbitrage strategies involve using an algorithm to monitor the market to find price differentials. This could be when two assets with identical cash flows aren’t trading at the same price, or when the same asset isn’t trading at the same price on all markets.

This could be useful if, for example, a stock is valued at one price on the New York Stock Exchange, but for less on the London Stock Exchange. This stock could be bought at the lower price on the NYSE, then sold on the LSE for a profit.

As these price differentials aren’t very common, it’s useful to have an algorithm to locate them when they do occur. As these price differentials are often small, a large position is generally required to make a significant profit.

Trend following

Algorithms can be used to monitor the market and various price charts, identifying patterns which isolate the best time to execute a trade. The algorithm can base these patterns on trends that occur in both historical and current data, but trends can also be based on technical indicators, oscillators, price movements, moving averages and mean reversion.

Mean reversion

This strategy makes the assumption that even if the price of a stock deviates, due to common factors like market news breaking, over time it will move back to the average price. The trading range of the particular asset needs to be identified, then the computer can detect the average price using analytics. Typically, the average asset price is calculated using historical data.

VWAP trading

The VWAP, volume-weighted average price, is a benchmark that traders can use to execute an order as close to the average intraday price as possible. This intraday calculation looks to calculate an asset’s typical price, multiplying it by volume for a selected period (e.g. 1 minute). You then keep a running total of cumulative TPV, and cumulative volume (just adding volumes for each 1-minute period – or for whichever period the trader has selected), and then divide cumulative TPV by cumulative volume.

This won’t be useful for determining trends as it is purely a historical average for that day. It can, however, be used to gauge whether or not a trader has overpaid for an asset earlier that trading day. 

TWAP trading

The TWAP, time-weighted average price, trading strategy aims to execute the order as close to the average price of the security as possible, over a specific time period. This is often over the course of one day, and a large order will be split into multiple small trades of equal volume across the trading day. The purpose of this is to minimise the market impact by executing a smaller volume of orders, as opposed to one large trade which could impact the price.

Forex algorithmic trading

When trading the forex market, the efficiency of algorithmic trading means fewer hours spent monitoring the markets, as well as lower costs to carry out the trades. Algorithmic trading can also be useful when hedging trades, in particular, spot contracts, where foreign currencies are bought or sold for instant delivery.

Triangular arbitrage is one common forex algorithmic strategy. It involves trading different currencies in the forex market with exchange rate discrepancies, for an overall profit. This strategy involves three stages:

  • Firstly, exchanging the initial currency (a) for a second (b)
  • Then exchanging the second currency (b) for the third (c)
  • And finally, exchanging the third currency (c) for the first (a)

The strategy is conducted exclusively via a computer, partially due to the rare occurrence of these opportunities, but also due to the speed at which the trades need to be carried out. A large amount of capital would typically be traded due to the fractional differences between currency prices. 

Benefits of algorithmic trading

  • It avoids the likelihood of human error, caused by factors like emotion or fatigue.
  • Backtesting can be implemented to test a trader’s algorithmic strategy against historical data, in order to improve its accuracy, overall helping to minimise the potential risk.
  • Trades are executed more effectively as the computer follows instructions for the optimal buying or selling conditions, as well as timing trades to avoid price changes or slippage.
  • It’s more efficient as computers can action trades over fractions of a second, something that humans simply cannot do, and can mean less time is spent monitoring markets.
  • Algorithmic trading can limit or reduce transaction costs due to the lack of human intervention.  
  • Complex mathematical calculations which would be difficult for traders to do themselves are done within seconds on a computer.
  • It allows traders to use multiple strategies at one time, as well as having a consistent trading plan.

Drawbacks of algorithmic trading

  • There is a risk that any fault with the algorithm, or internet connectivity problems, could lead to orders not being placed, duplicate orders being actioned, or even erroneous positions being taken.
  • It’s difficult to constantly monitor the trading system as it can, should a fault or issue occur, be too fast-paced for human intervention.
  • It can lead to spikes in volatility as these algorithms react to market conditions, potentially widening bid-ask spreads, or not placing certain trades which could ultimately harm liquidity.
  • High-frequency trading can amplify systemic risk by transmitting shocks across markets when combined with other factors. There is an argument that algorithmic, high-frequency trading played a part in the Flash Crash in 2010, where the Dow Jones Industrial Average plummeted more than 1,000 points in 10 minutes.
  • Faulty algorithms can cause ripple effects across other markets, resulting in amplified losses.

Summary

Overall, algorithmic trading is a useful tool for professional traders to increase the volume of trades they’re making, while mitigating the risk of human emotion or error negatively affecting trades. It should, however, not be used as a substitute for careful manual trading, nor should any associated risks be underestimated. 

Interested in algorithmic trading? Find out more about our MetaTrader 4 platform.

Disclaimer
CMC Markets is an execution-only service provider. The material (whether or not it states any opinions) is for general information purposes only, and does not take into account your personal circumstances or objectives. Nothing in this material is (or should be considered to be) financial, investment or other advice on which reliance should be placed. No opinion given in the material constitutes a recommendation by CMC Markets or the author that any particular investment, security, transaction or investment strategy is suitable for any specific person.

CMC Markets does not endorse or offer opinion on the trading strategies used by the author. Their trading strategies do not guarantee any return and CMC Markets shall not be held responsible for any loss that you may incur, either directly or indirectly, arising from any investment based on any information contained herein.

Test drive our trading platform with a practice account
CMC Markets

Experience our powerful online platform with pattern recognition scanner, price alerts and module linking.

  • Fill in our short form and start trading
  • Explore our intuitive trading platform
  • Trade the markets risk-free

Live account

Access our full range of markets, trading tools and features.

Open a live account

Demo account

Try spread betting with virtual funds in a risk-free environment.

Open a demo account

TOP