Compare forecast results
Different rolling window approaches can generate different forecast results. In this exercise, let's take a closer look by comparing these forecast results.
First, you will use a GARCH model to predict Bitcoin return volatility with an expanding window and a fixed rolling window approach respectively. Then you will plot both forecast results together to visualize the difference.
The Bitcoin dataset is preloaded in bitcoin_data, and feel free to explore its columns 'Close' and 'Return'. Variance forecast generated with an expanding window approach is saved in variance_expandwin, and that with a fixed rolling window approach is saved in variance_fixedwin.
Cet exercice fait partie du cours
GARCH Models in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Print top 5 rows of variance forecast with an expanding window
print(____.____())
# Print top 5 rows of variance forecast with a fixed rolling window
print(____.____())