Welcome to the Traders Laboratory Forums.
Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL.

Reply
Kendall Tau Correlation Details »»
Kendall Tau Correlation
Platform: , by skan skan is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Platform: Unknown Rating:
Released: 08-02-2010 Last Update: Never Installs: 0
 
No support by the author.

Hello

Where may I find the code for the Kendall correlation?, preferably a fast version

thanks

Show Your Support

  • If you like to thanks you by the author -> Click Thanks to the Author
  • This modification may not be copied, reproduced or published elsewhere without the author's permission.

Comments
Old 08-07-2010, 04:15 AM   #2
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: Kendall Tau Correlation

Hello

http://en.wikipedia.org/wiki/Kendall...on_coefficient

The Kendall τ coefficient is defined as:



Algorithms pseudo-code

numer := 0;
for i:=1..N do
for j:=1..(i-1) do
numer := numer + sgn(x_i-x_j)*sgn(y_i-y_j);
return numer;

************************* ***

M(L,R) :=
{
n := |L| + |R|;
i := 1;
j := 1;
nSwaps := 0;
while (i+j <= n) do (
if i>|L| or R[j] < L[i] then
nSwaps := nSwaps + |L|- (i-1);
j := j + 1;
else
i := i + 1;
end if
);
return nSwaps;
}
aaa is offline  
Reply With Quote
The Following User Says Thank You to aaa For This Useful Post:
Stat (03-12-2011)

Reply

Thread Tools
Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correlation Between ES and FESX TraderGT Futures Trading Laboratory 10 04-17-2012 07:34 PM
Correlation Trading and Why It Works So Well Lucid Day Trading and Scalping 14 07-22-2010 09:29 PM
Excel Help Needed brownsfan019 Trading Indicators 5 06-02-2008 07:24 PM
Correlation indicator ImXotep Coding Forum 1 10-18-2007 11:03 AM
Market Correlation for Intraday Trading Soultrader Day Trading and Scalping 10 09-09-2007 04:59 PM

All times are GMT -4. The time now is 11:02 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.