Simon U., Michael Y., Ben H., Sachid Deshmukh
March 3, 2020
The previous method is effective for time series without trend or seasonality
But what if your time series has trend?
Appropriate for time series that can be described with
\[y_t = \beta_0 + \beta_1 t + \epsilon_t\]
where \(\beta_1\) quantifies the trend
## [1] 2.5 7.0 9.5 8.0 10.5 15.0 18.5
\[\begin{aligned} \text{Forecast equation}&& \hat{y}_{t+h|t} &= L_{t} + h T_{t} \\ \text{Level equation} && L_{t} &= \alpha y_{t} + (1 - \alpha)(L_{t-1} + T_{t-1})\\ \text{Trend equation} && T_{t} &= \beta (L_{t} - L_{t-1}) + (1 -\beta)L_{t-1}, \end{aligned}\]
where
In the FPP2 package there is data set of the Google share price over 1000 days, from 2/25/2013 to 2/13/2017.
We can make a train/test split, and then train Holt’s Linear Trend model on the first 900 days, and generate a prediction for the next 100 days:
We can check the accuracy of the model predictions vs. the test data:
## RMSE MAE MAPE
## Training set 8.795267 5.821057 1.000720
## Test set 16.328680 12.876836 1.646261
This indicates a Mean Average Percentage Error (MAPE) of about 1.6% on the test data.
The Holt-Winters method accomodates both trend and seasonality.
There are two flavors: Additive and Multiplicative.
Each flavor involves four equations:
where
The fpp2 package includes a dataset on Australian cement production, qcement, which exhibits both trend and seasonality:
Exponential time smoothing method discussed so far are good for producing point forecast
For all practical purposes point forecast is not enough and we need to produce distribution forecast e.g. quantiles
Statistical methods like ETS state space models are good for generating point forecast and distribution forecast
Statistical Forecasting Models - State Space Model