Professional Documents
Culture Documents
Use, Tsset, Line Generate, Line, Arch, Mgarch, Tsset, Estat Ic
Use, Tsset, Line Generate, Line, Arch, Mgarch, Tsset, Estat Ic
Use, Tsset, Line Generate, Line, Arch, Mgarch, Tsset, Estat Ic
Exchange rates
Based on the data financial data application on exchange rates from Brooks’ book.
List of new commands: use, tsset, line generate, line, arch, mgarch, tsset, estat
ic.
1. Cluster volatility
We follow up the example from the previous computer lab, using the same datafile with over 7,000
daily observations of three nominal exchange rates. Download the Stata format file from blackboard
and open it (see below).
use "C:\MANG6299\data\2019-11-15_MANG6299_ComputerLab8_Currencies.dta", clear
tsset t
For details on the construction of the variables, see section 0 of the previous computer lab. The plot
of the UK exchange rate below is expressed in per unit of US dollar. An increase of the exchange rate
is a depreciation of the currency. An investor would buy pounds only if it expected to appreciate (the
exchange rate is down). This is at odds with the typical presentation of financial assets you are used
to. The investor prefers a drop in the price of this asset, which is reflected in a return of negative
magnitude. Many people would prefer to work with the inverse of this variable which can be
interpreted as the price of the pound, with an appreciation being an increase in its price.
line GBP t
.9
.8
.7
GBP
.6
.5
Last week we already tested for ARCH effects, rejecting the null of constant volatility. We also
estimated the ARCH, GARCH and IGARCH models (see Table 1). Here we will present again the
GARCH(1,1) model, estimating the following two equations using the maximum likelihood estimator
𝑦𝑡 = 𝜇 + 𝑢𝑡
2 2
𝜎𝑡2 = 𝛼0 + 𝛼1 𝑢𝑡−1 + 𝛽1 𝜎𝑡−1
1
with 𝑢𝑡 being heteroskedastic and 𝑦𝑡 the first difference of the log of the exchange rate (r_gbp). All
parameters are expected to be positive.
. arch r_gbp, arch(1) garch(1)
//////Some output omitted\\\\\
Iteration 13: log likelihood = -3300.8638
This is the same result we obtained last week. The results for GARCH(1,1) can be found in column
3 of Table 1 while columns 1, 2 and 4 were estimated last week. Next, we will expand the
GARCH(1,1) to incorporate three more models in columns 5, 6 and 7 (see below).
The positive estimate on the `L1.earch' term implies that negative shocks result in a higher next
period conditional variance than positive shocks of the same sign. Therefore, the result for the
EGARCH asymmetry term is as we expected. Thus, the EGARCH results suggest that a strengthening
dollar (weakening pound) leads to lower next period volatility than when the pound strengthens by
the same amount.
There is one important issue regarding the above output. The software took 84 iterations to reach the
estimation. This is quite long since it usually takes less than couple of dozen iterations. Unlike OLS,
Maximum Likelihood sometimes fails to provide an estimate, and sometimes it reaches some wrong
value (i.e. they do not correspond to a maximum). This is not the case of the EGARCH model above
because it finally reached a solution, although it struggled in the way. However, be careful if the
software indicates “(backed up)”, “(not concave)” or “(not converge)” in the last iteration
(i.e. if it only happens in an intermediate iteration, you still have reached a good estimate). The results
would not be reliable. This is particularly common with the EGARCH model but it can happen with
other models as well.
1
If you prefer to treat the GBP as any other financial asset, create a new variable equal to the inverse of the exchange rate
(1/𝐺𝐵𝑃), where an appreciation would show a rise of the value. Apply the GARCH models to the new variable.
3
The GJR-GARCH(1,1) model adds one extra term to the GARC(1,1) equation
2 2 2
𝜎𝑡2 = 𝛼0 + 𝛼1 𝑢𝑡−1 + 𝛽1 𝜎𝑡−1 + 𝛾1 𝑢𝑡−1 𝐼𝑡−1
where 𝐼𝑡−1 = 1 if 𝑢𝑡−1 < 0 (and 0 otherwise). For a leverage effect, we would expect 𝛾1 > 0. Notice
that, if 𝑢𝑡−1 < 0, the total effect is 𝛼1 + 𝛾1, which is larger than when 𝑢𝑡−1 > 0 (𝛼1 ).
. arch r_gbp, arch(1) garch(1) tarch(1)
//////Some output omitted\\\\\
Iteration 13: log likelihood = -3299.5177
Similar to the EGARCH model, all ARCH, TARCH and GARCH terms are statistically significant.
We find a positive coefficient estimate on the `L1.tarch' term, which again is what we would expect:
according to the leverage effect explanation if we were modelling stock return volatilities. Negative
shocks have a larger effect than positive shocks.
4
The return of the portfolio is partly determined by its risk (proxied by the variance of asset returns).
The parameter δ can be interpreted as the risk premium. If 𝛿 is positive and statistically significant,
then increased risk, given by an increase in the conditional variance, leads to a rise in the mean return.
See Campbell et al (1997, Section 12.2) for additional discussion on the links between (G)ARCH-M
model and the CAPM and other asset pricing models.
. arch r_gbp, arch(1) garch(1) archm
//////Some output omitted\\\\\
Iteration 12: log likelihood = -3299.7337
Unfortunately, it does not seem the GARCH(1,1)-M fits our time series well. Our parameter estimate
𝛿̂ = 0.075 is not statistically significant. Therefore, the GARCH(1,1) should be preferred.
5
criteria, the GJR performs better than the EGARCH. The code below shows how to obtain the
AIC/BIC of these two models. It is the same procedure than with the ARMA models in previous labs.
. arch r_gbp, earch(1) egarch(1)
//////Output omitted\\\\\
. estat ic
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | N ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 7,141 . -3312.4 5 6634.8 6669.168
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] BIC note.
. estat ic
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | N ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 7,141 . -3299.734 5 6609.467 6643.835
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] BIC note.
According to AIC in Table 1, GJR would be the best model (just a bit better than the GARCH and at
the same level than the GARCH-M but remember 𝛿 is not statistically significant). According to BIC,
GARCH is the best model. IGARCH perform as well as the GARCH model, which suggests 𝛼1 +
𝛽1 = 0.9959 is truly close to 1.
The discussion above also shows that model uncertainty is also an important issue for volatility
models, as it was for ARMA models. Furthermore, what if additional lags of 𝜎𝑡2 were to be
considered. However, the consensus is the GARCH(1,1), and some of its extensions (as the ones
shown here), is already a good model so the gains of including extra parameters may not be enough
against the potential problem of overfitting the model. One more way we can compare volatility
models is by computing forecasts and check which one provides the smallest forecast errors. The
process is a bit more complex than ARMA models because 𝜎𝑡2 cannot be observed in reality. See Liu
and Shi (2013) for an comparison of different ARMA-GARCH models to forecast electricity prices.
Table 2 shows the case of another exchange rate: the Japanese yen (versus the US dollar). We have
chosen the ARCH(8) in column (2) because all coefficients are significant and none is negative. The
EGARCH is the best according to BIC and perform very well according to the AIC (second but only
by a small margin). However, notice the negative sign of 𝛾1 is opposite to our expectations, which
would mean a positive shock has a smaller effect than a negative one. According to AIC, ARCH(8)
performs surprisingly well, being the top choice. Still, the estimation of eight parameters in the
conditional variance equation raise the potential problem of overfitting the model.
The dataset has one remaining exchange rate (the Euro). This is a good opportunity for you to practice
your skills by analyzing these models one more time.
6
Table 1. Summary results of the models of volatility of the UK pound
(1) (2) (3) (4) (5) (6) (7)
ARCH ARCH GARCH IGARCH EGARCH GJR GARCH-M
7
3. Multivariate GARCH
So far, we have modelled the volatility of the two exchange rates as being completely independent
from each other. A more general framework would allow the dynamic behavior of currencies to affect
each other. This is the multivariate GARCH model (M-GARCH). The general M-GARCH model is
so flexible that it is very difficult for all the parameters to be estimated at the same time. For this
reason, there are many M-GARCH models that parameterize the problem more parsimoniously.
We estimate here the Constant Conditional Correlation (CCC) M-GARCH model of the UK pound
and the Japanese yen. The conditional variances are modeled as univariate GARCH models and the
conditional covariances are modeled as nonlinear functions of the conditional variances. It adds to
the model a new equation for the conditional covariance (𝜎12𝑡 )
𝜎12𝑡 = 𝜌12 𝜎1𝑡 𝜎2𝑡
where 𝜌12 is the conditional correlation parameter between 𝑢1𝑡 and 𝑢2𝑡 . It can be considered the
weight the nonlinear combinations of the conditional variance. It is assumed to be constant over the
full sample. Therefore, the dynamics of 𝜎12𝑡 is provided by the two conditional covariances. The
estimation is carried out by the command line:
mgarch ccc (r_gbp =) (r_jpy = ) , arch(1) garch(1)
//// output omitted \\\\
The output of the software is omitted to save space but the comparison of the parameter estimates
with the univariate GARCH(1,1) can be found in Table 3. Columns (1) and (2) are the same univariate
GARCH(1,1) obtained in Tables 1 and 2, respectively. The CCC M-GARCH(1,1) estimated above
can be found in column (3). The coefficients of the four equations are very similar to their univariate
counterparts. Round up to three digits, the extra parameter 𝜌12 is 0.212.
The Diagonal VECH is another M-GARCH model which provides a more flexible dynamic behavior.
It adds a new equation for the conditional covariance
𝜎12𝑡 = 𝛼012 + 𝛼112 𝑢1𝑡−1 𝑢2𝑡−1 + 𝛽112 𝜎12𝑡−1
Therefore, the model adds three new parameters. In total, the Diagonal VECH (DVECH) fits five
equations at the same time: two equations for the conditional means and three equations for the
conditional variances-covariances. Stata estimates all these parameters with the command line below.
The output is omitted but the coefficients (and standard errors) can be found in Table 3.
mgarch dvech (r_gbp =) (r_jpy = ) , arch(1) garch(1)
//// output omitted \\\\
The main criticism of the CCC model is that a constant 𝜌12 is not a very realistic assumption for a
framework that aims at modelling the co-movement of the two exchange rates. However, as we can
see from Table 3, the CCC M-GARCH model is more parsimonious than the diagonal VECH M-
GARCH model. It only adds one extra parameter to the univariate GARCH. In practice, the CCC
model is easy to fit. Furthermore, many times the diagonal VECH model cannot be estimated.
8
Table 3. Multivariate GARCH models
(1) (2) (3) (4)
GARCH GARCH CCC M-GARCH(1,1) DVECH M-GARCH(1,1)
GBP JPY GBP JPY GBP JPY Covar(G,J)
Even though we have over seven thousand observations, any of the following DVECH models would
produce an error message and fail to produce valid maximum likelihood estimates of the parameters
of the model
mgarch dvech (r_gbp =) (r_eur = ) , arch(1) garch(1)
mgarch dvech (r_jpy =) (r_eur = ) , arch(1) garch(1)
mgarch dvech (r_gbp =) (r_jpy = ) (r_eur = ), arch(1) garch(1)
Be aware you may wait a very long time for Stata to finish when fitting those models. Notice the last
command line is a three-exchange rate multivariate model, introducing the euro as well. Alternatively,
you may try to fit the M-ARCH(1) instead. This would reduce the number of parameters but would
keep the extra equation for the conditional variance.
References
Bollerslev, T. (1986) "Generalized Autoregressive Conditional Heteroskedasticity". Journal of
Econometrics 31 (3): 307–327
Campbell, J. Y., Lo, A. W. and MacKinlay, A. C. (1997), The Econometrics of Financial Markets,
Princeton University Press, Princeton.
Engle, R. F. (1982) "Autoregressive Conditional Heteroscedasticity with Estimates of the Variance
of United Kingdom Inflation". Econometrica 50 (4): 987–1007
Engle, R.F. (2004) "Risk and Volatility: Econometric Models and Financial Practice. American
Economic Review 94(3):405-420.
Engle, R. F. and Bollerslev, T. (1986), Modelling the Persistence of Conditional Variances,
Econometric Reviews, 5, 1–50.
9
Engle, R. F., Lilien, D. M. and Robins, R. P. (1987), Estimating Time Varying Risk Premia in the
Term Structure: The ARCH-M Model, Econometrica, 55, 591–407.
Glosten, L. R., Jagannathan, R. and Runkle, D. E. (1993) On the Relation Between the Expected
Value and the Volatility of the Nominal Excess Return on Stocks, The Journal of Finance 48(5),
1779–801
Liu, H. and Shi, J. (2013) "Applying ARMA–GARCH approaches to forecasting short-term
electricity prices." Energy Economics 37 (2013) 152–166.
Nelson, D.B. (1991) "Conditional Heteroskedasticity in Asset Returns: A New Approach".
Econometrica 59 (2): 347–370
Nelson, D. B. (1990). Stationarity and persistence in the GARCH(1,1) model. Econometric Theory
6: 318–334.
10