Detecting time series stationarity
Several time series forecasting techniques assume a stationary time series process. Thus, it is crucial to determine whether the time series you are working with (the observed time series or the realization that you have) originates from a stationary or non-stationary process.
A stationary time series suggests that specific statistical properties do not change over time and remain steady, making the processes easier to model and predict. Conversely, a non-stationary process is more challenging to model due to its dynamic nature and variations over time (for example, in the presence of trend or seasonality).
There are different approaches for defining stationarity; some are strict and may not be observable in real-world data, referred to as strong stationarity. In contrast, other definitions are more modest in their criteria and can be observed in real-world data (or transformed into), known as weak stationarity.
In this recipe, and for practical reasons...