I have a dataset that is clearly increasing as time goes on (exchange rate of a currency, monthly data over 20 years), my question is: Can I detrend the data and then difference it also to make it stationary, if the detrending in itself doesn't achieve this? And if so, would this be considered twice differenced, or just detrended and once differenced?
|
|
If your process is given by $$y_t = \alpha + \beta t + \gamma x_{t} + \epsilon_t $$ then differencing it takes out the constant and the trend so that you're left with $$\Delta y_t = \gamma\Delta x_t + u_t $$ Therefore differencing the series takes out the trend by itself, there's no need to detrend the process beforehand. EDIT: As noted by @djom and @Placidia in the comments, if the trend is not linear things could get more complicated. To get back to the example above, we would have more precisely $$ \Delta y_t = \beta + \gamma \Delta x_t + \epsilon_t - \epsilon_{t-1} $$ so that the trend is transformed actually to a constant. However if your deterministic trend is some function $f(t)$, then it will depend on behaviour of $f(t) - f(t-1)$. For a polynomial trend with degree $p$, you'll need to difference $p$ times to get rid of it while for exponential trend differencing won't theoretically help at all. If you observe that differencing twice eliminates the trend, you may be simply facing a quadratic trend, i.e. $\beta_1 t^2 + \beta_2 t$. |
|||||||||
|
|
I assume you're referring to nonlinear trend; detrending and differencing in whatever order won't necessarily make a series stationary; it depends on whether the form of nonstationarity is such that it is all captured by integration and trend. |
||||
|
|