ARIMA Elements:
AR (AutoRegressive): Uses lag to measure the correlation between observations; in other words, it uses past values in the series to predict future values.
I (Integrated): that data has been differenced in order to make the time series steady. Differentiating a non-stationary series helps eliminate trends that are frequently seen in them. In essence, you're changing the series so that it now emphasises changes from one period to the next as opposed to absolute numbers.
MA (Moving Average): This part models the time series error as a blend of previous error terms.
Deterministic Trend: An ARIMA model's deterministic trend is a predetermined, constant trend that the model incorporates. Common choices for this include a quadratic trend (accelerating change) or a linear trend (constant change across time). A less common choice is a cubic smoothing spline.
Considerations for Differencing and Deterministic Trends:
Differencing is applied when your time series displays a trend or seasonality, particularly when these characteristics are due to a stochastic component rather than a deterministic one, to avoid the risk of over-differencing (see the end of this answr for further details on over-differencing). It aids in achieving stationarity, a fundamental assumption in ARIMA modelling.
Inclusion of a deterministic trend implies you are acknowledging a specific pattern in your data for the model to consider. It's akin to incorporating specialist knowledge into your model.
However, many practitioners overdifference their time series, introducing a moving-average unit-root component and raising the error variance. The presence of a deterministic trend or seasonality in the absence of a unit root (seasonal or not) does not justify differencing. See the edit below for further detail.
When to Use Both?
If your data’s trend is suspected to change (e.g., from rapid growth to a moderate incline), sole reliance on differencing may be more apt. It allows the model to adapt to such temporal changes.
To effectively analyse data that shows a stable underlying trend with periodic variations, it can be useful to combine differencing and a deterministic trend. The deterministic trend focuses on the consistent component, whereas differencing handles the variations.
For example, with econometric data showing steady growth over years but with cyclical variations, employing a deterministic trend for long-term growth and differencing for cyclical shifts is often employed..
Key Points
Introducing a deterministic trend increases model complexity. It’s crucial to ensure this added complexity correlates with enhanced performance.
A thorough grasp of your data and its context is required. A model with a constant deterministic trend, for example, may breakdown if the fundamental process generating the data changes (structural breaks).
Always evaluate the efficacy of your model using appropriate metrics. Techniques such as cross-validation and out-of-sample testing can help you determine how well your model generalises.
To sum up, whether you use differencing, a deterministic trend, or both depends on your understanding of the data's features and the specific analytical context. There is no universal solution; instead, it is typically a combination of theoretical understanding and empirical validation.
Edit: To address the comment by Richard Hardy about over-differencing:
This tackles an important issue in time series analysis: the possibility of over-differencing. Over-differencing a time series that lacks a unit root (seasonal or otherwise) can add needless complexity and result in less accurate models.
Unit Root Tests: It is a god idea to identify whether a unit root exists before opting to difference a time series. This is commonly accomplished through the use of tests such as the Augmented Dickey-Fuller (ADF) test, the Phillips-Perron test, or the KPSS test. If these tests do not show the presence of a unit root, differencing may not be required.
Deterministic Trend vs Stochastic Trend:
- A deterministic trend (such as a linear or quadratic trend) can often be removed by including a trend component in the model rather than differencing.
- A stochastic trend, which implies a unit root, usually requires differencing to achieve stationarity.
Consequences of Over-Differencing:
- Over-differencing can result in the model including a moving average unit root that is unneeded. - It can raise the error variance and potentially produce false patterns in the differenced series.
- Biassed estimations and inaccurate conclusions might result from over-differenced models.
Alternatives to Differencing: If you detect a deterministic trend or seasonality in the absence of a unit root, investigate models that explicitly include these components. For seasonal components, for example, use a trend component in ARIMA (similar to trend='ct' in Python's statsmodels) or SARIMA.