Discussion of article "Triangular arbitrage"

 

New article Triangular arbitrage has been published:

The article deals with the popular trading method - triangular arbitrage. Here we analyze the topic in as much detail as possible, consider the positive and negative aspects of the strategy and develop the ready-made Expert Advisor code.

The "arbitrage" implies some neutrality towards the market. "Triangular" means that the portfolio consists of three instruments.

Let's take the most popular example: the "EUR — GBP — USD" triangle. In terms of currency pairs, it may be described as follows: EURUSD + GBPUSD + EURGBP. The reuiqred neutrality consists in an attempt to buy and sell the same instruments simultaneously while earning profit.


Author: Alexey Oreshkin

 

И ещё одно важное дополнение: отслеживая эту ситуацию, мы можем искать момент для одновременной покупки и продажи. В этом случае профит будет моментальный, но такие моменты — большая редкость.

This is possible only in cases when the real spread on some symbol is negative. But then no triple is needed. It is enough to open and buy this symbol for profit. Therefore, we can safely say that triangular arbitrage with simultaneous buying and selling never happens.


A few questions

  • Is the condition for closing the triangle the opposite arbitrage?
  • Why are we limited to triples?
  • How is the calculation of opening volumes for each symbol of the triple?
ZЫ It turns out, eight years already the topic of ready realisations of arbitrage on MT...

 
fxsaber:

This is possible only in cases when the real spread on some symbol is negative. But then no triple is needed. It is enough to open and buy this symbol for profit. Therefore, we can safely say that triangular arbitrage with simultaneous buying and selling never happens.


I agree, but there is a practice - there were such situations. At the current moment, yes, probably for several years at least I have not encountered them, but it happened. Now there is no opportunity to show it and it is not the point, the past is the past.

  • Why did you limit yourself to three?


Is there any point in watching fours, fives, etc.? ? To be honest, I did not look and did not count, but the more pairs in the design the more costs (spread, slippage, etc.) so it seems that there is no point, but I may be wrong.

  • Triangle closing condition - opposite arbitrage?

yes.

  • How do you calculate opening volumes for each symbol of the triangle?

pair 1 and 2 have the same volume, which is logical. pair 3 has a volume equal to the normalised price of pair 2.
 
Alexey Oreshkin:

pair 1 and 2 have the same volume, which is logical. pair 3 has a volume equal to the normalised price of pair 2.
How's that? Regardless of "equal volume"? Always equal to the price of pair 2? What if it's the yen?)
 
Where'd you get that kind of sag?
 
Тема разобрана максимально подробно, рассмотрены положительные и отрицательные стороны стратегии, разработан готовый код эксперта.

Looks to me like a gallop through Europe and mostly "ready-made code"...
Who wrote the announcement? Interesting

 

It seems like the topic has been brought up many times before and there are tools in the codebase. What is the novelty?

In terms of programming, it's "horrible". For example, something like this should never be published:

if (lcMaxThree>0) {if (lcMaxThree>lcOpenThree); else continue;}

It would be great if when articles are published, not only the MQ editor would do a code review, but also someone else would do a code review.

 
The idea is clear, the article is interesting, but the code .... - "how not to do it."
 
Stanislav Korotky:

It seems like the topic has been brought up many times before and there are tools in the codebase. What is the novelty?

In terms of programming, it's "horrible". For example, something like this should never be published:

It would be great if when articles are published, not only the MQ editor would do a code review, but also someone else would do a code review.

In terms of theory, I find it difficult to find words at all.
I get the impression that "empty stuff" for neophytes is deliberately thrown in.
Or the topic has been "optimised", but it is not clear why?
Now we will have to wait a long time for a normal analysis of equiti-neutral strategies....
 
Mikhail Dovbakh:
How's that? Regardless of "equal volume"? Always equal to the price of a pair of 2? What if it's the yen?)
divide by 100 and that's it. But there is a nuance - We take only currency pairs for work, remove from them everything that contains the ruble and make triangles. How many triangles will there be, the second pair of which contains yen?
Combinator:
Why such a huge drawdown?

Difficult question. If we compare tests from different brokers, the results are different, and if we compare them with real trades, there is nothing in common with the tester.
Mikhail Dovbakh:

As for me, it's a gallop across Europe and mostly based on "ready-made code"...
Who wrote the announcement? Interesting


I wrote it all. Why gallop? So everything was explained in maximum detail, although the theme of triangles is explained in 1 sentence: we look for when ask EURUSD<bidEURGBP*bidGBPUSD and vice versa for exit, that's all. The article on the code - that's how I planned it from the beginning, less water, more business.

Stanislav Korotky:

The topic has already been raised many times and there are tools in the code base. What is the novelty?

In terms of programming - "horror" of some kind. For example, something like this should never be published:

It would be great if when articles are published, not only the MQ editor would do a code review, but also someone else would do a code review.


Not only has the topic been brought up hundreds of times, but it will be brought up just as many times. It is as eternal as questions - how to calculate the margin or the cost of an item, etc. That's why the topic arose - there is a demand, but no article on this topic.
Why don't you like the code? On the contrary, I tried to make it as simple and simple as possible so that everyone could understand it. People here are different, not everyone understands even simple OOP.
Or don't you like empty operators? I always use them in branching - it's logically easier to understand.

Mikhail Dovbakh:

Now it will take a long time to wait for a normal analysis of equitinneutral strategies....

What does it have to do with the analysis of equitinneutral strategies? There is no review of the whole class of neutral strategies in the article. There is only one strategy in the article - the triangle. And by the way, it works very well, if you think with your head where exactly now it is better to use it.

 

From the article: "Most often a position is opened at night and, as a rule, the triangle contains low-liquidity currencies like TRY, NOK, SEK and similar ones".

I wonder if the share of DCs, where EURTRY, GBPTRY (and EURGBP) are traded at the same time, is large. It seems to me that there are only a few. At the same time it follows from the quoted conclusion, that the most frequent positions appearance should be expected from the trio TRYNOK TRYSEK NOKSEK. Does such a triple among the pairs quoted in one brokerage centre occur at all?