Forex Trading Automated Robots and Systems

One of the biggest growth areas in the forex market is the use of automated trading strategies. These techniques have many names, including black box trading, program trading, algorithmic trading, quantitative analysis (quant) and trading robots, but they all add up to more or less the same thing – getting a computer to make trades automatically based on algorithms that analyse price data and enter and exit trades when certain conditions are met.

forex-robot-tradingDespite the obvious temptation to show pictures of actual robots, which I have notably failed to resist (see right), it should be noted that the phrase ‘trading robots’ is just a synonym for algorithmic trading systems, and that mechanical robotics are not yet employed in any way in the financial markets.

A Brief History of Trading Robots

This practice originated in the 1970s, when the first electronic exchanges were introduced, and flourished throughout the 1980s and 1990s in professional trading circles. In fact, program trading (which was the most widely-used term at the time) was blamed for the market crash on Black Monday, and has since been held responsible for several unexpected market events since such as the ‘flash crash’ of 2010 and the recent ‘hack crash’, in which markets briefly went into freefall following a bogus tweet reporting that there had been an explosion at the White House.

DaveCliffIn 2001, IBM sent shockwaves around the trading world with a demonstration of the power of algorithmic trading systems, which showed that two trading algorithms, namely IBM’s MGD algorithm and HP’s ZIP (invented by Dave Cliff, left) could consistently out-perform human traders in a simulated market environment. Although the efficacy of program trading was already widely accepted within the inner circles of major institutional investors, this demonstration alerted the wider world to the technological changes that were happening in the trading world.

Naturally, retail traders were keen to get in on the act, and software developers responded by creating platforms such as Metatrader and Tradestation that enabled independent investors to utilize these techniques. Today, black-box trading forms a major part of the trading landscape in all capital markets, including forex. Over half of the entire trading volume on the global forex market can be attributed to the activities of trading robots, and the proportion is even greater in the equities markets.

High Frequency Trading (HFT)

The vast majority of algorithmic trading strategies fall into the category of High Frequency Trading (HFT) . This involves programming a trading terminal to make lots of small profits by trading the short-term price movements of financial instruments, which tend to be much more predictable across very short time frames. Because these can react to price movements a lot quicker than human traders, they can take advantage of short-term profit opportunities that might otherwise be missed, and make huge numbers of trades over the course of the trading day.

Scalping

scalping_0Between market-moving events, instruments such as currency pairs have a tendency to ‘range trade’, which means that they will go up and down in price within a certain range before this pattern is broken by an unexpected price swing known as a ‘breakout. Scalping strategies are designed to recognize when instruments are range trading and buy when prices are at the bottom of the range, and sell when they are near the top. Although this is a gross oversimplification of the process involved, and there are literally thousands of ways in which this type of strategy could be approached, it gives you a broad idea of how these strategies tend to operate.

Breaking up Large Trades

If a trader working for a large institutional investor were to attempt to buy or sell a high volume of a particular currency pair, the market would immediately notice, which would drive up the price to a point where the trade might no longer be possible. By using a trading robot to break up the trade into smaller, less noticeable chunks, this phenomenon can be minimized. This was one of the first uses that trading robots were put to when they emerged in the 1970s and 1980s, and they are still used for this purpose today.

Predatory Trading

Trading robots can also be used to recognize when large trades are being placed – even if they are being broken up by an automated trading system – and capitalize on the inevitable price swing that follows. This type of strategy is known as ‘predatory trading’.

Arbitrage

Another early use of program trading was to exploit arbitrage opportunities. These occur when two identical assets are trading at different prices on different markets. The idea behind this is to place two simultaneous trades to make an instant, guaranteed profit. In the forex market, this might occur when two liquidity providers are offering different prices for the same currency pair. These occurrences tend to be very short-lived – too short for a human trader to spot and capitalize on, even if they were capable of making simultaneous trades – but not too short for a trading robot with a very fast and reliable connection to an exchange.

Other Strategies

These are just three of the myriad uses that automated trading robots can be put to on the forex market, or indeed any financial market. As well as being used to make market moves that would be impossible for humans to execute, they can also be programmed to follow the type of longer-term swing trading and trend following strategies that are often executed by human traders. While there is still a place for human intuition and intelligence in the forex market, it is increasingly the case that this is being directed towards the programming and calibration of black box trading strategies, and less towards the actual execution of trades.

How Can Independent Investors Profit from Trading Robots?

mirrortraderFor independent investors to leverage this technology for their own trading activities, there are essentially three routes that can be taken. The first is to use someone else’s strategy without changing it in any way. This may sound dangerous – and of course it can be – but it can work in some instances. Mirror trading platforms, such as Tradency or FXCM’s Mirror Trader (right), allow traders to view the profit/loss ratios of certain algorithmic trading strategies, and piggy-back the trades in much the same way as they might with a human trader on a social trading network. Alternatively, they could download a script for Metatrader or a similar platform, back-test it on historical data, and put it into practice if it proves to be a successful strategy.

The second is to take an existing script and modify it to suit your own strategy. This requires a certain degree of expertise, but it isn’t that difficult if you have a broad understanding of the programming language you are using. Some languages, such as EasyLanguage (Tradestation) or MQL5 (MetaTrader 5) are quite straightforward, and can be understood quite easily even if you don’t have a degree in computer science. Other languages, such as C++ and Visual Basic, require a fair bit more expertise. However, there is greater scope for complexity with these, and there is a much bigger library of pre-written scripts to choose from. The key to success with this approach is to thoroughly back-test the strategy after each adjustment to see whether it has improved matters or not.

The third option is to write your own scripts from scratch. Again, this is easier with some languages than others, but on the whole this requires a much higher level of computing expertise to pull off. The main advantage of this approach is that you fully understand how the algorithm works, so if anything goes wrong with it or you wish to tweak it, you can do so without a lengthy process of trial and error. Ultimately, there is room for error with any effort to automate trading activities – even in the upper echelons of the inter-bank market – and it is therefore imperative that you use stop loss orders to cover your back should anything unexpected occur.