Hello Kaushik,

Looking at the replies on my post I think that it's not so simple (as pointed out by some of the authors).
There seems to be no such thing as a 'single' function at the heart of the different correlations. I have to read more on the subject to fully understand the breath of it.

Regarding your question on decreasing series:

> g
           priceG
2009-06-01     10
2009-06-02      9
2009-06-03      8
2009-06-04      7

PriceH is the linear function (priceG + 10): 
> h
           priceH
2009-06-01     20
2009-06-02     19
2009-06-03     18
2009-06-04     17

The correlations:
> cor(g, h, method="pearson")
       priceH
priceG      1
> cor(g, h, method="kendall")
       priceH
priceG      1
> cor(g, h, method="spearman")
       priceH
priceG      1

PriceI = the nonlinear function: 3*(priceG^2) + 6*priceG
> i
           priceI
2009-06-01    360
2009-06-02    297
2009-06-03    240
2009-06-04    189

the correlations:

> cor(g, i, method="pearson")
          priceI
priceG 0.9988938
> cor(g, i, method="kendall")
       priceI
priceG      1
> cor(g, i, method="spearman")
       priceI
priceG      1

So it looks like ascending/descending makes no difference.

Regards,

-Mark- 







 



________________________________


Sent: Tuesday, June 9, 2009 11:13:36 AM
Subject: Re: [R-SIG-Finance] determine non-linear correlation

your last question is mine too. Pls share if u get any answer....

but before that , just a quick thought(since  u r actually palying with the data).... ur original series is all +ve and increasing...what if  they are not....kendall & Spearmman still gives   exact  1( + or -)?
did you check that ?
 Kaushik Bhattacharjee






________________________________


Cc: r-sig-finance@stat.math.ethz.ch
Sent: Saturday, June 6, 2009 8:03:06 AM
Subject: Re: [R-SIG-Finance] determine non-linear correlation


Here is the thesis I was talking about:
www.jos.org.cn/ch/reader/download_pdf.aspx?file_no=20001203&year_id= 2000&quarter_id=12&falg=1

I did some experiments based on the replies to my post which pointed me in the right direction (thank you for that):

let's say I have a timeseries a:


> a
           priceA
2009-06-01      1
2009-06-02      2
2009-06-03      3
2009-06-04      4

And a timesieries b:

> b
           priceB
2009-06-01     11
2009-06-02     12
2009-06-03     13
2009-06-04     14

priceB is derived from priceA by the simple linear function priceB = 10 + priceA.
As expected all correlation methods agree that timeseries B is highly correlated to A:

> cor(a,b, method="pearson")
       priceB
priceA      1
> cor(a,b, method="kendall")
       priceB
priceA      1
> cor(a,b, method="spearman")
       priceB
priceA      1

Now suppose I have another timeseries F:

> f
           priceF
2009-06-01      9
2009-06-02     24
2009-06-03     45
2009-06-04     72

priceF is derived from priceA by the nonlinear function: 3*(priceA^2) + 6*priceA.
If I'm correct than this is known a "second order kwadratic function" which is not a linear function. (If you would draw it in a graph it would be shown as a parabolic line)

Now let's look at the different correlation methods for timeseries A and F:

> cor(a,f, method="pearson")
          priceF
priceA 0.9919354
> cor(a,f, method="kendall")
       priceF
priceA      1
> cor(a,f, method="spearman")
       priceF
priceA      1

Note that Pearson obviously does not know about the nonlinear function between priceA and priceF as it does not reports a correlation of 1. Kendall and Spearman on the other hand seem to know about the nonlinear function as they report a correlation of 1 between A and F.
So my conclusion (correct me if I am wrong): kendall and spearman can handle nonlinear functions as the basis for the corellation, pearson can not. (one of you already pointed this out in a reply I think)

I'm still left with one questions thought:
Is it possible (with R) to obtain the function that forms the basis for the correlation as reported by kendall and spearman? I mean: if I have two real timeseries which are highly correlated according to kendall and spearman (i.e. cor(x,y) = 1) I would like to know the (nonlinear) function that form the basis for the correlation.

Regards,

-Mark- 






________________________________


Sent: Friday, June 5, 2009 1:18:55 PM
Subject: Re: [R-SIG-Finance] determine non-linear correlation


correlation by definition is a linear measure of assocation. So what is the presice definition of non-linear correlation?
can you give the thesis......I am curious to know....
 Kaushik Bhattacharjee




________________________________

To: r-sig-finance@stat.math.ethz.ch
Sent: Thursday, June 4, 2009 12:45:17 AM
Subject: [R-SIG-Finance] determine non-linear correlation

I would like to know if two financial time-series are nonlinear correlated, and if so, what that correlation function is.
Is there an easy way to do this with R?

I have read a thesis about the "high order correlation coefficient to solve the nonlinear correlation problem" but I'm not able to translate this into a solution for my problem. All these statistics are very interesting but also challenging for me...  

Kind regards,

-Mark-


      
    [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance@stat.math..ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.


      
	[[alternative HTML version deleted]]

