Pair trading and multicurrency arbitrage. The showdown. - page 251

 
Renat Akhtyamov #:

I apologise for the decent amount of music.

I have an occasional holiday, a wedding ;)


Renat! Congratulations!
 
Renat Akhtyamov #:

I apologise for the decent amount of music.

I have an occasional holiday, a wedding ;)


Congratulations, dear Renat! Our much respected trading guru!
 
Renat Akhtyamov #:

I apologise for the decent amount of music.

I have an occasional holiday, a wedding ;)


 

this is also about pictures, I'll just leave it here:

converting price points to degrees:

degrees_xxxyyyy = MathArctan(MathSqrt(xxxusd/yyyyusd))*180/M_PI

degrees_xxxusd = MathArctan(MathSqrt(xxxusd))*180/M_PI

is the translation to the spherical coordinate system (7-dimensional hypersphere :-) :-) :-) )

may be useful for those who use NN,DL and where it is important to have consistent normalisation without involving averages and outliers.

 

I have recently become interested in the topic of pair trading. I had some questions. And here is such a topic. Where else to ask but here.

So, the other day I watched a webinar about the basics of pair trading. There it was suggested to determine the moment of opening deals on a pair of traded instruments to build a chart of the third, synthetic, instrument to further search for extrema on it. And two variants were offered for building this chart:

Everything is clear with the second variant, there are no questions about it.

As for the first variant, the question immediately arises: where does the value of the coefficient b come from? How to calculate its optimal value?

I watched the webinar in the recording and there was no opportunity to ask the presenter a question. He did not reveal this topic himself, but simply suggested using ready-made coefficient values for different combinations of traded instruments:

Can you please help me to understand how the b coefficient values (shown in the second screenshot in brackets) are calculated for each pair of instruments?

 
Janis Ozols #:
disclosed

thanks for the pictures - I'll have a look at the data - can I get a link - can I go to my personal account for the webinar:

here is the data right here:

https://www.mql5.com/ru/forum/128859/page76#comment_3322803  - you can go back a few pages.

https://www.mql5.com/ru/forum/122468/page253 - back a few pages here

there is also data here: https://www.mql5.com/ru/code/1244

https://www.mql5.com/ru/code/10096 here there are also coefficients how to search

https://www.mql5.com/ru/forum/130430/page15#content408359 here too

https://www.mql5.com/ru/forum/114579/page18  there is also data here - browse through it

by type

kVol1=SymbolInfoDouble(Symbol1_Name,SYMBOL_TRADE_TICK_VALUE)/SymbolInfoDouble(Symbol1_Name,SYMBOL_TRADE_TICK_SIZE);
kVol2=SymbolInfoDouble(Symbol2_Name,SYMBOL_TRADE_TICK_VALUE)/SymbolInfoDouble(Symbol2_Name,SYMBOL_TRADE_TICK_SIZE); 

general approach:

Another important point is the correct calculation of the position size for a paired position. It is logical to assume that two orders should be of equal size, so it is enough to open two positions with the same number of lots. But not everything is so simple. If we consider the divergence of instruments in pips, we assume that pips are equal for both instruments.

In fact, in order to equalise positions, we need to take into account the different pip value of the two instruments relative to the dollar. You can find out the pip value of a currency pair through the pip valuecalculator .

Let's say you want to open a paired position on EURUSD and USDJPY. The pip value for EURUSD is equal to $1. The USDJPY pip value is currently equal to $0.87788. Thus, to equalise the position sizes, the USDJPY position volume should be 1.14 times the EURUSD position volume (1 / 0.87788).

Советник всем миром - В настройках маржин вставил трал по эквити. Закрывает все позы при падении эквити, превышении выставленного профита.
Советник всем миром - В настройках маржин вставил трал по эквити. Закрывает все позы при падении эквити, превышении выставленного профита.
  • 2010.11.13
  • [Удален]
  • www.mql5.com
Закрывает все позы при падении эквити по отношению к балансу на выставленную долю от максимально достигнутого. и превышении выставленного профита в настройках - профит. В настройках маржин - доля лота основного ордера от фри маржин
 
Roman Shiredchenko #:


Suppose you want to open a paired position on EURUSD and USDJPY. The cost of a pip on EURUSD is equal to $1. The USDJPY pip value is currently equal to $0.87788. Thus, to equalise the position sizes, the USDJPY position volume should be 1.14 times the EURUSD position volume (1 / 0.87788).

And what does this equation give? JPY is trending EUR flat.

 
Anybody who trades in finam, how long are the limits executed today? For some reason I have a big delay (3-20 seconds).
 
mvf358 #:

and what does that equation mean? JPY is trending EUR flat.

Do we need to adjust for volatility?
 
Janis Ozols #:

I have recently become interested in the topic of pair trading. I had some questions. And here is such a topic. Where else to ask but here.

So, the other day I watched a webinar about the basics of pair trading. There it was suggested to determine the moment of opening deals on a pair of traded instruments to build a chart of the third, synthetic, instrument to further search for extrema on it. There were two variants for building this chart:

Everything is clear with the second variant; there are no questions about it.

As for the first variant, the question immediately arises: where does the value of the coefficient b come from? How to calculate its optimal value?

I watched the webinar in the recording and there was no opportunity to ask the presenter a question. He himself did not reveal this topic, but simply suggested using ready-made coefficient values for different combinations of traded instruments:

Can you please help me to understand how the b coefficient values (shown in the second screenshot in brackets) are calculated for each pair of instruments?

above on the topic there are painted "funny pictures" https://www.mql5.com/ru/forum/448777/page238#comment_53571711.

for example for GBPUSD, GBPJPY pairs make a chart x=1/GBPUSD=USDGBP, y=1/GBPJPY=JPYGBP (to have one currency in the denominator and the same measurements along the chart axes).

the quote will make elliptical movements, the longest axis of the ellipse (the most active and frequent movements along it) will be along the line with the slope tg=USDJPY,

with volumes proportional to current prices: a paired deal along the large axis of the ellipse = sum USDGBP+JPYGBP (or sell GBPUSD, sell GBPJPY). The orthogonal trade, USDGBP-JPYGBP (or sell GBPUSD buy GBPJPY, aka sell USDJPY).

the proportionality of volumes to prices means that your mysterious coefficient is taken from the cross.

if you visually see an additional slope/vector_movement - take it from it

Парный трейдинг и мультивалютный арбитраж. Разборки. - Не сочтите за рекламу, это просто иллюстрация к геометрической интерпретации парной торговли.
Парный трейдинг и мультивалютный арбитраж. Разборки. - Не сочтите за рекламу, это просто иллюстрация к геометрической интерпретации парной торговли.
  • 2024.05.30
  • Andrey Dik
  • www.mql5.com
расстояние между точками убытка при переходе из одной сточки в другую и кратчайших маршрутов множество. Чтобы все стало привычным плоским евклидовым и можно было мерять расстояния линейкой. Иллюстрация что не так с пространством EURUSD - измерение расстояний