Sei sulla pagina 1di 12

Chapter 5

Forecasting Volatility using


GARCH(1,1) and GARCH-KF Model

The main purpose of the present chapter is to analyze the time-varying behavior of volatility
for Sensex by applying Kalman Filter(KF) estimation techniques to GARCH based models.
The respective approaches of the various variants of GARCH model have been studied in
the previous chapter to explain the movements of the overall sensex returns. An alternative
way of modeling the volatility based on the state space form of the GARCH using the
Kalman filter is proposed. This chapter aims at contributing a comprehensive comparison
of Kalman filter based modeling techniques with the GARCH(1,1) modeling approaches.

The first method for comparison is based on the GARCH(1,1) model with conditional
variance as introduced in Chapter 4. The conditional volatility estimates derived by a
GARCH(1,1) model are estimated using the standard Maximum Likelihood method us-
ing the numerical computation. The same approach has been applied in previous studies:
Goudarzi and Ramanarayanan(2010)[93] attempted to study the volatility and its stylized
facts in the Indian stock market. The results indicated that the GARCH (1,1) model sat-
isfactorily explained volatility and its the most appropriate model for explaining volatility
clustering and fat tails. J. Yu (2002)[39] studies the volatility forecast for stock index in
New Zealand by analyzing daily data. Although the standard GARCH(1,1) model is able
to describe the stylized facts of volatility clustering and excess kurtosis, asymmetric effects
of positive and negative shocks on the conditional volatility are not captured.

115
Therefore, the State Space based extensions of the basic GARCH model which is esti-
mated by Kalman filter have been proposed and it is shown, how it can be adapted to the
modeling of GARCH process. The resulting model will be referred to as the (GARCH-
KF). The Kalman filter allows to model and estimate time-varying volatility directly by
application of the linear gaussian state space parameter models introduced in section 3.7.

This approach is on the lines with studies of following authors:

Koopman (2012) [29] presented a new exact solution for the initialization of the Kalman
filter for state space models. The author argued that the initial Kalman Filter can deal with
any pattern of missing data in the set of observations.

Peng and Aston (2011) [126] presented that State Space Models (SSM) a MATLAB
toolbox for time series analysis by state space methods. SSM implemented the Kalman
Filter and related algorithms for model and state estimation.

Jerez et.al. (2011) [96] proposed an parameter estimation approach using E4 matlab
toolbox which is helpful for estimation of parameters. This allows certain computations
and analysis that would not otherwise be possible by traditional estimation methods.

The results of this study are expected to give an analysis of how the Kalman Filter
technique approximates the GARCH process and outperforms the standard GARCH MLE
based volatility forecasting model.

The remainder of the chapter is organized as follows. Next section, gives a brief
overview of the estimation results and defines the state space model. The theoretical part
of this thesis, performed using the E4 MATLAB toolbox is detailed. In later sections, the
empirical analysis is conducted by summarizing the GARCH(1,1) and GARCH-KF mod-
eling techniques together with their respective parameter estimates. Last section, discusses
the estimated volatility and evaluates their in-sample and out-of-sample forecasting perfor-
mances.

116
5.1 How to specify GARCH process to SS representation

using E4 Toolbox
E4 is a MATLAB Toolbox for econometric modeling of time series, it refers to the Spanish
Estimacion de modelos Econometricos en Espacio de los Estados, meaning ”State-Space
Estimation of Econometric Models.” The main model supported is a general state-space
(SS) form as discussed in section 3.7. The GARCH models are represented in state space
form and estimation is performed by E 4 toolbox for MATLAB.
For the selected index returns, the GARCH models corresponding to Equations 5.2
is estimated, and for modified form in Equation 5.5. As mentioned earlier, the model is
estimated with two approaches. First, the model is fitted using maximum likelihood as
described in Chapter 4. Second, the model is fitted via Kalman Filter by specifying a state
space form for the standardized returns (i.e., the GARCH-KF model).
The models with conditional heteroskedastic errors is first constituted in native model
specification format i.e. THD format of E4 toolbox. First, it is necessary to obtain the THD
formulation of: the mean and model equivalent to the ARCH, GARCH structure. The full
model can then be defined using the garc2thd function,
The method of representing models with GARCH errors to ARMA equivalent process
is described in detail by Bollerslev(1988) [123].
For a log return series yt , let εt be the innovation at time t. The strengths and weaknesses
of GARCH models over can easily be seen by focusing on the simplest GARCH(1,1) model
with a large yt−1 or ht−1 gives rise to a large ht . This means that a large yt−1 tends to be
followed by another large ht , generating, again, the well-known behavior of volatility clus-
tering in financial time series. The GARCH(1,1)-model includes one lag of the conditional
variance given by following equation

yt = εt ht (5.1)

ht2 = φ + αyt−1
2 2
+ β ht−1 (5.2)

The latter constraint on α + β implies that the unconditional variance is finite, whereas its
conditional variance ht2 evolves over time. As before, εt is often assumed to be a standard
normal or standardized Student-t distribution or generalized error distribution. in Equation

117
5.2. The α and β are referred to as ARCH and GARCH parameters, respectively.
To summarize, εt is an IID process with zero mean and variance of unity. In most ap-
plications εt is assumed to be IID(0,1). To ensure the existence of the conditional variance
and for avoiding the degeneration of the process φ > 0 and α, β ≥ 0 must hold.
This result is exactly the same as that of an ARMA(1,1) model with AR polynomial
1-(α + β ) which are explained in following equations see Rue S Tsay[107] and [124] for
details. Forecasts of a GARCH model can be obtained using methods similar to those of an
ARMA model. To compute the exact log-likelihood function of a SS model it is necessary
to define adequate initial values for the state vector and its covariance matrix. Adequate
initial conditions for each model are calculated using functions sete4opt .
Defining vt = yt2 − ht2 However, vt in general is not an iid sequence. Equation 5.3 is
an ARMA form for the squared series a yt2 . Thus, a GARCH model can be regarded as
an application of the ARMA process to the squared series i.e. yt2 . Using the unconditional
mean of an ARMA model, it follows that previous equation can be rewritten as

(1 − αB − β B)yt2 = φ + (1 − β B)vt (5.3)

where B is the backshift operator. This equation is analogous to an ARMA equation. The
following equation for GARCH process with parameters (α + β ) and β is used to redefine
the model structure for state space estimation.

yt2 = σ 2 + nt (5.4)

[1 − (α + β )B] nt = (1 − β B)vt (5.5)

with parameters (α + β ) and β . Here σ 2 the variance is given by[82]:


φ
σ 2 ≡ E(yt2 ) =
(1 − (α + β ))
Function e4min implements the numerical optimization procedure for the parameter esti-
mation. Hence, the estimation procedure for time series models based on the state space
KF is performed. It is shown in [96] that for GARCH processes, it is possible to have a
state space formulation and the efficient approach, based on the KF, in order to obtain an
estimation for the parameters and hence predictions. Forecasts for model with GARCH
errors are computed by the function foregarc.

118
5.2 GARCH Estimates using KF

By estimating the Equation 5.5 with (α + β ) and β as a free parameters, the excess kurtosis
observed using the two noises nt and vt is accommodated. This excess kurtosis reflects the
inability of the GARCH models to capture the unpredictable component of volatility.
We know that, in general, the kalman filter estimates will be consistent for model fitting
data under a GARCH process. But this may not necessarily be true in a forecasting context.
The only way to tell for sure is to fit the models and see whether they do better or worse
when we use them to forecast. This also allows us to assess how the GARCH-KF models
perform during forecasting.
The GARCH-KF models were estimated using E4 MATLAB toolbox[96] which is
based on exact maximum likelihood optimization. Model specification and forecasting
was also performed following the steps as shown in section 5.1.
The results of the estimated parameters of the models are summarized under respective
tables. Table 5.1 presents the results of fitting the standard GARCH(1,1) models to the sen-
sex data and Table 5.2 summarizes the result of GARCH(1,1)-KF model. Since, the models
are fitted using both maximum-likelihood and KF methods, we need to perform three dif-
ferent parameter estimations for a given model. Each column of the table reports the mean
estimate and standard deviation estimates of each parameter, along with the average value
of the t-test.
To provide a benchmark for comparison, the t-test criterion for the model parameter
itself is also reported. This is computed by dividing the mean estimate by the standard
deviation parameters to find the associated t-test value. To begin with the GARCH(1,1)
results shows, the mean parameter estimates are close to the mean returns for the index.
The variance model, for example, yields mean parameter estimates of 0.027385. The t-test
values are atleast 2 standard deviation apart for all the three parameters. This is expected as
it shows that the models are well specified under the maximum likelihood approach. When
the model is estimated, the mean parameter estimates should not be near the zero value in
relation to the true parameters. As expected, the statistics should indicate a nonzero value
of the parameters, and this is indeed the case.
The model estimates of GARCH(1,1) model after estimation are:

119
GARCH(1,1) model Parameter Estimates
Parameter Estimate Std. Error t-test
φ 0.027385 0.00593 4.6180
α 0.10127 0.0091045 11.1231
β 0.89225 0.008909 100.1522

Table 5.1: Garch(1,1) model Estimation

Turning next to the Kalman Filter results, it is apparent that our KF approach captures
significant excess kurtosis in the conditional distribution of returns.
The model estimates of GARCH(1,1)-KF model in state space form after estimation
are:

GARCH(1,1)-KF model Parameter Estimates


Parameter Estimate Std. Dev. t-test Gradient
σt 2.6820 0.8377 3.2015 0.0000
(α + β ) 0.9898 0.0047 -210.7738 0.0053
β 0.8971 0.0122 -73.4885 -0.0029

Table 5.2: Garch model Estimation with Kalman Filter

We know, however, as a check, we replicate below equations with the parameters of


the GARCH-KF parameters obtained by fitting the GARCH models with equivalent state
space representation to the SENSEX returns. Therefore, the transformed model to state
space for GARCH(1,1)-KF is as follows

yt2 = 2.6820 + nt

[1 − .9898B] nt = (1 − 0.8971B)vt

5.3 Measures of forecast accuracy


A group of measures derived from the forecast error are designed to evaluate forecasts
performance. To evaluate forecasts, different measures of forecast errors (MAE and MSE)

120
are employed. Mean errors (ME) are employed to assess whether the models over or under-
forecast return series. Among them, the most common overall accuracy measure is MSE.
Since the volatility of an asset return is not directly observable, comparing the fore-
casting performance of different volatility models is a challenge to data analysts. In the
literature, researchers have used out-of-sample forecasts and compare the volatility fore-
casts σt with the shock σ̂t in the forecasting sample to assess the forecasting performance
of a volatility model.
In what follows, is a brief discussion of some measures of forecasting performance that
are commonly used in the literature. Four measures which are used to evaluate the forecast
accuracy, namely, the mean square error (MSE), the root mean square error (RMSE), the
mean absolute error(MAE) and mean absolute percentage error(MAPE). They are defined
by

1 n
MSE = ∑ (σ̂t − σt )2
n t=1
s
1 n
RMSE = ∑ (σ̂t − σt )2
n t=1
1 n
MAE = ∑ |σ̂t − σt |
n t=1
1 n
MAPE = ∑ (|σ̂t − σt )/σt |
n t=1
(5.6)

where σ̂t is the forecast value and σt is the actual value calculated using equation(5.7).
Statistically, actual volatility is often estimated as the sample standard deviation

s
1 T
σ̂ = ∑ (rt − µ)2
T − 1 t=1
(5.7)

where rt is the return on day t, and µ is the average return over the T -day period. In
this context, the model which has minimum forecast error terms as MSE, RMSE, MAE and
MAPE, is the best volatility forecasting model
where e is the forecast error defined as the difference between the actual value and the
forecast value.

121
The lower the forecast error measure, the better the forecasting performance. However,
it does not necessarily mean that a lower MSE completely testifies to superior forecasting
ability, since the difference between the MSEs may be not significantly different from
zero. Therefore, it is important to check whether any reductions in MSEs are statistically
significant, rather than just compare the MSE of different forecasting models (Harris and
Sollis, 2003, p. 250) [6].

5.4 Analysis of empirical results

Following the estimation results in previous section, using the methodological estimation
process of state space method and kalman filter. This section discusses the estimated
volatilities derived by the selected modeling approaches. The resulting forecast error statis-
tics are compared in Table 5.4. The in and out-of-sample forecasting performance of these
different modeling approaches is evaluated later in this section. The respective predictive
power is looked at in section 5.4.2 by the comparison of out-of-sample forecast evaluation.
To be concise, the main results are simply summarized. Again as we were aiming for,
the average α and β values for the GARCH(1,1) and GARCH-KF volatility models are
similar, both of these models seem to fit significantly better. The results with respect to
forecasting performance are also similar as shown in Figure 5.1. Thus we find nothing in
the results that shows model is misfitting.
Overall, the results suggest that GARCH-KF models can play a important role in the
forecasting of GARCH models with the real data. If the appropriate GARCH model are
fitted via Kalman Filter, then a consistent estimator of the parameter is obtained for the
corresponding model. In addition, the GARCH-KF volatility model delivers forecasts that
have better MAEs, RMSEs and MAPEs.

5.4.1 Comparison of In Sample forecast GARCH(1,1) and GARCH-


KF

The comparison of the in-sample based forecast of volatilities illustrates that considering
the GARCH-KF model on one side, and the GARCH(1,1) model on the other hand side,

122
they show a very similar shape. We take a brief look at the in-sample volatility forecasts
produced by the fitted models shown in figure 5.1. As apparent the estimation through
Kalman Filter can be thought of as a smoothed version of GARCH(1,1) model.
For Kalman Filter based approach, the characteristics of the stochastic process of state
equation depend strongly on the estimated values for the parameter (α + β ) and β : while
β is highly significant and close to 0.89 , α is close to zero for the GARCH-KF model. At
the same time, the variance term σt is significantly different from zero. Hence, the model
turns out to behave like a random process that fluctuates randomly around a moving mean.

Estimated Volatility for SENSEX


35
GARCH(1,1)
GARCH(1,1)−KF

30

25
Volatility

20

15

10

0
Jan06 Nov06 Sep07 Jul08 May09 Mar10 Jan11 Nov11 Sep12 Jul13

Figure 5.1: In Sample Volatility estimate (GARCH(1,1) and GARH-KF)

The results of volatility estimated value by using GARCH(1,1) and GARCH-KF model
is shown in figure 5.1. In table 5.3 it clearly shows that the GARCH-KF model has less
forecast error values by using all four evaluation measures.
It is clear that the estimated volatilities produced by both the models display quite a
bit of similarity over the sample period. For the Sensex, the volatility range from a low
of 1.5 to a high of 32 in 2009 using GARCH(1,1) model. For the GARCH-KF model,
the estimated volatilities range is from 1.4 to 28 in the year 2009. It is also apparent that
the difference between the GARCH(1,1) and GARCH-KF volatility estimates are almost
similar, which is exactly what one would predict based on the model fitting results.

123
Forecast Error Statistics
GARCH(1,1) GARCH-KF
MSE 0.085 0.0721
RMSE 0.291 0.268
MAE 0.308 0.281
MAPE 0.315 0.297

Table 5.3: In-Sample Forecast Error Statistics (GARCH)

5.4.2 Comparison of Out of Sample forecast GARCH(1,1) and GARCH-


KF

After obtaining the parameter estimates from the daily index series, a period has to be
chosen for estimating parameters and a period for predicting volatility. Furthermore, 1-
day ahead forecasts are derived for the forecasting horizon of 30 days. The 1/1/2006 to
7/7/2013 of data are used to estimate the models. Thus, the first day for which an out-of
sample forecast is obtained is 08/07/2013.
Using the estimated models, sequential 1-day ahead forecasts are made. Hence, in total
30 daily volatility values are forecasted. With this setup, the models are required to predict
volatility for the above mentioned period. The out of sample forecast for GARCH(1,1) and
GARCH(1,1)-KF models are shown in figure 5.2.
Comparing the GARCH(1,1) model volatility forecasts and those produced by the
GARCH-KF model, GARCH(1,1) model seems to have the larger variance. This suggests
that the superior fit of GARCH-KF model could to some extent reflect its ability to track
the extremes in volatility better than the standard GARCH models. Significantly distinct
patterns in the out-of-sample forecasts is also not seen. The GARCH(1,1) model produces
forecasts with the highest variance than the GARCH-KF volatility model. A similar pattern
in the h-step out-of-sample forecast of volatility is evident from both the models, which is
consistent for both the models.
Figures 5.2 and 5.3 show the out-of-sample volatility estimates produced by the mod-
els for the SENSEX index. The actual volatility estimates is plotted for the purposes of

124
illustration. For comparison, the differences between the GARCH(1,1) and GARCH-KF
30 day ahead volatility estimates for each model is also plotted.

Out of Sample Volatility Forecast for SENSEX


3
GARCH(1,1)
GARCH(1,1)−KF
2.5
Volatility

1.5

0.5
02−Jul 07−Jul 13−Jul 19−Jul 25−Jul 31−Jul 06−Aug 12−Aug 18−Aug 24−Aug
Days (dd/mm/2013)

Figure 5.2: Out of Sample Forecast (GARCH(1,1) and GARH-KF)

Out of Sample Volatility Forecast (30 Day Ahead)


1.6
1.5
1.4
1.3
Volatility

1.2
1.1
1
0.9
0.8 Actual Volatility
0.7 GARCH(1,1)
GARCH(1,1)KF
0 5 10 15 20 25 30
Days

Figure 5.3: Volatility Forecast Comparison (GARCH(1,1) and GARH-KF)

The figure 5.3 shows the 30-day ahead point forecast of both the models plotted along
with the actual volatility, which is used as benchmark calculated using equation (5.7). It

125
Forecast Error Statistics
GARCH(1,1) GARCH-KF
MSE 0.0985 0.0790
RMSE 0.3138 0.2811
MAE 0.2828 0.2487
MAPE 0.3017 0.2695

Table 5.4: Out-of-Sample Forecast Error Statistics (GARCH)

seems that stochastic volatility has more appropriate forecast as it has lesser residual errors
when both models are estimated using maximum-likelihood based technique.
The results of volatility estimated value by using Garch(1,1) and GARCH-KF model
is shown in figure 5.1. In Table 5.4 it clearly shows that the GARCH-KF model has less
forecast error values by using all four evaluation measures.

126

Potrebbero piacerti anche