How do you detect and correct for seasonality in a non-stationary time series?
Instruction: Provide a detailed explanation on methods to identify and adjust for seasonality in time series data.
Updated
Example Answer
I would first establish the seasonal period from the calendar, operating schedule, and plots across repeated cycles. Autocorrelation can support the diagnosis, but a unit-root test is not a test that identifies the seasonal period.
Then I would decide whether to model the seasonality directly, seasonally difference the series, or forecast a decomposition and recombine its components. Removing a seasonal component does not automatically remove a trend or structural break. For additive decomposition I would subtract the component; for multiplicative decomposition I would divide by it, or work on a suitable transformed scale. With multiple periods, I would use an implementation that explicitly supports them. I would fit each step inside the training window and compare forecasts on later seasonal cycles.
Make it your own
Specify the period, whether seasonal swings change with the level, and the forecasting horizon.
Why this works
It separates detecting seasonality from deciding how to model it.
Follow-up to practice
What remains nonstationary after seasonal adjustment?