Home / Forex /

Triangular Arbitrage

 

Triangular arbitrage is a bit of forex jargon that sounds cool. It represents the idea of buying something and selling it near instantaneously at a profit. Instant, free money appeals to nearly everyone. The theory is sound, but it’s extremely difficult to pull off in real life.

If you are unfamiliar with synthetic currency pairs, I highly recommend that you read my post on the subject from December 2011. None of this explanation will make sense without understanding that the synthetic pair concept.

Triangular Arbitrage

Triangular arbitrage opportunities occur when a currency pair shows a price, while the same synthetic currency pair shows another price. If the asking price for the EURUSD is 1.2820 and the bid price of the synthetic currency pair is 1.2823, a triangular arbitrage opportunity exists.

The synthetic currency pair can involve any medium of exchange. Yen pairs are extremely liquid, so perhaps a may use USDJPY and EURJPY to build the synthetic EURUSD.

The great thing about the triangular arbitrage trade is that there are multiple opportunities using the same instrument. Although the named pair does not change, which in this case is EURUSD, a trader could use any of the other 6 major currencies to shop for the best price on the trade. I listed the examples below using the assumption that we’re buying EURUSD.

Arbitrage currencyAction for arbitraging long EURUSD
JPYSell EURJPY, Buy USDJPY
GBPSell EURGBP, Sell GBPUSD
AUDSell EURAUD, Sell AUDUSD
NZDSell EURNZD, Sell NZDUSD
CADSell EURCAD, Buy USDCAD
CHFSell EURCHF, Buy USDCHF

Example

Assume that the trader spots an arbitrage opportunity in EURUSD and finds that yen crosses offer the best opportunity. The mechanical implementation of the strategy would follow this approximate process:

  1. Buy 100,000 EURUSD at market
  2. Confirm execution of the EURUSD order at or near the requested price.
    • If the order receives poor execution that is worse than the synthetic currency pair or will make the trade too expensive, then close the trade and look for a new opportunity. The cost is the spread and whatever commission was paid.
    • If the order receives reasonable execution, continue.
  3. Choose half of the synthetic leg to fulfill. The order does not matter. If it the EURJPY is the first order to use, then the task is very easy. The EURUSD and EURJPY pairs both use the same base currency. The lot sizes on the trades should be identical. Because we bought the EURUSD in the named currency pair, we will need to sell the EURJPY to hedge out the euro component of the trade. The EURJPY sell for 100,000 should be executed at market.
  4. The remaining leg of the trade is the USDJPY. Buying EURUSD put us short dollars. In order to hedge the dollars, we need to buy dollars. Thus, we must buy USDJPY. We cannot, however, blindly purchase $100,000. Although we bought 100,000, that trade put us short $128,200. The unit size should be a purchase of $128,000 against the yen. The extra $200 is rounded to off due to position sizing restrictions in the forex market. We are forced to accpept the risk on the $200 position
  5. The entire trade has now executed. The exit will occur when the opportunity reverses itself so that the bid is now below the ask, as you would expect in a market. Exit all open trades at market.

Correcting Lot Sizes

It’s hard to grasp the concept of triangular arbitrage from a single example. At the risk of boring my readers, I present a second example below for the sake of thoroughness. The need to correct for lot sizes is what I expect will trip up most traders. Skip this section if you feel like I’m beating a dead horse.

Let’s use the NZDJPY as an off the wall example. The pairs involved are as follows:
NZDJPY, trading at 66.32
NZDUSD, trading at 0.8281
USDJPY, trading at 80.07

The named NZDJPY price is 66.32. The synthetic price, however, is 66.305. An arbitrage opportunity of 1.5 pips exists. This is calculated by:

1 NZD/USD 0.8281 * 1 USD/JPY 80.07 = 1 NZD/66.305 JPY
66.32 – 66.305 = 1.5 pips

The named currency shows a bid price above the ask. This means that we need to sell the named currency and buy the synthetic currency. Assuming that we deal in standard lots on the base currency, the trader executes an order to sell NZD $100,000 at market.

The first task is to buy back the kiwi dollars using NZDUSD. No conversion among units is necessary. Both the named and synthetic currencies share the same base currency, NZD. The last and final step is to sell the JPY that was purchased in the NZDJPY short transaction. Selling JPY using USDJPY involves buying USDJPY. Remember the warning about unit sizes.

We need to purchase NZD $100,000 worth of yen in US dollars. As you can see, it’s complicated. Converting the dollar base currency into NZD is:

NZD $100,000 * USD $0.8281/NZD $1 = $82,810

We need to buy $82,810 worth of USDJPY. The forex market restricts transactions to 1,000 unit increments. The least risk involves purchasing $83,000 USDJPY and accepting $190 in exposure.

Why triangular arbitrage is so common

Almost all retail forex brokers mark up their spreads in lieu of charging direct commissions. The purpose is to camouflage the true cost of trading. Like most gimmicks, however, it creates an unintended consequence. The artificial mark ups in the spread are the reason for many of the triangular arbitrage opportunities.

The broker must decide which side of the spread receives the markup. Occasionally, the entire markup is subtracted from the bid or added to the ask. More often than not, brokers hedge their bets by adding portions of the markup on both sides of the bid and ask.

The markups are invariably higher on the crosses. The extreme differences between the bid and ask make trading those crosses directly undesirable. It’s something of a paradox, but that undesirable trait becomes a positive one in the context of triangular arbitrage. The bid is lower than its real rate. The ask is higher than its real rate. When the majors trade on reasonable spreads, it’s common for the markup to create near permanent arbitrage opportunities on the crosses.

The trade only achieves a realize-able profit whenever the markup begins skewing in the opposite direction. If a broker applies most of the markup on the ask, the triangular arbitrage would not profit until the broker shifted the markup mostly or entirely to the bid. The flip flops typically take several hours to occur, which limits the number of daily opportunities.

Brokerages almost always view arbitrage traders as toxic order flow. Arbitrage only occurs when someone is asleep at the wheel; the profits ultimately come out of somebody’s pocket. Even in the instance where brokerages offer an ECN or pass through execution, they care far more about their relationships with the banks than any individual customer. Brokerages are essentially wholesalers for the trading arms of banks. If the banks cut them off, then they have nothing to sell. Triangular arbitrage in this situation earns its money from the banks. If a trader makes too much money too fast, the trader will get the axe at the bank’s request.

Traders on the FXCM dealing desk or other brokers face no chance of an ongoing relationship. The profits come directly from the broker’s pockets. If they’ve been in business for very long, they will know what you’re up to relatively quickly.

Splitting trades across multiple brokers is the best opportunity for the strategy to succeed. Breaking up the orders creates more opportunities. More importantly, no single entity knows your combined order flow. It makes it much more difficult for the sore loser to track down who is bleeding him dry.

Forex Platforms

MetaTrader

Running triangular arbitrage expert advisors in MetaTrader involves a clunky workaround. The same risks that apply to broker arbitrage also apply to triangular arbitrage. The trade context is busy problem stands out as a primary concern. It might realistically take 3-5 seconds to execute all three orders if done within a single expert advisor. Many bad things can happen in such a large time window. Also, I would expect the broker to catch on quickly to this scheme and shut it down.

The only practical solution is to use three separate instances of MetaTrader running a shared memory DLL. One instance would be dedicated to the “bad” broker marking up its spreads. The other two instances would execute each single side of the synthetic trade with a “good” broker. Executions would obtain the ability to enter simultaneously without queuing. The disadvantage is that the EA would only update on incoming ticks. If a long interval occurs between ticks, it delays one corner of the triangle from entering.

NinjaTrader

NinjaTrader can ideally execute the orders if done within a single brokerage. Again, this makes your tracks pitifully simple to trace. You could build a great strategy with sound engineering that only works in the real world for a few days. You’re then stuck going broker shopping once again.

The best way to trade undetected is to use NinjaTrader with a multi-broker license. Apply one strategy on the bad broker, then apply the second strategy on the good broker. The strategies would also need a way to communicate, perhaps through a shared memory resources or an intranet client-server.

I am interested in building well engineered solutions as products for sale on this web site. If trading something like this interests you, please email me and mention the platform that you prefer. I’m keeping a list to help us prioritize what traders want.

 
Triangular Arbitrage

Share this Post

 

Tags

, , , , , ,

Related Posts

About the author

Shaun is a passionate and proud nerd on a wide variety of topics, most of which have absolutely nothing to do with each other. He loves math and systems, which makes him a natural fit for designing trading systems. The most random fact about him is that he speaks fluent Arabic.Shaun's hobbies are running, church and spending as much time as possible with his wife and two young boys.

 
 

9 Comments

  1. Jeremy Scott says:

    I stumbled into triangular arbitrage before I knew what it was called. I wrote an EA for MT4 scanning for discrepancies in all possible triangles among 8 currencies. Earned over 1000 USD with an offshore broker FXGlory using 3000:1 leverage with this system, then all of a sudden it stopped working! I had dozens of successful arbitrage triangles but the day I deposited more money and upped the lots to over 1 lot per symbol they got all their profit back :(

    I notice you are interested in developing a cross-platform system. I would love for you to develop one. I can’t offer much money at this time- but if you want to see my code and expand or show me how to make it work on 3 separate platforms each trading 1 symbol in a triangle that would be awesome if you have time… let me know, thank you!

    • Hey Jeremy,

      Thanks for sharing your experience. The problem with doing it all at one broker is that they know for certain that they are bleeding. Arbitrage only works if the person that you’re arbitraging isn’t aware of it. I don’t have any immediate plans for a commercial product. It needs to be highly customized in order to work well, which of course means that it’s not retail trader friendly.

  2. Henry says:

    Thank you for this article Shaun. Just curious how many opportunities will arise through TriArb in a day on average? And how large are the price discrepancies on average (pips wise)? I’ve always been interested in Triangular arbitrage but I always assumed that the profits would either be eaten away by the spread/commissions or too small to be of significance. Thanks!

    • Hey Henry,

      It really depends on the broker. I’ve seen some brokers with more or less permanent arbs. Depending on the cross spreads that they show, some of them are typically several pips. The biggest problem is getting trades to execute quickly enough in MetaTrader to take advantage of the worst offenders.

      • Henry says:

        Thanks for your reply Shaun. I actually use NinjaTrader (multibroker license) for my Forex trades (currently with Interactive Brokers). Would this help with the latency/speed issue? If so, would you be willing to help program something for me?

        Henry

        • That makes it far more likely to succeed. NinjaTrader is light years faster, giving you a better edge. Please email me (address is on the top right of the screen) and we’ll dive into the details.

  3. Greg says:

    Shaun,

    Did you ever get a strategy going for NT with arbitrage?

    • No. The problem with those strategies is that they have limited shelf lives. The broker shuts them down as soon as they catch wind of what’s happening. It’s a great concept, but I prefer to trade a strategy that’ll work anywhere.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>