The question is similar to How to correlate two time series with gaps and different time bases? but with regular sample frequency and identical time base between two time series.
Say I have two time series, one is the stock price for a given company, the other is the ratio of positive comments about the company on social networks. How can I statistically verify that they are correlated? Assume they are both sampled weekly or daily. The challenge lies in the fact that there might be a time difference between each other. In the context of my example above, the positive evaluation from consumer might be later reflected on the stock price.
There are two things I want to investigate in this problem:
- Are the two time series correlated?
- What is the time window to maximize their correlation?