Quite some time ago I was doing some work on Pearson correlation indicator. It was working OK and I thought that the "story", as far as coding is concerned, is finished. There is Pearson, there is Spearman's rank correlations...
Ops, lets go back a bit :
Reading about correlations it struck me that Pearson correlation and Spearman's rank correlation are constantly compared. First thought was : "Why in the hell are they comparing those when the have so little in common?". Oh well, As usual, first reaction was wrong. The problem needed to be solved and the "mystery" needs to be clarified. So here we go :
First a statement : Spearman's rank correlation that usually is used on metatrader platform is just one special case of Spearman's rank correlation, and due to its cause of being special, it can not even be called a correlation. It comes from a fact that it is a case when the "counter part" used for correlation is of a constant rank and is because of that removed from the equitation : when using time as a second array in "correlations" calculation, time always has a constant rank (since it always has unequal values (unequal by same value - the change in time) in ascending order) and because of that can be removed from calculation - so it is a "correlation" of price and its times
Now that is the conclusion that comes before the end : I decided to clarify the whole mambo jumbo about correlations and to add what normally is used in statistics for correlations interpretation and usage in trading. Here we will have 3 prevailing correlations methods covered and solved :
- Pearson(linear) correlation
- Spearman's rank correlation (it will be done in most detail)
Correlation value 1 would be an ideal correlation (it would mean that two symbols are having exactly the same changes at exactly the same time - by default only the symbol correlated to itself yields 1 all the time)
Correlation value 0 would mean that there is no correlation (changes of the 2 symbols are random compared to each other)
Correlation value -1 would mean an ideal counter correlation (exactly the opposite changes in exactly the same time) More or less there is no ideal symbol pair for this, but some pars do tend to go in opposite directions (EURUSD - USDCHF for example as a typical counter correlation)
Also, if you compare the 3 Types of correlations, you will notice that they, roughly, yield same values and are showing same "conclusions" even though their mathematical models are different. So, it would mean that correlations can be and are quantifiable (these are the proofs of it ) and by just a simple look at a fairly "non short" length correlation (I used 50 as an example) shows that the randomness in market is not that often.
They do not show the trends (you can not foresee the trend by looking at these) but there is an interesting "thing" happening from time to time : pay attention when a lot of symbols are gathering around 0 value - it is almost a sure sign that a breakout is around the corner
I was curios as of what exactly correlations are. Not the "fancy word using" "systems" tht are promissing trading systems from correlations, but the strictly mathematically modeled correlations.
From the results I am not disappointed since it is obvious that changes are not random as some would like to make us believe and usage (in manual trading) is obvious (finding divergences in a "correlated" or "opposite-direction-correlated" is straight forward) and also the "random zone pre-breakout games" are quite interesting (like watching the poker players trying to hide their intentions but knowing the "tell" )
Now, what is left to do, is to find an "mechanical" aspect that can be used as a sort of signal. One of the ongoing projects ...
There are some great correlation startegies in Murray Ruggerio's Cybernetic Trading Strategies book.He refines intermarket analysis with spectral analysis(MESA) and correlation analysis.İnvestigating the correlation between currency pairs and US Treasury Market or German Bunds might have strong predictive value(cointegration).Definitly worth investigating it .
Dynamic zone Spearman Rank Correlation indicator is on this post. This one is with mtf, alerts and colors when levels are broken so it should cover all the bases. Levels for alert and colors are on dynamic levels too.