Spread trading in Meta Trader - page 186

 
How do you control risk in stat arbitrage?
 

As one option. In the simplest case.

The line of total equity (spread) of the instruments involved can be analyzed by means of standard technical analysis! Support and resistance lines, channel movement, reversal patterns, etc. And in this way to calculate the entry/exit including the risks.

CLZ1 - HOZ1 (oil-fuel oil), - total equity line (spread) drawn in the indicator window:

Specialized sites may draw an equity (spread) line for arbitrage entries and "hang" standard, custom indicators on this line. For example, triple soybean-meal-bean spread, ZS-ZM-ZL=-1^1^1

http://www.spreadinvest.ru/index/0-49

http://cowsandcrops.agricharts.com/markets/spreadchart.php?spread

reply

 

Just had a quick look through the thread. I will give some thoughts of my own. There have been some controversial opinions on whether lots should be calculated or whether they should be equal. I think that all the same, it is necessary and not so much for the sake of what some people think will be more profitable. It seems more important to me that if pairs are balanced, in case one cannot make a profit quickly, one may expect less drawdown.

A little bit about the choice of instruments. Some people believe that the higher the correlation, the better. I do not agree with this. If the correlation is equal to one, the spread will not earn money. The correlation must be present, of course, but the choice must be made in such a way that the traded instruments are in flat with a good divergence and the divergence is not too long. Only the entries should be exact, because if they Only entries must be exact, because if the divergence is good, the drawdown may be good too.

I am pasting the script I have just written to discuss possible errors or misinterpretation of some concepts since I am new to this topic. The script displays the results on the chart using Comment(). It calculates the average value of the maximum daily price divergence for the two instruments, as well as the current (momentary) divergence. I ask connoisseurs to review and comment.

Warning!!! The script is only good for pairs with direct correlation.

Files:
 

khorosh, your above is partly obvious, partly debatable. The script is not understood. Much more useful would be a script of average and max high-low divergence for synthetic for selected period (this is to the question of risk control - I can explain if necessary). As for the script I do not understand its essence. What as and most importantly why it shows. If there is a desire to work in this direction for the good of the community and this branch, we can try to build a full-fledged synthetic in MT4, something here.

The question of lot balancing is from the tasks. For intraday - rebalancing (precise). For the long term - the proportions recommended by the exchange. Point. Not the other way round.

 

khorosh, - I looked at the code.

The dimensionality of both instruments seems to be accounted for. Coefficients p1 and p2. I don't know, - but if instruments have reverse correlation (example below), - does this script display data correctly?

EURGBP-DXZ1 =2:3 (EUR GBP RP - USD index DX, - both instruments here simultaneously sell or simultaneously buy on a divergence pair entry - I entered into a buy both on Friday evening)

 
sayfuji:

khorosh, your above is partly obvious, partly debatable. The script is not understood. Much more useful would be a script of average and max high-low divergence for synthetic for selected period (this is to the question of risk control - I can explain if necessary). As for the script I do not understand its essence. What as and most importantly why it shows. If there is a desire to work in this direction for the good of the society and this thread, we can try to build a full-fledged synthetic in MT4, something here.

The question of lot balancing is from the tasks. For intraday - rebalancing (precise). For long term - the proportions recommended by the exchange. Point. Not otherwise.


Application: If the current divergence CurrentDiv is higher than the average maximum daily divergence DivAverMax and the price charts begin to converge - enter the market. CurrentDiv is calculated as the divergence on the current bar.

DivAverMax is calculated as follows: the daily maximum divergence is calculated from yesterday and the average daily maximum for 30 days is calculated. Both values (CurrentDiv and DivAverMax) are calculated relative to the DivAver - the average bar divergence calculated over 30 days.

 
))
 
leonid553:

khorosh, - I looked at the code.

The dimensionality of both instruments seems to be taken into account. Coefficients p1 and p2. I don't know, - but if instruments have reverse correlation (example below), - does this script display data correctly?

EURGBP-DXZ1 =2:3 (EUR GBP RP - USD index DX - both instruments here simultaneously sell or simultaneously buy in case of a divergence pair entry - I entered into a buy of both on Friday evening)

No, the script is not suitable for the case of instruments with forward and reverse quotes. I have an expo working on currency instruments with forward correlation so I was not interested in this case.
 
TheXpert:
))
" Funny, isn't it, - funny,
He was joking, he didn't finish it,
"He didn't taste the wine,

I didn't even finish the deposit."

))




 

13.11.2011 20:29
Что касается поработать, то извините, во первых некогда, во вторых меня эта тема уже не интересует, так как прибыльный советник по этой теме сделал.

I think you've said that before. I feel like quoting TheXpert:

))

That's why it's funny, because:

khorosh 13.11.2011 16:53
I glanced through a branch. I will express some of my thoughts.....

....Posting just written script today to discuss possible errors or misinterpretation of some concepts, as I'm new to the topic....

Learn, comrades, and you here graalnichat. The man has only read the topic, 3 and a half hours, and already in profit.

P.S. By the way, just for your reference, now that the subject has been studied, a profitable Expert Advisor on this subject has existed for a long time. But you don't need it, you have your own.