# trend stationary with external regressors

Suppose I have two trend - stationary time series with strong correlation.

In the case where there are no regressors, if a time series is trend-stationary, it becomes stationary by subtracting a deterministic trend. Meaning, I fit a line to the data $$Y=f(t)$$ and subtract that line from the data. Then I fit the residuals with Arima.

In the case where there is an independent regressor... do I subtract the best fit line from both $$Y = f_1(t),\, X = f_2(t)$$, or do I subtract lines : $$Y = f_1(X, t), \, X = f_2(Y, t)$$, where $$X$$ is the regressor, $$Y$$ is the dependent time series variable, and $$t$$ is time.

I think the answer is to subtract a best fit line which only considers time, because stationary means the covariance and expectations are constant functions of time... but I am looking for a second opinion from you geniuses.

I worry because I don't want to lose the correlation between regressor and dependent variable by subtracting best fit trend lines from the data.

• Are you ultimately interested in relating Y to X? Not clear from your post. Commented Jun 20, 2019 at 8:29
• Yeah, but I believe both series need to be stationary first. Commented Jun 20, 2019 at 16:44
• Why do you believe they have to be stationary first? If you're talking about regressing Y on X, they don't; only the error term is required to be stationary. Commented Jun 20, 2019 at 17:03
• You don't. You model $Y_t = \beta X_t + f(t) + \varepsilon_t$, which is like "subtracting" a deterministic trend from $Y_t - \beta X_t$, because it is the error term that must ultimately be stationary, not the data. Commented Jun 21, 2019 at 12:45
• No, you should not "remove seasonality" as a separate first step. What if $Y_t$ and $X_t$ are co-seasonal? Then there is no seasonality that needs to be modeled at all because $Y_t - \beta X_t$ is not seasonal. The multi-step approach also has the disadvantage of being less efficient and of potentially distorting dynamics (many seasonal adjustment procedures do this by using future data). Commented Jun 21, 2019 at 16:37

It appears to me you are struggling with presumed deterministic time trends and possible deterministic level shifts in one or more series that you are trying to relate.

Subtraction is not the answer ...filtering via pre-whitening is the GENERALLY preferred method to identify a possible useful model which can then lead to identifying time trends and/or level shifts GIVEN the impact on Y of the candidate X.

Take a look at two web references that I think will help you going forward.

If you wish to pursue this thread , perhaps in another question actually create via simulation a test case where you have embedded certain (possibly identifiable) structures and post it to challenge the readers of this list. Simulation can be a great teacher and an even greater software evaluation tool/strategy.

• Hey, thank you for the references, I will definitely read them, especially the pre pre-whitening. So, I think you are saying that pre-whitening is the method to remove trend lines from trend stationary data when you are considering the case of external regressors. I wonder about the effects of removing trends from both the independent and dependent series in isolation, because what if the trend I am removing correlates to the regressor. Does pre whitening handle this? Commented Jun 20, 2019 at 16:48
• you should know that the pre-whitening activity is for MODEL IDENTIFICATION purposes only. Once the model or a starting attempt at the model is formed then adding on latent structure be it ARMA or trends or level shifts or seasonal pulses comes into play. Commented Jun 20, 2019 at 18:34
• In the pre-whitening reference, they determine two lags of x will be used as regressors of y. The regressor series X needed differencing to be stationary. It has an Arima model (1,1,0). So what is being used as the regressor of Y, is it a non stationary X, a differenced and stationary X, or the residuals of the time series of X? (newonlinecourses.science.psu.edu/stat510/lesson/9/9.1) Commented Jun 20, 2019 at 23:44
• What if the correlation is between the trend of the mean of X and the trend of the mean of Y? Wouldn't making these series stationary eliminate any correlation? Commented Jun 20, 2019 at 23:45
• the residuals of the time series of X do not aapear in the TF model .As I have said before this is the TF IDENTIFICATION step. I think that you should study the Box-Jenkins text looking closely at Transfer Functon mode lidentification and estimation using the GASY-GASX data set. Also see a review of AUTOBOX in the ORSA JOURNAL viewer.zmags.com/publication/9d4dc62a#/9d4dc62a/66 Commented Jun 21, 2019 at 1:23