Indicators: Cointegration

 

Cointegration:

The indicator calculates and displays a linear relationship between two or more financial symbols.


Author: Maxim Dmitrievsky

 

Now an article to it, and it will not be worth the price at all)

 
Vitaly Muzichenko:

Now an article to it, and it will be worth the price)


I think I will make a more interesting version after the New Year, then the article will be justified. there is not much to describe here.

 
Maxim Dmitrievsky:

I think I will make a more interesting version after the New Year, then the article will be justified. there is not much to describe here.


I saw the name of the indicator and immediately remembered one addon for NSH. I think it was called CSSA. There was one tool there, which was called "Co-integration". Only it showed the dependence not between instruments, but between frequencies and was built on the example of oscilloscope screen. That is, along the X and Y axis, thus drawing Lissajous figures (a term from the wave theory of signal). So the point of cointegration was simple. It was necessary to select such two frequencies with averaging parameters, etc. so that as smooth a circle as possible appeared on the screen. This indicates that one frequency follows the other and therefore one predicts the other. Having obtained the circle shape, we have parameters of frequency, averaging, shift, etc., which predicted the quotient. More precisely, this method searched for exactly the frequency that is ahead of the kotir and keeps pace with it. For all the time of using this addon I managed to build a circle only once and that by accident, because the parameters were selected manually + it was all done in a certain window, etc. But having got the circle and having learnt the current active frequency, which is ahead of the quotir, it was possible to make 5-6 deals on peaks and troughs with high accuracy. But as the construction of the circle figure was manual, I was not able to repeat such a result. So there is a lot to strive for in this direction.

Here is a link to the addon project

Entropy from the same site deserves special attention. I think for NS entropy would be a significant input.

Noxa Analytics Inc :: Your Predictive Edge
  • www.noxapredict.com
Imagine what it would be like if you could with in market data . What would that be worth to you? Three Facts You Must Know Before You Buy Any Chart Pattern Recognition Tool. 1. Spotting profitable niches with entropy-metrics 2. Discovering meaningful patterns 3. Revealing...
 
Mihail Marchukajtes:

I saw the name of the indicator and immediately remembered about one addon for NSH. CSSA I think it is called. There was one tool there, which was called "Co-integration". Only it showed the dependence not between instruments, but between frequencies and was built on the example of oscilloscope screen. That is, along the X and Y axis, thus drawing Lissajous figures (a term from the wave theory of signal). So the point of cointegration was simple. It was necessary to select such two frequencies with averaging parameters, etc. so that as smooth a circle as possible appeared on the screen. This indicates that one frequency follows the other and therefore one predicts the other. Having obtained the circle shape, we have parameters of frequency, averaging, shift, etc., which predicted the quotient. More precisely, this method searched for exactly the frequency that is ahead of the kotir and keeps pace with it. For all the time of using this addon I managed to build a circle only once and that by accident, because the parameters were selected manually + it was all done in a certain window, etc. But having got the circle and having learnt the current active frequency, which is ahead of the quotir, it was possible to make 5-6 deals on peaks and troughs with high accuracy. But since the construction of the circle figure was manual, I was not able to repeat such a result. So there is a lot to strive for in this direction.

Here is a link to the addon project

Entropy from the same site deserves special attention. I think for NS entropy would be a meaningful input.


2 or more financial instruments are cointegrated if their linear combination forms a stationary BP

I'll have a look at the software, thanks... but it's basically the same thing with different letters.

 
Maxim Dmitrievsky:

2 or more financial instruments are cointegrated if their linear combination forms a stationary VR

I will have a look at this software, thanks... but it's basically the same, but with different letters.


It's just that in that software there was no possibility to atomically optimise the parameters to build a circle. It would be another thing if this tool appeared on MT as a complete product. With the possibilities of cloud optimisation I think it would be worthy. The main thing is to realise everything correctly.

 
Mihail Marchukajtes:

It's just that in that software there was no possibility to automatically optimise parameters to build a circle. It would be another matter if this tool appeared on MT as a complete product. With the possibilities of cloud optimisation I think it would be worthy. The main thing is to get it right.


circle means full matching of frequencies, it is possible to fit any pair of instruments, but it is not sure that it will not be overfitting, so it should be done through cross-validation.

 
Maxim Dmitrievsky:

circle means a complete matching of frequencies, you can make matching of any pair of instruments, but it is not a fact that it will not be overfitting, so it should be done through cross validation.


I think that when receiving the circle, the frequency will act on the market not for a long time, well if within 5-6 signals. The main thing is to learn to receive it quickly, so that these signals were relevant. As far as I understand the calculation is resource-intensive, so there may be difficulties.

 
Mihail Marchukajtes:

I think that when receiving the circle, the frequency will not act on the market for a long time, well if within 5-6 signals. The main thing is to learn to receive it quickly, so that these signals were relevant. As far as I understand the calculation is resource-intensive, so there may be difficulties.


If there is no fundamental dependence, it will constantly break almost every new bar, so pair trading is a two-edged stick - today there are dependencies and tomorrow they are not. On the example of this indicator you can see, if you switch off retraining on every new bar

 
Maxim, can you reply in private please!
 
Great indicator, good job, thank you!