# [R-SIG-Finance] determine non-linear correlation

Matthieu Stigler matthieu.stigler at gmail.com
Fri Jun 5 19:54:27 CEST 2009

```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.
>

```