# Lead-Lag Effect in time series | How to find cross-correlations?

Hello altogether,

currently I am trying to find correlations between different time series. In my case it is possible that the time series are shifted to each other, thus that a possible correlation between the time series would also be shifted.

My question is, whether cross or auto-correlations are the right thing to do here (I've also read that rainflow could do the job?!). If so, are there any operators concerning this? I couldn't find cross or auto correlation functions in RM.

Thank you for your help.

Philipp :-)

EDIT:

If there is no such operator maybe there is a way to use the optimize parameters operator in which the two time series are shifted (is there an operator for that?) until highest correlation between both is achieved, so that at the end they are synchronized.

## Answers

2,959Community Managerhmm good question. @tftemme?

1,635UnicornThere is a Lag Series operator that you can use for this, but I don't think there is something that will automatically search and find the best auto-correlations. But as you suggested, you may be able to do this using the Lag operator and putting it into a loop and then generating correlations and logging those to find the best values.

Lindon Ventures

Data Science Consulting from Certified RapidMiner Experts

164RM ResearchHi Philipp,

The Value Series extension on the Marketplace has the Operator Autocorrelation Transformation Operator, which calculates the autocorrelation coefficients for different lags. Before using this you have to convert your ExampleSet to a SeriesObject with the Data to Series Operator, and after the Transformation you have to convert it back with the Series to Data Operator.

As Brian correctly mentioned, you can also use the Lag Series Operator from the Series extension, to calculate the lagged values and calculates the correlation for you self.

Hope this helps,

Best regards,

Fabian