Besides the fact that you don't take into accunt the spread (the buy / sell prices, which are never equal), the big risk associated with this kind of 'arbitrage' is the fact that the transactions won't occur simultaneously. What happens if during the sequence of this 'arbitrage' prices move enough to offset the potential gain ?
Of course your points are valid. Perhaps I should have put this into context. The matrix given as the main example was assigned to me as a homework problem in an undergraduate optimization class. I decided to solve it using a graph and wanted to share.
Doesn't take into account the fact that FX is "last look" for the provider of the liquidity and so any one of the transactions along the way could be rejected. In fact even if the trade wasn't rejected at the time of transaction, the liquidity provider could come back later and request a particular trade be reversed or manually adjusted as it was unprofitable for the liquidity provider.
Also doesn't take into account that in FX specifically, arbitraging is heavily frowned upon and if you are caught you are likely to have your account closed down.
The reasons for both of the above is that unlike for commodities/equity/futures/etc which are traded on a market, FX is more like a "gentleman's wild west" ie no defined market rules, but a lot of unofficial gentlemans agreements in place about what you can and can't do.
Various exchanges have tried to offer a standardised FX product and they all have the same issue - because a transaction on an exchange doesn't allow "last look" provision and the market makers have to honor the transaction, once an arbitrager infiltrates the market the market makers are basically at the mercy of the exchange (and all the latencies and rules within) and are forced to widen their spreads to the point that it no longer an attractive marketplace for all other market takers.
Having said that, arbitragers still do exist in FX. The most (in)famous one in Japan is a guy "Arb-san" who was making a motza in the countryside in Gifu. He had a great blog where he uploaded photos of his cars and piles of cash and trading rig, and commentary of how he was sticking it to the dumb banks. Unfortunately I can't find this blog anymore, but I did manage to find a profile of someone with the same name online that has some cars that I recognise from the that blog:
Can you explain the rational behind arbitrage being heavily frowned upon? Either arbitrage is effective, and prices are set efficiently without any intervention, or they aren't and the exchange makes collects their fees for the trades.
Essentially the assumption that prices are set efficiently does not hold for FX. Errors in pricing can occur, and when there is an arbitrage opportunity and a market maker loses money then it is assumed (possibly) due to a pricing error which the arbitrager shouldn't have taken advantage of.
A bit of history how the messaging protocol works might make things clearer.
In the old days a trade would take place over the phone as follows:
You: "I'd like to buy USDJPY, $1 million worth please"
Market Maker or broker (MM): "Ok you can get $1 million dollars worth for 123"
At this point there was a gentleman's agreement you would respond within 4 seconds whether you want that price or not (as the market may move)
You: "Mine, I'll take it"
Here you have completed your side of the contract and cannot back out. You just need the MM to confirm that they can still get your USDJPY 1 million 123 (this was traditionally confirmed with a trader sitting nearby who could see all the prices and volumes being published in the market and could give a price at which they could hedge the entire volume and still make a profit. These days traders still perform this role to a small extent but generally the broker would read a price off a screen themselves).
If they can, MM: "It's yours, USDJPY 1 million at 123" and the transaction (contract) is confirmed good. The position is transferred to you, and the trader who provided the original price hedges the risk and gets out of the position, flattening his trading book.
If the market has since moved and the trade is no longer profitable, MM: "I'm sorry the price has changed, you can now buy at 123.1" and you jump back up to the previous
Ok, so all this has been upgraded with technology over the years, specifically messaging is now done via the FIX protocol (same as is used for other asset classes). But the basic flow is still the same:
You: Request price at a quantity
MM: provides price
You: decide whether to take that price
MM: confirms that the price is still good, then sends you confirmation the trade was good (and hedges the trade), or otherwise rejects the trade.
The issue arbitraging causes is that if the prices in the market move and those moves are known to the arbitrageur but not to the market maker then the market maker gets into a position where they accept and confirm the trade, but can't hedge out at the price they thought they could, and so lose money on the trade. A few of these trades and the losses start to build up, and if it keeps happening with a certain client (remember, no anonymous exchanges here) then it's easy to punish that client (show them worse prices, cut them off completely, etc). If an arbitrageur is hiding behind a third party then the market maker might have enough clout to punish the entire third party (in which case it would be in the third party's interest to seek out the arbitrageur and punish them themselves).
Wow. You'd think the market regulators would have noticed such an obvious race condition and moved to fix it. Maybe atomic buy-sell transactions could be the future of finance.
This doesn't take into account available volume. For that you need to solve a min-cost flow algorithm, using for instance the Ford–Fulkerson algorithm.
Low volume is one of the reasons that arbitrage was so difficult with Bitcoin. While an individual could be somewhat profitable, it just couldn't provide adequate returns for a medium or large organization.
Yes. But if your arbitrage pattern is only 3 pips profitable, and you are exchanging millions at once, you might expect that the amount of available orders matching your path may actually matter.
Well, hedge-funds don't play arbitrage games anyways. This is for scalpers and mostly day-traders. Banks don't even really play arbitrage - not as a means to profit at least.
Only benefit to being a hedge-fund is you have lots of money to play with, which you'll need because the profits in arbitrage are very thin. You need likely 20K+, good spreads, fast execution, and an automated strategy to consider it worth your time.