Correlation of indicators - page 2

 

Richie писал(а) >>


So the question is: How do you determine how "correlated" the indicators are?

The question is completely pointless and nerdy.


The right questions should go like this:


1. How closely correlated are the first price differences of the current bar with the first differences of the indicator on the previous bar?

2. How well do the first price differences of the current bar correlate with the values of the oscillator on the previous bar?


Here is another incorrect question:


1. How well do prices on the current bar correlate with the values of the oscillator on the previous bar?


Incorrect, because BP itself, unlike the first BP differences, is useless to examine. The correlations between the prices and the previous indicator values will always be present, but they will not make sense. The study of BP itself is a waste of time and a major mistake for beginners.

 

Of course, the first differences are what we talk about, what else is there to talk about.

 

About the depth of history when analyzing the correlation of indicators.

Below is the chart that displays the correlation coefficient between the first differences of EMA5 and EMA7 (taken at random) depending on the depth of history of analyzed data (the initial moment of time is the same for all samples)) I think the "true" correlation coefficient between these two values is apparent - the deviation from it can be considered a "correlation noise" (I've been coining new terms recently :)))



the script in the attachment

Files:
 

Pearson correlation coefficient


 
I'm thinking: we have the above graph. How can we estimate the "real" QC, i.e. what is hidden behind the noise in the right part of the graph? The obvious suggestion is to build some approximation (e.g. linear) on the data of that part of the graph where there is little noise (from 1000 to about 100), and continue it to the right. At which point we'll hit the vertical axis, that's where the answer is. This estimation algorithm is of course an approximation but it has the advantage of being well formalized. I think it's not bad.
 

Here you go. Exelka has coped with the linear approximation. But this is the simplest case - the indicators are linear, and the horizontal line was in principle expected. But in more complex cases we can use other approximations - exponential, polynomial and God knows what else.



What are your thoughts, gentlemen?

 
alsu >>:

Вот, пожалуйста. Экселька с линейным приближением справилась. Но это простейший случай - индикаторы линейные, и горизонтальная линия в принципе была ожидаема. Но ведь в более сложных случаях можно пользоваться и другими приближениями - экспоненциальным, полиномиальным и бог его еще знает каким.



Ваши соображения, господа?


Nobody needs botany. And it's obvious, without any Exel, that the first differences between the two waves will correlate with each other. Because the waveform with a larger period partially contains the waveform with a smaller period. Anyone who is familiar with Exel or any other package will easily be able to screw around and draw nice charts. Therefore, the task is set in a different direction:


1. How closely correlated are the first price differences on the current bar with the first differences of the indicator on the previous bar?


If they are not correlated, the indicator can be trashed, because its readings are not suitable for trading. Or give it to geeks: let them calculate the correlations between futile indices for the sake of enhancing one's ego. If the correlation is positive, then a positive first difference signals a buy, while a negative first difference signals a sell. If the correlation is negative, a positive first difference signals a sell and a negative first difference signals a buy.

 
Richie >>:

Итак вопрос такой: как определить, насколько индикаторы "коррелированны". Это продолжение вчерашней темы про объединение индикаторов, поскольку меня упрекнули в том, что я не учитываю многие вещи и это так. Я думаю понятно, что я говорю не о "двух машках с периодами 51 и 52" образно говоря.

У кого какие мнения по этому воводу, было бы интересно выслушать мнения математиков.....

PCA - https://en.wikipedia.org/wiki/Principal_component_analysis

 

Although I am not a mathematician, I think the modulus of correlation coefficient F1(price1) with F2(price1) will be 1.

***

Let there be y=f(x). What would F have to be for the correlation coefficient of f(x) & F(y) to be zero?

In other words: What should be the formula of the indicator so that the latter does not correlate with the data it is based on?

 
Reshetov >>:

Ботаника нафиг никому не нужная. И ежу понятно, без всякого Exel, что первые разности двух машек будут между собой коррелировать. Потому что машка с большим периодом частично содержит в себе машку с периодом меньшим. Любой, кто знаком с Exel или другим пакетом запросто сможет повыдрючиваться и нарисовать красивые графики. Поэтому задача ставится в другом направлении:


1. Насколько коррелированы первые разности цен на текущем баре с первыми разностями индикатора на предыдущем баре?


Если не коррелированы, то индикатор можно выкинуть на помойку, т.к. его показания не годятся для трейдинга. Или подарить ботаникам: пущай они вычисляют корреляции между фуфельными индюками ради удовлетворения ЧСВ. Если корреляция положительная, то положительная первая разность сигнализирует о покупке, а отрицательная о продаже. Если корреляция отрицательная, то положительная первая разность сигнализирует о продаже, а отрицательная о покупке.

Mr. Reshetov, if you have followed the discussion over the last three days, you would have noticed that we are talking about the synthesis of trading systems from several indicators, or rather, about the possible ways to assess their future performance, not about the effectiveness of each already existing indicator individually. Since the question of how to take into account the correlations between indicators has arisen during the discussion, this is what has been analyzed. If you are personally interested in another question, you can solve it, besides you only need to change one line in the script above.


P.S. I've wanted to ask you for a long time, but was too shy to ask: did a nerd hurt you as a child?