Tuesday, April 19, 2022

Simulation and Bootstrap Forecasting from Univariate GARCH Models

Authors and guest post by Eren Ocakverdi

This blog piece intends to introduce a new add-in (i.e. SIMULUGARCH) that extends the current capability of EViews’ available features for the forecasting of univariate GARCH models.

Table of Contents

  1. Introduction
  2. Forecasting with Simulation or Bootstrap
  3. Application to price of Bitcoin
  4. Files
  5. References

Introduction

Estimation of conditional volatility is not an easy task as it is an unobserved phenomenon and therefore certain assumptions need to be made for that purpose. Once the model parameters are identified, it is relatively straightforward to produce forecasts. However, unlike the regular mean models (e.g. OLS, ARIMA etc.), generating a confidence interval around the forecast of conditional volatility requires an additional effort.



Forecasting with Simulation or Bootstrap

Suppose that we prefer a GARCH(1,1) model to explain the volatility dynamics of the logarithmic return of a financial asset:

\begin{align*} \Delta \log(P_t) &= r_t = \bar{r} + e_t\\ e_t &= \epsilon_t \sigma_t\\ \sigma_t^2 &= \omega + \alpha_1 e_{t - 1}^2 + \beta_1\sigma_{t - 1}^2 \end{align*} where $ \epsilon_t \sim IID(0,1) $. As shown by Enders (2014), h-step-ahead forecast of the conditional variance is as follows:

\begin{align*} \sigma_{t + h}^2 &= \omega + \alpha_1 e_{t + h -1}^2 + \beta_1\sigma_{t + h - 1}^2\\ E(\sigma_{t+h}^2) &= \omega + \alpha_1 E(e_{t + h - 1}^2) + \beta_1 E(\sigma_{t + h - 1}^2)\\ E(e_{t+h}^2) &= E(e_{t + h}^2\sigma_{t + h}^2) = E(\sigma_{t + h}^2)\\ E(\sigma_{t + h}^2) &= \omega + (\alpha_1 + \beta_1)E(\sigma_{t + h - 1}^2) \end{align*} If $ (\alpha_1 + \beta_1) < 1 $, then it implies that forecasts of conditional variance will converge to a long-run value of $ E(\sigma_t^2) = \omega/(1 - \alpha_1 - \beta_1) $.

Median of conditional variance would be a useful gauge as a central tendency since the variance is a squared value and therefore has a skewed distribution towards larger values. In order to compute the median value along with the associated confidence interval, we need different realizations of forecasted values of conditional variance. One can either simulate or bootstrap the values of innovations (i.e. $ \epsilon_t $) to do so. Simulation generates random samples of innovations from the theoretical distribution assumed in the estimation of model. Bootstrap, on the other hand, does resampling (with replacement) of innovations and is therefore mimics the sampling process successfully as long as the observed distribution of sample resembles the distribution of population.



Application to price of Bitcoin

Bitcoin has emerged as the newest and well-known kid on the block (of investment products) and its value has been quite volatile so far (XBTUSD.WF1).

Simple visual inspections of price level and log returns show us the explosive dynamics and large fluctuations during the analysis period of 2011-2021 (SIMULUGARCH_EXAMPLE.PRG).



Figure 1a: XBTUSD
Figure 1b: Log Difference of XBTUSD

In order to estimate the conditional variance of returns, a simple GARCH(1,1) is fitted to log returns of Bitcoin.


Figure 2: GARCH(1,1)

Level series depicts that there were some severe price fluctuations during 2021, whereas estimated conditional variance of return series suggests that the highest spikes seem to have occurred during 2013.


Figure 3: CONDVAR

Before forecasting the price level, one needs to generate future values of estimated conditional variance either by simulation or bootstrap. This is where the add-in comes handy:


Figure 4: SIMULUGARCH Dialog

Details of the input parameters are explained in the help document that comes with the add-in package. Here, we change the default number of repetitions and forecast horizon to 10K and 22 steps, respectively. Also, fan chart is preferred to summarize the output.

Median scenario for volatility is a gradual increase over the coming month (i.e. 22 business days). This should be expected as the long-run value (i.e. unconditional variance) is calculated to be around 156. However, please keep in mind that median value is always smaller than the mean in right-skewed distributions.



Figure 5a: Forecast of Dependent Variable
Figure 5b: Forecast of Conditional Variance

The role of volatility in forecast uncertainty becomes visible as we simulate the future values of price level, which would have important financial implications (e.g. for computation of Value-at-Risk). Even by the end of next month, for instance, USD price of Bitcoin might climb to as high as 70K or drop to as low as 35K!




Files




References

  1. Enders, W. (2014), Applied Economic Time Series, Fourth Edition", John Wiley & Sons.

3 comments:

  1. "Error 1663 in encrypted program"

    ReplyDelete
  2. Tried to download the .WF1 but get an error message "can't be downloaded securely".

    ReplyDelete
  3. The AddInn is no longer available from EViews. Where can I find?

    ReplyDelete