Correlations revisited ... - page 10

 
mladen:

Ma to ma correlations upgraded (made user friendly) and an option added to be able to handle any symbol combination for correlations



PS : when calculating correlation for different symbols, even though it is recommended that you use same average period, the indicator allows you to use different periods. I left it as is for experimenting purpose (you can see the correlation of a price of one symbol to moving average of a some other symbol, as an example)

Dearest MLADEN

How we use these correlations ?

regards

 
mladen:

mntiwana

I think that  this short description of correlation(s) explains almost all:

And, I would like to add, that correlation of -1 means that two values (symbols) are in counter correlation (trend) - which is usualy called perfect negative correlation


When you use same symbol and different ma periods, then it shows how well the mas agree about the trend. But when you use different symbols, it is best to use same periods, and then you can see if the current trend of the monitored symbols is in agreement or not. Even though this is a sort of a "basic" correlation" it can be used for the following :

So, it is intended to be used as a tool to measure that type of correlation - the non-typical is that it can measure the correlation of ma to ma (chose 1 for one ma period and you shall have the price to ma correlation - which would show how well the ma reflects price changes), and then to make a decision when, for example, symbols that usually correlate well suddenly are in opposite directions, we can decide which one will make a correction (which one is ahead, and which one is yet to correct to be in accordance with the correlated pair)

Dearest MLADEN

Thanks a lot for well explained details.

i don't know if it is possible or not,i means when there are 2 different symbols/instruments on same chart and then we apply this tool for better analysis.

regards

 
mntiwana:

Dearest MLADEN

Thanks a lot for well explained details.

i don't know if it is possible or not,i means when there are 2 different symbols/instruments on same chart and then we apply this tool for better analysis.

regards

It is almost that : it can show you if the "other" symbol is following the same direction as the symbol on chart.

Here is an example :


Judging from the values, EURAUD is not following the same trend as EURUSD currently (I have chosen EURAUD since I had no idea what is the price trend of it now). And when you switch to EURAUD you shall see that it is in a short term down trend while EURUSD is in a sort of a short term up trend

Now, since it is expected that thy are in a sort of an "agreement", we have to decide which one is "off the course" and, since the correlation is almost at "no correlation" levels, soon we can decide which one is the dominant trend and which one is good for entries (the one that will correct it's lack of correlation)

 
mntiwana:

Dearest MLADEN

How we use these correlations ?

regards

mntiwana

I think that  this short description of correlation(s) explains almost all:


A correlation coefficient measures the strength and direction of a linear association between two variables. It ranges from 1 to 1. The closer the absolute value is to 1, the stronger the relationship. A correlation of zero indicates that there is no linear relationship between the variables. The coefficient can be either negative or positive.


And, I would like to add, that correlation of -1 means that two values (symbols) are in counter correlation (trend) - which is usualy called perfect negative correlation




When you use same symbol and different ma periods, then it shows how well the mas agree about the trend. But when you use different symbols, it is best to use same periods, and then you can see if the current trend of the monitored symbols is in agreement or not. Even though this is a sort of a "basic" correlation" it can be used for the following :


Pairs Trading: Correlation

The importance of correlation
Correlation measures the relationship between two instruments. We can see from Figure 1 that the e-mini S&P 500 (ES, in red) and e-mini Dow (YM, in green) futures contracts have prices that tend to move together, or that are correlated.
 
Remember, pairs traders attempt to:

  • Identify relationships between two instruments;
  • Determine the direction of the relationship; and
  • Execute trades based on the data presented.

 The correlation between any two variables – such as rates of return or historical prices – is a relative statistical measure of the degree to which these variables tend to move together. The correlation coefficient measures the extent to which values of one variable are associated with values of another. Values of the correlation coefficient range from -1 to +1, where:

  • Perfect negative correlation (-1) exists when the two securities move in opposite directions (i.e., stock A moves up while stock B moves down);
  • Perfect positive correlation (+1) exists if the two securities move in perfect unison (i.e., stock A and stock B move up and down at the same time); and
  • No correlation (0) exists if the price movements are completely random (stock A and stock B go up and down randomly).

http://www.investopedia.com/university/guide-pairs-trading/pairs-trading-correlation.asp


So, it is intended to be used as a tool to measure that type of correlation - the non-typical is that it can measure the correlation of ma to ma (chose 1 for one ma period and you shall have the price to ma correlation - which would show how well the ma reflects price changes), and then to make a decision when, for example, symbols that usually correlate well suddenly are in opposite directions, we can decide which one will make a correction (which one is ahead, and which one is yet to correct to be in accordance with the correlated pair)

 
What I forgot to add : this "ma to ma" correlation is actually very flexible. Any indicator (and I mean any), can be used instead of the ma and can measure the presence or the lack of correlation of two instances
 
mladen:
What I forgot to add : this "ma to ma" correlation is actually very flexible. Any indicator (and I mean any), can be used instead of the ma and can measure the presence or the lack of correlation of two instances

Dearest MLADEN

Thanks .... you means any,cci,stoch,rsi and so on ?

 
mntiwana:

Dearest MLADEN

Thanks .... you means any,cci,stoch,rsi and so on ?

Yes. Any :)
 
mladen:
Yes. Any :)

You have our respect and gratefulness. 

Wishing you happiness forever!

 
mntiwana:

Dearest MLADEN

Thanks .... you means any,cci,stoch,rsi and so on ?

I threw together quickly a couple of built in indcators in this version (you shall see that it is very easy to extend the used indicator in the code)


PS: just to remind : if both symbols are the same, then the correlation will always yield a perfect positive correlation and the result will always be 1. To have valid comparison, the symbols must be different

 
mladen:

I threw together quickly a couple of built in indcators in this version (you shall see that it is very easy to extend the used indicator in the code)

ATTENTION: Video should be reuploaded
PS: just to remind : if both symbols are the same, then the correlation will always yield a perfect positive correlation and the result will always be 1. To have valid comparison, the symbols must be different

Dearest MLADEN

So interesting :)