ComeçarComece de graça

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.

Este exercício faz parte do curso

GARCH Models in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# 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(____.____())
Editar e executar o código