# Confidence bands for difference of time series

Assume that I have two time series $Y_{1t}$ and $Y_{2t}$ that are sampled at the same frequency. Is there a way to quantify the uncertainty in their difference $Y_{1t} - Y_{2t}$? That is, can we get confidence bands on $Y_{1t} - Y_{2t}$?

My thought is that some sort of a dependent bootstrap should apply.

This question also seems related to this question.

• Do you want to have a confidence interval at each time point, or over time points? Aug 29, 2014 at 11:32
• @amoeba Your point and that of ssdecontrol are related. I want a confidence interval at every time point, which reflects the different uncertainty at each time point. Aug 29, 2014 at 11:33

• Does the needed number of samples at $t$ depend somewhat on whether the values of a time series are functions of previous values in the time series? Aug 29, 2014 at 15:21
The difference $Y_{1t}-Y_{2t}$ is known with certainty; after all, you just measured it (unless you are measuring with uncertainty), so confidence bands around the difference seem to make little sense without an underlying model. I assume I may be misunderstanding your question - perhaps you want to edit it?
That said, you could fit, say, a state space model to the difference (e.g., with ets() in the R forecast package) and then simulate it to get the distribution of the underlying states at particular time points. Unfortunately, simulate.ets() only works for out-of-sample simulations, but you could probably extract what you need from the fitted model. Or you could fit the state space model to initial segments of the difference, then simulate out from there, sort of a "rolling origin" forecasting approach.