Secrets of Forex Arbitrage - That Very Strategy

image thumbHello friends!

Surely many of you have heard stories about arbitrage on Forex, how traders earn hundreds and thousands of percent without risk, after which the broker does not allow them to withdraw their profits. So what kind of animal is this and is it really possible to make money from it?

Today we will understand what classic arbitrage is on Forex, study its varieties and find out on which instruments this approach is still profitable. At the end, you will find a ready-made automated tool for searching and trading arbitrage situations, so you can independently test the described theory in practice.

Types of arbitrage

Classic arbitrage is the exploitation of pricing inefficiencies. This type of arbitrage is quite rightly called spatial, because its existence is a consequence of the non-zero distance between sources of quotes.

This formulation is equally relevant for grandmothers in the market, as well as for the stock exchange and high-frequency trading. No matter how fast communication channels are, we are still not able to transmit information faster than the speed of light. This means that a non-zero delay will always exist between two distant sites; only the tools for trading such arbitrage will change.

Two-legged arbitrage. This usually means arbitrage between two exchanges. The price difference between the two venues allows you to buy the same instrument cheaper in one place and sell it at a higher price in the other.

A classic example is buying and selling EURUSD with two different dealers. In reality, we are buying or selling the EURUSD spread.

In theory, the equity of such a position should be zero. But the real market is always moving, and given the overhead costs (spread + commission) and different sources of quotes, the equity of such a position will fluctuate some distance below zero (the breakeven level). In other words, if you try to buy and sell EURUSD right now, you will most likely see an immediate loss equal to the double spread on your account.

Arbitrage is a situation when equity moves into a profitable zone. That is, we can say that we made money without risk by simultaneously buying and selling the same instrument.

image thumbThe formation of such arbitrage is explained by the true decentralization of the exchange. When there is no single place to aggregate quotes, a situation can always arise where the buyer offers a higher price than the seller wants.

It is important to note that when trading such arbitrage, the direction of movement of rates does not matter to us. By buying the first and selling another instrument, we make money by changing their spread (difference). That is, in fact, the instrument may become more expensive on both exchanges, but you will still remain in the black if the price difference has decreased.

image thumbExiting positions can be done either upon reaching a certain profit or by reversing the positions when the opposite condition appears. That is, when reverse arbitrage forms, buyers and sellers switch places.

Spatial arbitrage became widespread at the dawn of the formation of Forex. The main reason for large quote discrepancies was the weak centralization of the market itself, the emergence of a large number of small market makers, and the lack of high-quality aggregation.

Most often, the formation of such arbitrage was due to a significant lag in quotes from one of the dealers. Some traders are still trying to trade using this strategy with newly formed firms, whose quotation system may still contain errors, but obviously the golden age of such a strategy has already passed.

Now, when most of the processes are standardized, and liquidity providers are combined into a single stream of quotes through large aggregators, it is almost impossible for an ordinary trader to find and trade such a discrepancy.

One-legged arbitrage. In fact, opening positions on different exchanges at the same time is not a mandatory condition. If you have the ability to identify the leading market, then to trade this arbitrage it is enough to open a trade on only one venue.

For example, we determine that broker A's quotes are lagging a few seconds behind broker B's. At the same time, broker B's price is currently 10 points higher. In that case, we enter a buy trade through broker A with a clear idea of where the price is about to go. Technically this is much easier, but such arbitrage situations arise much less often. Another drawback is the lack of market neutrality, which adds extra risks and puts this method outside the boundaries of classic arbitrage.

Synthetic arbitrage. Suppose you want to trade the spread of the EURUSD pair. In that case, you can buy the “real” EURUSD and hedge it synthetically by selling EURGBP and GBPUSD. If you remove the instrument names, you would hardly be able to distinguish the synthetic EURUSD from its real counterpart. However, the differences in quotes may be enough to create an arbitrage opportunity, and trading it is then just a matter of technique.

This type of arbitrage is also called triangular. In this example, we have 100,000 euros on hand. With these funds we buy pounds, then use the pounds to buy dollars, and then use the dollars to buy euros again. If there is even a small discrepancy in the rates, we have a chance to earn a guaranteed profit.

image thumbPlease note that on liquid instruments, the profit from such arbitrage operations does not cover overhead costs in the form of spreads and commissions. In a properly functioning system, classic arbitrage is extremely difficult to trade, since almost all risk-free profit is neutralized by the market itself before it ever reaches you. For an ordinary trader without direct exchange access, substantial capital, and specialized knowledge, there is simply nothing to do here.

Long-term arbitrage. However, if small returns suit you, there is a perfectly workable way to trade arbitrage over a long period of time. We are, of course, talking about the discrepancy between a futures price and its underlying instrument. In general, the strategy is similar to two-legged arbitrage: when the spread between two instruments widens, we buy that spread and wait for expiration.

For classical arbitrage, the quality of execution, as well as the availability of low commissions and spreads, are critical. All this must be taken into account before entering the market as potential risks.

In the case of long-term arbitrage, the quality of execution is not so important, provided that limit orders are used. But you need to take into account that an arbitrage situation can arise within one market tick. Therefore, without automation there's no way around it. The profitability of such trading is unlikely to impress anyone, although there is a good chance of earning more than the bank interest rate.

Key Benefits

To determine the presence of arbitrage, you do not need to study the history of quotes. The current flow of quotes is enough to see inefficiency and have time to trade it. Since arbitrage theory exploits market inefficiencies, the nature of quotes is also not important to us.

In general, trading classic arbitrage requires neither technical nor fundamental analysis. Although in unstable markets, for example during the release of news, there are obviously more arbitrage situations.

From a trader’s point of view, this is an almost ideal trading system:

  • You do not need to worry about the state of open positions, news and price gaps;
  • After a successful entry, profit is almost guaranteed;
  • No complex analysis of historical quotes is required;
  • The risk of failure is minimal and most often results from a technical glitch or poor execution.

Main problems

The main problem is that in a highly liquid market (for example, FOREX), such inefficiencies have either already been traded by someone else, or are almost completely eliminated by the presence of a high-speed communication channel.

On the other hand, low-liquidity instruments impose their own limitations. These include partial or simply slow execution, slippage, and, in general, everything related to the process of order execution. In particular, this becomes a problem when an arbitrage opportunity exists only for a very short period of time.

As a result, it turns out that arbitrage, which is the most accessible to an ordinary trader, cannot provide high returns, and the most delicious market inefficiencies are eaten up by large players.

The Dawn of Cryptocurrency

There is no clear leader in the cryptocurrency market, and the main trading volumes are spread across dozens of different exchanges. Moreover, if most Bitcoin turnover is concentrated on one exchange, peak turnover in Ethereum, for example, may be on a completely different one. In general, we can say that the cryptocurrency market is now much more decentralized than Forex.

image thumbThe green zone in the picture shows a live arbitrage opportunity between cryptocurrency exchanges using BTCUSD as an example. This means that in the cryptocurrency market there is real arbitrage between exchanges: you can buy the currency cheaper in one place and sell it for more in another. On liquid Forex instruments, such a situation is very rare, and the reason for this is the market’s drive toward centralization.

image thumbNaturally, in reality, everything is a little more complicated, and trading such arbitrage requires taking into account transaction costs. But even more interesting is the arbitrage between cryptocurrencies and traditional currency instruments. Some brokers already trade cryptocurrencies on a par with traditional FX instruments. This allows you to find arbitrage situations without going beyond one site.

In general, cryptocurrencies are suitable for various types of strategies that have become obsolete on popular currency pairs. Arbitrage was and remains the most attractive strategy in terms of the risk-to-profit ratio. The daily trading turnover of cryptocurrencies is estimated in billions. This is a large, rapidly developing market, and if you are looking for arbitrage within Forex-related markets, this is where to look.

Installing the robot

The Trade-Arbitrage robot-script completely takes over the task of searching for arbitrage situations within a single broker (platform). First, the robot takes all the currencies specified in the Currencies parameter and tries to build real currency pairs from them.

The robot is written in a somewhat non-standard way and works as a looped script, meaning it stays on the chart and does not remove itself automatically. Normally, scripts are removed from the chart after performing some function. In this case, you can remove the script from the chart only manually through the context menu.

image thumbTherefore, the “Trade-Arbitrage.mq4” robot file must be moved not to MQL4 Experts, but to MQL4 Scripts. To do this, open File -> Open Data Folder in the terminal.

image thumbNext, select MQL4, Scripts and move the robot files here. After this, restart the terminal.

image thumbTo run, simply drag the script onto the chart.

image thumbAlso, don't forget to enable automated trading.

Description of the robot

For example, suppose you specify EUR, GBP, and USD as the currencies for arbitrage. From this set, you can assemble 3 real pairs: EURUSD, GBPUSD, and EURGBP. The arbitrage formula may then look like this: EURUSD && EURGBP * GBPUSD. That is, the “real” and “artificial” (synthetic) EURUSD are compared.

Working with the robot requires observing a few nuances. First, given the specifics of the MT4 tester, it cannot be tested in the tester. Also, before starting work, it is necessary to gather real arbitrage statistics. At the same time, you need to collect statistics on the exact account you are going to trade, since quotes from different brokers, and even from different account types, can differ significantly.

Data collection. Trading absolutely all arbitrage situations, of which there can be hundreds and thousands, is an extremely ineffective exercise. Firstly, a large number of transactions will be difficult to control. Secondly, several transactions will be opened for the same instrument, which will lead to worse execution and additional slippage. In our case, this is equivalent to losses.

That is why the initial task for us is to collect statistics. Then, by analyzing the collected data, we will be able to identify the most attractive arbitrage situations and trade only them.

First you need to decide which broker you will trade. Of course, you can optimize the process and collect statistics from several brokers at once. The main thing is to use only a real account for this task, otherwise the collected demo account statistics may not correspond to reality.

So, before launching the robot, pay attention to the Currencies parameter, where you need to specify a list of currencies, not pairs, for trading. You also need to set the correct value in the MinPips field, that is, the minimum discrepancy size for classifying an arbitrage opportunity. In theory, any positive value, starting from 0.1 = 1 pip, can be considered profit. However, arbitrage often appears at price spikes, and its lifetime may be as short as 1 tick. Therefore, taking possible slippage into account, it is recommended to set the value no lower than 3.0 points. Naturally, do not forget to enable monitoring: Monitoring = true.

All arbitrage situations found are written to the text file “Arbitrage”, located in the MQL4 - Files directory. It records the time the arbitrage appeared, its formula, the exact bid and ask prices, and the size of their discrepancy itself, that is, the arbitrage value marked in red.

image thumbAnalysis of the collected data. Depending on the value of MinPips, collecting high-quality statistics may take quite a long time: the higher the value, the longer it usually takes. In general, a month should be enough, but you can also limit yourself to a shorter period.

Along with the “Arbitrage” file, the robot also fills the “Arbitrage-Statistic” file, which contains all the arbitrage formulas found, that is, arbitrage setups, sorted by frequency of occurrence.

The easiest way to select setups is to take the top values ​​from the list. But the best solution is to analyze each unique setup manually. It is important that the arbitrage situations found are not the result of news releases or any other non-market peaks, since in the real market all the profits of such transactions will be eaten up by slippages.

Start of trading. After analyzing the data and selecting the best setups, create a new text file in the MQL4 - Files directory called “Trade-Arbitrage” and write the best formulas there, each on a new line. Trading will then be carried out according to these formulas. For the robot to pick up the newly created file, simply restart it.

The exact position size needed to create the hedge is calculated automatically based on the values specified in the input parameters. Also, when attaching the expert to a live account, do not forget to disable monitoring (Monitoring = false).

After opening positions, the robot will remain in a multi-currency hedge at all times. The condition for opening a position is a divergence between two synthetics of more than MinPips points. When the opposite condition is met, the positions are reversed, locking in the accumulated profit.

Description of settings

  • Currencies – list of currencies for generating synthetic pairs. The more currencies, the more potential arbitrage opportunities, but try not to list non-tradable instruments here;
  • MinPips – min. difference (4 digits) between bid and ask prices for arbitrage trading;
  • SlipPage – slippage limits when opening an order;
  • Lock – prohibition on creating a lock;
  • Lots – position volume for the generated synthetic;
  • MaxLot – maximum position volume for a real instrument;
  • MinLot – minimum volume for a real instrument;
  • Monitoring – enables or disables recording log files for detected arbitrage. Keep in mind that during live trading it is better to disable this function, since reading and writing a large number of files to disk may introduce additional delay;
  • TimeToWrite – frequency of writing to a file (in minutes).

Conclusion

The topic of classic arbitrage has deep historical roots and remains relevant even in current realities. At the moment, the largest number of such inefficiencies appears in the cryptocurrency market. If you are going to work with arbitrage, first of all pay attention to the Forex market and crypto exchanges. Arbitrage between new and old forms of money, with the proper degree of involvement, can become a good market-neutral strategy.

Download the Trade-Arbitrage expert advisor

image thumb Best regards, Alexey Vergunov TradeLikeaPro.ru

InstaForex

Today we will figure out what classic Forex arbitrage is, study its varieties, and determine on which instruments this approach is still profitable.