GARCH rolling window forecast

1. GARCH rolling window forecast

Previously we have learned how to specify GARCH model assumptions. Now let us learn how to perform GARCH model forecast with rolling window approaches.

2. Rolling window for out-of-sample forecast

An exciting part of financial modeling is making predictions! Specifically, we are going to perform rolling window forecast, where we use in-sample data for model fitting, perform 1-period ahead out-of-sample forecast, and do these in a repeated fashion as time rolls forward.

3. Expanding window forecast

There are mainly two ways to perform a rolling window forecast. One is "expanding window" approach, which starts with a set of sample data, and as time moves forward, continuously adds new data points to the sample. Suppose we have 200 observations of a time-series. First, we estimate the model with the first 100 observations to forecast the data point 101. Then we include observation 101 into the sample, and estimate the model again to forecast the data point 102. The process is repeated until we have forecast for all 100 out-of-sample data points.

4. Motivations of rolling window forecast

Rolling window forecast is widely used because of the following motivations: First, when we use all the data to fit a model, the model estimation has lookback bias. In reality, we do not know the future, so the time series data used for model fitting and forecast should not overlap. Second, the rolling window approach is less subject to overfitting. An implicit time series modeling assumption is model parameters are stable over time. But this barely holds true in turbulent market environment. Imagine when we try to fit a GARCH(1,1) with observations from economic crisis versus normal market conditions, we are likely to obtain very different omega, alpha, beta results. Third, the rolling window approach can better adapt our forecast to changes. By continuously incorporating new observations to the model fitting and forecast, we are more responsive to the most recent economic conditions, such as news, changes in economic cycles, etc.

5. Implement expanding window forecast

We can implement GARCH rolling window forecast in Python with a for-loop. During each iteration, we fit the model and make a prediction. Expanding window forecast always has the same initial observation from the sample data. It can be implemented by specifying first_obs in the "fit()" to be a fixed number, or if omitted, starting from the first observation in the sample data.

6. Fixed rolling window forecast

Another rolling window forecast method is call "fixed rolling window forecast". Similarly it starts with a set of sample data, and as time moves forward, new data points are added. What different is old data points are dropped from the sample simultaneously to maintain a fixed window size.

7. Implement fixed rolling window forecast

Fixed rolling window forecast can be implemented by specifying "first_obs" and "last_obs" to be both incremental in the for-loop. The window size hence remains fixed.

8. How to determine window size

In practice, there is no rigid rule for choosing rolling window sizes, and it is usually determined on a case-by-case basis. Consider this: when we forecast the US GDP growth rate in 2020, how many observations should we use? Should we use the last 20 years of data or the last 5 years of data? For rolling estimation, different window sizes can lead to very different forecast performances. A window size too wide may include obsolete data points, leading to higher prediction variance, also known as overfitting. A window size too narrow may leave out data relevant to the current economic conditions, leading to increased prediction bias. In short, we should be mindful that the optimal window size is a trade-off to balance bias and variance.

9. Let's practice!

Now it's your turn to practice!