An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20090603/6e029438/attachment.pl>
determine non-linear correlation
5 messages · Liviu Andronic, Mark Breman, Stefan Grosse +1 more
On Wed, Jun 3, 2009 at 9:15 PM, Mark Breman <m.breman at yahoo.com> wrote:
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?
What about non-parametric correlation coefficients? They are based on ranks, and should detect any monotonic relationship between the time series. Check ?cor and ?cor.test methods "spearman" and "kendall", and also the Wikipedia articles for further references. Best, Liviu
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 at 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.
Do you know how to read? http://www.alienetworks.com/srtest.cfm Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20090604/37137451/attachment.pl>
On Wed, 3 Jun 2009 12:15:17 -0700 (PDT) Mark Breman
<m.breman at yahoo.com> wrote:
MB> I would like to know if two financial time-series are nonlinear MB> correlated, and if so, what that correlation function is. Is there MB> an easy way to do this with R? Maybe you should be more specific about what you want to do? Test for nonlinear cointegration? If that is the case: http://cran.r-project.org/web/views/TimeSeries.html is a starter. Stefan
1 day later
Well the term nonlinear is always a little bit misleading as it can include really different alternatives! Can you provide a reference to the thesis you were mentioning? I think one of the question you have to ask for first is whether your variables are stationary or not. If they are, I would try to include in a regression the nonlinearity you suspect, and then interpreting individual coefficients or the Rsquared as nonlinear correlation. I found actually a similar answer on a similar question on: https://stat.ethz.ch/pipermail/r-help/2008-March/156284.html Note that you would maybe have to use HAC covariance estimators if you want to make some inference, as you are dealing with time-series, see package sandwich. If the variables are not stationary and I(1), you could indeed check for nonlinear cointegration. This is possible in the dev version of package tsdyn who allows to estimate and test for threshold cointegration (btw, I will make a presentation on this subject at userR 2009). Other types of nonlinear cointegration are to my knowledge not implemented in R. You can find much literature on smooth transition cointegration, and a general treatment is done in Park, Joon Y & Phillips, Peter C B, 2001. "Nonlinear Regressions with Integrated Time Series," Econometrica, vol. 69(1), pages 117-61, Matthieu Stefan Grosse a ?crit :
On Wed, 3 Jun 2009 12:15:17 -0700 (PDT) Mark Breman <m.breman at yahoo.com> wrote: MB> I would like to know if two financial time-series are nonlinear MB> correlated, and if so, what that correlation function is. Is there MB> an easy way to do this with R? Maybe you should be more specific about what you want to do? Test for nonlinear cointegration? If that is the case: http://cran.r-project.org/web/views/TimeSeries.html is a starter. Stefan
_______________________________________________ R-SIG-Finance at 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.