In time series analysis, a common assumption made is that the series is wide-sense stationary, ex. that it has time invariant mean and covariance. However, as this is often not the case in real life, a common approach is to take the difference of the time series:
D_(i) = X_(i) - X_(i-1).
If it doesn't work, then you can do it again.
In fact, the AutoRegressive Integrated Moving Average (ARIMA) Model for time series forecasting has a parameter for the number of times to take the difference.
My question: why does differencing work in reducing non-stationary time series to time series? Does it always work? What is the theory here?
Thanks!