Skip to content
All library documents

Comparing Realized Volatility with ARCH Forecast Variance

Article Quant Q&A · Author: user1769197

Summary

The question examines whether an ARCH model’s forecast can be compared directly with a rolling estimate of realized volatility. The example computes realized volatility as the rolling standard deviation of returns, then obtains forecast variance from an ARCH model and plots it alongside the realized series. It also uses a square root of forecast variance in an error calculation, raising the distinction between variance and volatility.

The key interpretive point is that variance is the squared scale of returns, while volatility is its square root. A comparison should therefore put both series on the same scale: compare forecast variance with a realized variance measure, or take the square root of forecast variance before comparing with realized volatility. The example also divides returns and forecast values by 100, so units and scaling need consistent handling. The document poses these questions but supplies no answer, empirical evaluation, or confirmation of the referenced implementation’s correctness.

Key ideas

  • A rolling standard deviation of returns estimates volatility rather than variance.
  • An ARCH forecast’s variance must be square-rooted to express it as volatility.
  • Forecast and realized series should use the same units and scale before plotting or scoring.
  • The question provides code and interpretation concerns but no resolution or model-performance evidence.

Tags

Full text
# modelling and forecasting volatility with python's ARCH package


# modelling and forecasting volatility with python's ARCH package












I was reading this link on volatility prediction. It first defined realized volatility as below, so my understanding is that realized volatility is equal to $\sigma$:

```
ret = 100 * (s_p500.pct_change()[1:]['Adj Close'])
realized_vol = ret.rolling(5).std()
```

Then it went on to fit a ARCH model on returns and forecast its volatility with the code snippet (code is also included in the link). n = 252 split_date = ret.iloc[-n:].index arch = arch_model(ret, mean='zero', vol='ARCH', p=best_param).fit(disp='off') forecast = arch.forecast(start=split_date[0]) forecast_arch = forecast

Then it computes the root mean squared error using below. Note that `np.sqrt` is used below and my understanding is that `forecast.variance` returns variance and hence, taking square root gives the forecasted volatility.

```
rmse_arch = np.sqrt(mse(realized_vol[-n:] / 100,np.sqrt(forecast_arch.variance.iloc[-len(split_date):]/ 100)))
```

Then it went on to plotting the realized volatility and the forecasted volatility. This is the part that confuses me. The realized volatility is $\sigma$ and the forecasted variance below is actually $\sigma^2$, which cannot be put together as below. Is the below code from the link incorrect ? My second question: is `forecast.variance` the forecasted volatility or `np.sqrt(forecast.variance)`is the forecast volatility?

```
plt.figure(figsize=(10, 6))
plt.plot(realized_vol / 100, label='Realized Volatility')
plt.plot(forecast_arch.variance.iloc[-len(split_date):] / 100, label='Volatility Prediction-ARCH')
plt.title('Volatility Prediction with ARCH', fontsize=12)
plt.legend()
plt.show()
```

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.