Solved – Time series – correlation and lag time

pythontime series

I am studying the correlation between a set of input variables and a response variable, price. These are all in time series.

1) Is it necessary that I smooth out the curve where the input variable is cyclical (autoregressive)? If so, how?

2) Once a correlation is established, I would like to quantify exactly how the input variable affects the response variable. Eg: "Once X increases >10% then there is an 2% increase in y 6 months later."

How should I implement this – in particular to figure out the lag time between two correlated occurrences?

Example:enter image description here

I already looked at: statsmodels.tsa.ARMA but it seems to deal with predicting only one variable over time. In scipy the covariance matrix can tell me about the correlation, but does not help with figuring out the lag time.

Best Answer

I do not personally code with python but I found out this:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.correlate2d.html

So you have two vectors which both might have temporal dependencies.

You should first do this:

https://onlinecourses.science.psu.edu/stat510/?q=book/export/html/75

Related Question