How do you assess the stationarity of a time series and what steps would you take if it is not stationary?
Instruction: Provide a detailed approach to test for stationarity and discuss the methods to transform a non-stationary time series into a stationary one.
Updated
Example Answer
I would plot the levels and examine rolling moments, seasonality, autocorrelation, and possible structural breaks. I would then use tests that match the proposed model: ADF has a unit-root null, while KPSS has a level- or trend-stationarity null depending on its specification. Neither result is conclusive on its own.
If there is a stochastic trend, first differencing means the current value minus the previous value. Seasonal differencing subtracts the value one seasonal period earlier. A deterministic trend or a changing seasonal pattern may instead call for an explicit trend, seasonal component, or another model. I would not keep differencing just to obtain a small p-value; over-differencing can damage the signal and forecast behavior. I would check the resulting dynamics and forecast performance, and remember that decomposition does not guarantee its residual is stationary.
Worked example
For levels [10, 12, 15], first differences are [2, 3]. For weekly observations with an annual pattern, an appropriate seasonal period must be established rather than assumed.
Why this works
It links each intervention to a plausible source of nonstationarity and gives the subtraction order correctly.
Follow-up to prepare for
Could the apparent nonstationarity reflect a structural break, and how would that change your model?