How to measure the time dependent correlation of two signals

Click For Summary
The discussion focuses on measuring the time-dependent correlation between two signals, where one signal exhibits additional features that do not align with the other. The user seeks a method to determine correlation at specific time points, noting that traditional cross-correlation may not be suitable due to the changing nature of the correlation over time. Suggestions include using a peak-finding algorithm to isolate significant peaks in one signal and then applying correlation analysis to the corresponding intervals in the other signal. Additionally, a complex modeling approach involving stochastic differential equations is proposed for capturing time-varying correlations, though it may be challenging to calibrate. The conversation emphasizes the need for a robust method to accurately assess the correlation dynamics between the two signals.
vibe3
Messages
39
Reaction score
1
I have two signals (time series) shown in the plot below. Just by looking at the figure, we can see that the two main peaks of both signals are very closely aligned (correlated), however the red signal has additional features elsewhere which don't match the blue curve.

I am looking for some function which can tell me how correlated these two signals are at a given time. IE: at t = -18 and t = +10 where the peaks are located, the correlation should be very close to -1, while at t = -40, the correlation is probably close to 0.

Specifically, I want a robust way to tell that if I see a peak in the blue curve, then there is a corresponding (negative) peak in the red curve.

I've looked into cross correlation (https://en.wikipedia.org/wiki/Cross-correlation), however this seems suitable for time series which simply have a constant time lag with respect to each other. In my problem the correlation between my two signals is changing with time. I've thought about dividing up the signal into small bins and computing the correlation of each bin, but I was hoping there is a better way.

gMCDu.png
 
Physics news on Phys.org
They look pretty correlated to me. Note that correlation does not mean identical. From the graphs it appears that you could model the relationship perfectly well with a constant correlation and a noise term.

If you want a model with a time-varying correlation you could use a system of three stochastic DEs, one for the first time series, one for the second, which contains a correlation term to the first, and one for the randomly time-varying correlation which could for instance be an Ito process with mean-reversion to an equilibrium of zero (Ornstein-Uhlenbeck process). But it would be complicated to calibrate, and not necessarily stable.
 
andrewkirk said:
They look pretty correlated to me. Note that correlation does not mean identical. From the graphs it appears that you could model the relationship perfectly well with a constant correlation and a noise term.

If you want a model with a time-varying correlation you could use a system of three stochastic DEs, one for the first time series, one for the second, which contains a correlation term to the first, and one for the randomly time-varying correlation which could for instance be an Ito process with mean-reversion to an equilibrium of zero (Ornstein-Uhlenbeck process). But it would be complicated to calibrate, and not necessarily stable.

Yes that is a nice example which has a good correlation. However, I have lots of examples where there is no corresponding peak in the red curve. Or sometimes there is 2 peaks in the blue curve but only 1 peak in the red curve. This is why I need a time-varying correlation.

My current thinking is to use a peak-finding algorithm to find the 2 peaks in the blue curve. Then isolate the same time intervals in the red curve and use a normal correlation on just the region near the peak. This way I can detect if both peaks are correlated, or just 1 peak, or 0 peaks
 
It sounds like you are trying to change the model completely from on time to another, not just get a "time changing correlation". That is fine if you have a logical reason to propose different models at different times. Otherwise, you may not have a valid basis for your conclusions.
 
The standard _A " operator" maps a Null Hypothesis Ho into a decision set { Do not reject:=1 and reject :=0}. In this sense ( HA)_A , makes no sense. Since H0, HA aren't exhaustive, can we find an alternative operator, _A' , so that ( H_A)_A' makes sense? Isn't Pearson Neyman related to this? Hope I'm making sense. Edit: I was motivated by a superficial similarity of the idea with double transposition of matrices M, with ## (M^{T})^{T}=M##, and just wanted to see if it made sense to talk...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 8 ·
Replies
8
Views
928
  • · Replies 1 ·
Replies
1
Views
2K