Suppose I have two time series: y(t) and x(t), with y(t) the time series I want to predict and x(t) as the input for the prediction. My question is straightforward. How do I know if x(t) has the prediction power for y(t)?

I have come up with the correlation function of two kinds:

  1. the python cross correlation function np.correlate. This function computes the correlation as generally defined in signal processing texts: $c_{av}[k] = \sum_n a[n+k] * conj(v[n])$

  2. the python correlation coefficients np.corrcoef. Return Pearson product-moment correlation coefficients.

Which one is a better estimate of prediction power or represent a better correlation between the two? What is the difference between the two (of course their formula are different, but what does that represent?)

If I want to predict y(t) with a model f, which takes argument of x(t), x(t-1), etc. How many lags should I keep? Is there any method to estimate this?

Should I just calculate the np.corrcoef(y(t), x(t)) and np.corrcoef(y(t), x(t-1)) and see the decaying properties the this correlation coefficients and made a cutoff at some point? I hope you can shed some light about my concerns.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.