modelling volatility using eviews - cmi.comesa.int

130
Modelling and Forecasting Volatility in Financial Markets Using E-Views User Guide

Upload: others

Post on 24-Oct-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views

User Guide

Page 2: Modelling volatility using EViews - cmi.comesa.int
Page 3: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views

Prepared By

Dr Thomas Bwire

Senior Principal Economist

Bank of Uganda

Published By COMESA Monetary Institute (CMI)

Page 4: Modelling volatility using EViews - cmi.comesa.int

First Published 2019 by COMESA Monetary Institute C/O Kenya School of Monetary Studies P.O. Box 65041 – 00618 Noordin Road Nairobi, KENYA Tel: +254 – 20 – 8646207 http://cmi.comesa.int Copyright © 2019, COMESA Monetary Institute (CMI)

All rights reserved. Except for fully acknowledged short citations for

purposes of research and teaching, no part of this publication may be

reproduced or transmitted in any form or by any means without prior

permission from COMESA.

Disclaimer

The views expressed herein are those of the author and do not in any way

represent the official position of COMESA, its Member States, or the

affiliated Institution of the Author.

Typesetting and Design Mercy W. Macharia

[email protected]

Page 5: Modelling volatility using EViews - cmi.comesa.int

TABLE OF CONTENT

List of Figures ................................................................................................ vii

List of Tables ................................................................................................. viii

List of Acronyms ............................................................................................ ix

Preface .............................................................................................................. xi

Acknowledgements ....................................................................................... xii

1. INTRODUCTION TO MODELLING FINANCIAL MARKETS USING

E-VIEWS ............................................................................................ 1

1.1: EViews Software.................................................................................... 1

1.2: Getting Familiarity with EViews Window ......................................... 1

1.3: Getting Data into EViews .................................................................... 4

1.4: Viewing the Data ................................................................................... 9

2. FINANCIAL MARKETS VOLATILITY ..................................................... 13

2.1: Definition and Measurement of Volatility ....................................... 13

2.2: Demonstration of Empirical Properties of Financial Assets Return Using EViews .......................................................................... 15

3. MODELLING CONDITIONAL VOLATILITY ............................................. 27

3.1: Heteroskedasticity and Auto (Serial) correlation ............................ 27

3.1.1. Fitting autoregressive (integrated) moving average models in EViews ........ 29

3.2: Introduction to Modelling Conditional Volatility ........................... 41

3.2.1: The ARCH Effect ................................................................................. 45

3.2.2: The GARCH Model ............................................................................. 49

3.3: Models with Asymmetry ..................................................................... 53

3.3.1: The Threshold GARCH (TGARCH) model........................................ 53

3.3.2: The Exponential GARCH (EGARCH) Model .................................. 54

Page 6: Modelling volatility using EViews - cmi.comesa.int

vi |

3.4: Demonstrating the G(ARCH) and Related Models Estimations Using EViews Screens and Statistical Output Tables .................................................................................................... 55

3.4.1: Equation Estimation/Specification ......................................................... 56

3.4.2: Estimation Settings/ Method and Sample - obvious ................................ 59

4. MODELLING CONDITIONAL VOLATILITY IN A MULTIVARIATE

FRAMEWORK ................................................................................... 71

4.1: Introduction ......................................................................................... 71

4.2: The VECH Representation ................................................................ 72

4.3: The Diagonal VECH Representation ............................................... 74

4.4: The BEKK Representation ................................................................ 75

4.5: The Constant Conditional Correlation (CCC) Representation ..................................................................................... 76

4.6: Conditional Heteroskedasticity, Unit Roots and Cointegration ........................................................................................ 77

4.7: Demonstrating the Estimation of CPI and Exchange Rate Volatility within a Bi-variant GARCH(1,1) Framework using EViews screens and Statistical Output Tables ................................ 77

5. FORECASTING CONDITIONAL VOLATILITY AND FORECAST

PERFORMANCE EVALUATION ........................................................... 95

5.1: One-step-ahead Forecast .................................................................... 95

5.2: The j-step-ahead Forecasts ................................................................. 95

5.3: Forecast Evaluation ............................................................................. 96

5.4: Performing the Exchange Rate Forecast in a Univariate GARCH(1,1) Framework Using EViews Screens and Statistical Output Tables ..................................................................... 97

5.5: Performing the Forecast in a Multivariate GARCH(1,1) Framework Using EViews Screens and Statistical Output Tables .................................................................................................. 108

REFERENCES ................................................................................ 117

Page 7: Modelling volatility using EViews - cmi.comesa.int

vii |

List of Figures

Figure 1: Evolution of Ushs/USD nominal exchange rate ......................................... 17

Figure 2: Intraday % changes in nominal exchange rate .............................................. 19

Figure 3: Frequency distribution of intraday % changes of nominal

exchange rate ..................................................................................................... 21

Figure 4: Comparison of the Normal (solid line) and t– and GED

Distributions ...................................................................................................... 22

Figure 5: Correlogram ....................................................................................................... 24

Figure 6: Squares of log-returns ....................................................................................... 25

Figure 7: Inverse Roots of AR/MA Polynomial(s) ...................................................... 40

Figure 8: Autocorrelations decay: Exponential (left) or damped sine wave

(right) .................................................................................................................. 44

Figure 9: Normality of G(ARCH) errors........................................................................ 67

Figure 10: GARCH (1,1) Conditional variance-Measured .......................................... 68

Figure 11: Measured Conditional Covariance ................................................................ 90

Figure 12: In-the-Sample forecast performance ......................................................... 102

Figure 13: Actual and in-the-Sample forecast with confidence bands ................... 104

Figure 14: Depreciation forecast ................................................................................... 106

Figure 15: Nominal Exchange rate forecast ................................................................ 107

Figure 16: Historical and volatility forecast................................................................. 107

Figure 17: Inflation and Depreciation forecast .......................................................... 113

Figure 18: Inflation and Depreciation forecast .......................................................... 115

Page 8: Modelling volatility using EViews - cmi.comesa.int

viii |

List of Tables

Table 1: Residual serial correlation .................................................................................. 35

Table 2: Breusch-Godfrey Serial Correlation LM Test ................................................ 36

Table 3: ARMA(4,1) model Estimates ............................................................................ 38

Table 4: AR(1) model Estimates ...................................................................................... 39

Table 5: GARCH(1,1) with alternative restriction for ARCH-M in the

Variance equation ............................................................................................. 64

Table 6: Heteroskedasticity Test: ARCH ....................................................................... 66

Table 7: The General bi-variant mean model for Inflation ......................................... 81

Table 8: Estimates of the mean equation ....................................................................... 81

Table 9: EViews output for Diagonal BEKK Covariance specification ................... 85

Table 10: Diagonal BEKK estimates for bi-variant GARCH(1,1) ............................ 87

Table 11: E-Views output for Constant Conditional Correlation Covariance

specification ....................................................................................................... 91

Table 12: CCC estimates for bi-variant GARCH(1,1).................................................. 93

Page 9: Modelling volatility using EViews - cmi.comesa.int

ix |

List of Acronyms

ACF Autocorrelation function

AR Auto regressive

ARCH Autoregressive conditional heteroskedasticity

ARCH-M Autoregressive conditional heteroskedasticity in mean

ARMA Autoregressive moving average

BEKK Baba, Engel, Kraft and Kroner

BoU Bank of Uganda

C Constant

CCC Constant Conditional Correlation

CGARCH Component Generalized autoregressive conditional

heteroskedasticity

CMI COMESA Monetary Institute

COEF Coefficient

COMESA Common Market for Eastern and Southern Africa

CPI Consumer price index

D.G.P Data generating process

Docs Documents

D-W Durbin Watson

EGARCH Exponential Generalized autoregressive conditional

heteroskedasticity

EQN Equation

EViews Econometric Views

EXR Exchange rate

FIG Figure

GARCH Generalized autoregressive conditional heteroskedasticity

GED Generalized Error distribution

GENR Generate

I.I.D Identically and independently distributed

IGARCH Integrated Generalized autoregressive conditional

heteroskedasticity

IT Information technology

KSMS Kenya School of Monetary Studies

Page 10: Modelling volatility using EViews - cmi.comesa.int

x |

LB Lower bound

LM Lagrange multiplier

LOG Natural logarithm

MA Moving Average

MAE Mean Absolute Error

MAPE Mean Absolute Percentage Error

MEFMI Macroeconomic and Financial Management Institute

M-L Maximum-Likelihood

MPC Monetary policy committee

MSE Mean Square Error

NA Not available

NYSE New York Stock Exchange

OLS Ordinary least squares

PACF Partial autocorrelation function

PARCH Power Autoregressive conditional heteroskedasticity

PDF Portable document format

PROC Procedure

QML Quasi-maximum likelihood

RESID Residual

RHS Right hand side

RMSE Root Mean Squared Error

SA Seasonally adjusted

SE. Standard error

S&P Standard and Poor’s

Std Dev Standard deviation

TGARCH Threshold Generalized autoregressive conditional

heteroskedasticity

UB Upper bound

U.K United Kingdom

VaR Value at risk

VECH Vector error conditional heteroskedasticity

Page 11: Modelling volatility using EViews - cmi.comesa.int

xi |

Preface

The preparation of this User’s Guide followed a directive to COMESA

Monetary Institute (CMI) by the 22nd Meeting of the COMESA Committee

of Governors of Central Banks which was held in Bujumbura Burundi in

March 2017. Governors noted that financial markets volatility and the

associated volatility spillovers are a potential threat to financial stability and

can dampen prospects for economic growth.

The overall objective of the Guide is to serve as a knowledge product to

provide member central banks with analytical guide for modelling and

forecasting volatility in financial markets both in univariate and multivariate

frameworks. The guide provides step by step approach to central banks

modellers using EViews software to enable them adequately measure and

forecast both direct and spill over effects due to volatility in prices of

financial market assets. The guide is developed in such a manner that it

strikes a balance in theoretical and practical skills in modelling and

forecasting volatility in both in univariate and multivariate setting and lean

heavily on learning by doing approach.

It is hoped that the Guide will enable Central Bank modellers to undertake

rigorous and robust volatility analysis, which will enable decision makers to

undertake measures to mitigate the adverse effects of financial markets

uncertainty. It is also hoped that the Guide will be used by COMESA

member central banks as a reference material to train their staff.

Ibrahim A. Zeidy Chief Executive Officer

Page 12: Modelling volatility using EViews - cmi.comesa.int

xii |

Acknowledgements

The Author was grateful to the COMESA Monetary Institute (CMI), who

on behalf of the COMESA Committee of Governors provided the

opportunity to prepare the User’s Guide. He acknowledged technical and

logical support from the Director of CMI, Mr. Ibrahim Zeidy and the

Senior Economist, Dr. Lucas Njoroge. The Author also acknowledged the

assistance of CMI support staff as well as staff in the Member States Central

Banks for any information provided during the User’s Guide preparation.

The Author especially acknowledges comments from the participants of the

Validation Workshop held from 24–28 April, 2017 in Nairobi, Kenya that

provided the final inputs to the User’s Guide. The workshop was attended

by participants from the following COMESA member countries’ Central

Banks: Burundi, Djibouti, DR Congo, Egypt, Ethiopia, Kenya, Mauritius,

Sudan, Swaziland, Uganda, Zambia, and Zimbabwe.

Page 13: Modelling volatility using EViews - cmi.comesa.int

Chapter 1

Introduction to Modelling Financial

Markets Using E-views

1.1: EViews Software

EViews – short form of Econometric Views is a user-friendly and powerful

statistical software package designed to provide sophisticated data analysis

and forecasting tools. The software comes with an extensive user guideline

which contains many useful examples/explanations/tutorials and is

extremely well-presented. Once you have gained basic familiarity with the

basic concepts and operations of the program, you should be able to

perform most operations without consulting the guideline. Moreover, the

program has a very extensive help menu (one of the entries in the Main

menu) which is simple to use and sufficient for most users, so one may not

again need to consult the guideline when conducting statistical analysis. This

introductory chapter aims to familiarise trainees with the basic fundamentals

of working with EViews pertinent to the purpose at hand, i.e. analysis of

financial markets. The detailed and in-depth exposition of EViews

fundamentals are given in the User’s Guide I which is in the drop-down menu

of the help menu in the earlier versions of EViews, or can be found in the

documents in PDF Docs file in the drop-down menu of the help menu in the

latest versions of EViews, notably EViews 9.5.All illustrations and output in

this guideline derive from EViews 8.0

1.2: Getting Familiarity with EViews Window

Launch the program (i.e. double click on EViews icon) - this assumes the

program has been properly installed on your computer (the installation is

usually done by authorized bank IT staff). This brings forth the EViews

Page 14: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

2 |

window as in the screen print below. We want to familiarize ourselves with

the title bar, main menu, command window, work space and status

line in there.

Title bar Main Menu

Command Window

Work space

Status line

At the very top of the main window, is the title bar, labelled EViews and is

generally darker, provided EViews is the active program in windows.

Immediately below the title bar is the main menu. If you move the cursor to

an entry in the main menu, say Object and click on the left mouse button, a

drop-down menu will appear. Some of the items in the drop-down menu, as

shown in the print screen below are listed in black while others are in gray.

Black items are executable while the gray items are not or simply unavailable.

Clicking on a black entry in the drop-down menu selects the highlighted item.

Page 15: Modelling volatility using EViews - cmi.comesa.int

............................................................... Introduction to Modelling Financial Markets Using E-views

3 |

Menu items

Greyed menu items not available

Darkened menu items are available

Drop down menu

Below the menu bar is the command window space in which EViews

commands such as log, first difference transformations are entered or typed.

Each of the commands is executed as soon as you hit the ENTER button

on the key board. The area in the middle of EViews window is the work

space and is where various objects that EViews creates are displayed. It is

actually analogous to a sheet of paper in an exercise book or work book on

your desk. To close EViews, select File/Exit from the main menu or click

on the x button in the upper right-hand corner of the EViews window. If

necessary, EViews will warn you and provide you with the opportunity to

save any unsaved work. EViews work file is saved in the same way as any

other computer-generated document. Select File in the main menu, then

Save As… in the drop- down menu and save the file. Subsequently, click on

Save through the File menu or as usual through the key board operations to

save any changes to the file. It is advisable that you save your work

continuously.

Page 16: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

4 |

1.3: Getting Data into EViews

For purposes of illustration, I have iteratively used both univariate and

multivariate data for Uganda with varied frequencies, depending on the

issues at hand. This has been provided in excel sheets in a folder I have

named, for convenience, COMESA_DATA_2017.

We will start with the data on one financial markets variable, driven not

only by economic fundamentals but also speculative market behaviour and

whose disruptive volatility is of great concern to monetary policy makers.

This is the nominal Ushs/USD exchange rate, observed at daily frequency

for the period 1 Jan 2005 to 3 Feb 2016. It is a very large dataset,

comprising some 4,051 observations, intentionally compiled to mimic

features of financial market variables which are observed at a much higher

frequency such as the sort of S&P composite index and /or NYSE

international 100 index. This data file in COMESA_DATA_2017 folder is

named Daily exr.xlsx. Note that this is not the sort of data you often use in

much of the macroeconomic time series analysis when undertaking

independent research.

Given the data, the first step in subjecting financial markets volatility

models (which we introduce later) to statistical analysis, is to read data into

an EViews work file. EViews obviously provides sophisticated tools for

reading in data from a variety of common data formats and sources, but

here I will demonstrate one of the easiest of the ways of doing so from an

Excel file.

Launch the EViews program to see the EViews window we’ve already

described above. On the Main menu, left click on File and in the drop-down

menu, point the cursor at NEW and navigate through to Work file. Click on

Work file and it’s in the Work file dialog box which pops (given in the

screen shot below) that the user uses to supply critical data information to

the software.

Page 17: Modelling volatility using EViews - cmi.comesa.int

............................................................... Introduction to Modelling Financial Markets Using E-views

5 |

Beginning with the work file structure type, choose from the drop-down menu,

the series type that you may be having at your disposal. Note that because

our data is dated and is at a regular frequency, we choose dated-regular

frequency (EViews default entry). Similarly, under Date specification,

choose from the drop-down menu, daily-7-day week. And supply the start

date and the end date (in the form: month, date, year e.g. 1/01/2005 for

start date and 2/03/2016 for end data). Although Work file name is

optional, here we provide, for convenience, COMESA_2017. These entries

are what we see in the EViews screen print above.

Click OK. A new window opens with two variables; C and resid. As we all

know, these two, namely constant (also known as intercept) and residual

appear as a given in a time series model and serve to capture important

information about the regressor or dependent variable. Holding everything

else constant, the minimum value that the dependent variable can take is

equal to the magnitude of the constant (be it positive or negative), subject

to its statistical significance and the model meeting standard statistical

criteria for evaluating the estimated results. Because it’s not claimed that the

Page 18: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

6 |

whole of economics or even the whole of economic theory can be

encompassed in a model, but a well devised model can bring out certain

features of interdependence among economic quantities that are not easily

comprehended without its help (Beach, 1958), the resid in a model captures,

among others, the unexplained component of the dependent variable.

The page (at the bottom of the window) is by default named untitled, but

can be renamed by right clicking on the name “untitled” and selecting

rename Work file page.

Constant & residual

Page we will need to baptize

Sample range & size

The window gives both the Range and Sample of the data, spanning

1/01/2005 to 2/03/2016, or some 4051 0bservations. It is at this point that

we load the data. To do so, interactively, open the excel data file Daily

exr.xlsx contained in COMESA_DATA_2017 folder. In the excel file, select

and copy the content in the column named EXR, the cell EXR inclusive,

ensuring you have copied both the series name and the series data. In the

open EViews window, check on the Quick command in the Main menu

and choose Empty group (edit series). A click on this produces a

spreadsheet similar to that in excel.

Page 19: Modelling volatility using EViews - cmi.comesa.int

............................................................... Introduction to Modelling Financial Markets Using E-views

7 |

The first column displays the sample range period, spanning from the start

to the end dates that you supplied earlier on. The first two rows are by

default empty. And unlike the second, the first is highlighted in blue (or)

colour. Either of these can be used to paste in the data, albeit with different

implications, which you might want to practically check. In the sheet, dates

only begin from the third row of the first column. Click on the second cell

in the second column, and while maintaining the cursor in there, make a

right hand click on your mouse and paste in the copied data. As you will see,

this simple way of importing the data also brings on board the series name,

exr, which then automatically becomes visible in the work space –

increasing the number of entries to three (c, exr, and resid). Once you are

sure the copy and paste command is complete, click on the x command

which appears at the top most right-hand side corner of the open excel-like

sheet window (containing the data you called in), and in the prompt

message, select yes. A window with three series names, c, exr, and resid

appears as in the print screen below.

Page 20: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

8 |

Series brought aboard.

Note that any mismatch between the actual series length and length

between the start and end date may prompt the software to reject the data

paste command. Also, in the event that during the copying, you omitted the

series initial, the software will assign the series a default name, usually

SER01 for the first series column, and so on in case of multiple series. You

can replace/rename the SER0i, i=1, 2,..,k with the actual series names or do

it more easily through the Genr (generate) command in the work space

window. Alternatively, highlight the variable/series you want to rename and

while keeping the cursor in there, right click on the mouse and choose

rename, then provide the name for the variable/series in question. Also,

take note that at times, actually quite often, the initial you give the series

may matter, and may be rejected by EViews especially if the initial is a

preserve of the software. In the event that this is so, try changing the initial

until it is acceptable. As mentioned earlier, there are many ways of

importing data into EViews, but the simplicity and complexity associated

with each of these ways is user specific. It is important that as a user, you

choose the easiest way – the above being simpler in my judgement.

Page 21: Modelling volatility using EViews - cmi.comesa.int

............................................................... Introduction to Modelling Financial Markets Using E-views

9 |

1.4: Viewing the Data

Make sure to verify that the data on exr is the actual data you copied in

from excel. To do this, click on exr to highlight the series and while

maintaining a cursor there, make a right-hand side click on your mouse and

select open. Data on exr will be displayed just as is shown in the EViews

print screen herewith.

Scroll up to the start of the data or down to the end of it

Data stops at 1/10/2016 instead of 2/03/2016

Missing observations

Always remember, whenever you enter data into EViews, to check it very

carefully so to ensure it is what you expect it to be and that it has not been

distorted in the process of calling it into EViews. Checking your data is

boring, but vital. In fact, if necessary, plot it because this gives you the

opportunity to get familiar with the data’s important characteristics -

features that make modelling even far more exciting. If you do not know

what the features of your data are, you are not going to be able to develop a

particularly good model of them. In financial markets modelling and time

series analysis in general, it is vital that you know your data.

Page 22: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

10 |

In this particular case, you will realize that our data stops at 1/10/2016 and

not 2/03/2016 as in excel for reasons we may well explore. About 24

observations, for the period 1/11/2016 all through to 2/03/2016 are

marked as NA or missing observations. We have to re-size our sample to

avoid the many NAs as is now. To do this, first, we close the open excel

like sheet by checking the x command at the top most right-hand side

corner of the sheet window. While in the Work space area, click on

Proc(second last icon at the extreme left-hand side corner of the work area

window) and choose Restructure/Resize Current Page.... In the new

window that opens, edit End date to a date consistent with that in the

EViews work file data, i.e. 1/10/2016, click OK, followed by Yes in the

prompt message to continue. This action downsizes the sample size by 24

NA observations to 4027 effective observations.

We might want to name this EViews page to be able to distinguish it as

we’re likely to have several of these. To do this, point the cursor in the sheet

given as Untitled and right click in it and in the drop-down menu, check

Rename Work file Page… In the new small window that pops up, under

name for page, let us write daily_exr and click OK. This effectively baptizes

the sheet in EViews working space.

Baptized work page

Page 23: Modelling volatility using EViews - cmi.comesa.int

............................................................... Introduction to Modelling Financial Markets Using E-views

11 |

Multiple series can also be read into EViews (by the same procedure above).

Similarly, viewing the same can also be done in one command. All you need

to do is to select the multiple series, but one at a time, while holding down

the Ctrl key on your key board. This highlights all series of interest. While

maintaining the cursor in the highlighted series, right click on your mouse

and choose open as a group. Data will be displayed for all the variables.

Examine the data to ensure it’s the actual data you intended to read into

EViews. The open window can then be closed using the x command.

You are now ready to undertake any data manipulation and analysis. In

what follows, we mimic practically the salient features of financial markets

volatility, starting with preliminaries of the definition and measurement of

volatility (in the tradition).

Page 24: Modelling volatility using EViews - cmi.comesa.int
Page 25: Modelling volatility using EViews - cmi.comesa.int

Chapter 2

Financial Markets Volatility

2.1: Definition and Measurement of Volatility

Risk, or in general uncertainty, associated with investment in financial assets,

is measured in terms of asset returns volatility, i.e. the degree to which financial

prices or returns fluctuate. Simply put, it is the time varying risk associated with

returns on an asset. However, the relationship between volatility and risk is

tenuous. Risk is more often associated with small or negative returns.

Volatility, on the other hand, makes no such distinction. Volatility is not an

observable metric, so its measurement is necessary.

In a simplistic world of finance practices, as in some circles of the academia

and policy arena, volatility is computed as a sample standard deviation of

returns associated with a financial asset – possibly motivated by the

simplicity with which it can be computed. In statistics, computation of a

sample standard deviation assumes a series of observations (N) on a

financial asset, with returns (Rt) on investing in it. The standard deviation

( ) of Rt is then derived as:

N

t

t RRN 1

21

(1)

Where R is the mean return and is a distribution free parameter which

depends on the dynamics of the underlying stochastic process and whether

or not the parameters are time varying.

Very often, when is used to measure volatility, the users usually assume

that the underlying stochastic process generating the returns follows a well

behaved normal distribution. In reality however, this has been shown not to

Page 26: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

14 |

always hold because in practice and as will be shown here, the underlying

stochastic process exhibits pronounced departures from the standard

Gaussian assumption. Besides, Eqn.1 only permits computation of historical

or realized volatility, i.e. the standard deviation of financial returns on an asset

computed over a window of a pre-specified number of past trading periods,

but the time frame over which it is computed has serious interpretational

implications. If it is computed over a very short horizon, realized volatility

will be too noisy while if the period is too long, it will not be so relevant for

today. Moreover, the statistical properties of a sample mean make it a very

inaccurate estimate of the true mean, especially in small samples because of

the influence of extremes, and as noted above, it does not always draw from

a normal distribution. Moreover, it is logically inconsistent to assume that

the variance is constant for a period such as one year ending today and at

the same time be constant for the year ending on the previous day but with

a different value – this raises the possibility that volatility is dynamic.

Importantly, asset holders are interested in the volatility of returns over the

holding period going forward and not over some historical past. This

forward-looking view of risk requires measures that are able to estimate

conditional volatility, i.e. expected volatility at some future time (say t+h) that is

deliberately informed by new information set available at time t (t ). It

means that tomorrow's volatility estimate depends on or is conditional on

certain new information available today. 1 Volatility is of great concern

because: valuation methods in finance and portfolio allocations in

Markowitz mean-variance framework depend on volatility and volatility

affects the spread between long-and short-term interest rates. It is also used

in the calculation of value at risk (VaR) of the financial position in risk

management. At policy level, financial market volatility and the associated

volatility spillovers are a potential threat to financial stability and prospects

1 The other form of volatility common in the literature, but not considered here is implied

volatility, which is volatility that delivers a no-arbitrage option pricing, and derives from Black-Scholes model. The value of a financial asset is priced on the basis of the assets own price, the exercise price, the time to maturity, the risk-free interest rate and the assets expected standard deviation. The approach however is criticized because the assumed geometric Brownian motion for the prices of the underlying asset may not hold in practice and the resultant implied volatility has been shown to be larger than that obtained by conditional volatility measures.

Page 27: Modelling volatility using EViews - cmi.comesa.int

................................................................................................................ Financial Markets Volatility

15 |

for economy-wide growth. The downside is that volatility of an asset is not

observable, so it’s modelling is necessary. Although in literature, numerous

conditional volatility models have been suggested to capture the

characteristics of return for an asset, here we explore the Auto Regressive

Conditional Heteroskedasticity (ARCH) and their many extensions, in

particular, Generalized Auto Regressive Conditional Heteroskedasticity

(GARCH) type models.

2.2: Demonstration of Empirical Properties of Financial Assets

Return Using EViews

Financial markets literature identifies several salient features of financial

asset returns:

1. Returns on a financial asset evolve over-time in a continuous manner –

a feature we can demonstrate with ease using the daily nominal

Ushs/USD exchange rate series in EViews. To do this, we first

transform exr series to natural logarithms (this is done for reasons that

will become familiar in due course, if not familiar yet). To proceed,

make active the open EViews Daily_exr page above. In the command

window, type a command of the form genr lexr = log(exr), then press

the enter button on your key board. A new series, lexr is added onto

the list of variables as shown in the EViews screen print below.

Page 28: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

16 |

Supplied command

Natural logarithm of nominal exchange rate – a variable we’ve created

To proceed, double click on lexr to open the series and in the window,

click on View icon in there and chose and click on graph. By default,

EViews highlight Basic type under Option Pages and Line & Symbol

under graph type as in the screen here.

EViews generous highlights

Page 29: Modelling volatility using EViews - cmi.comesa.int

................................................................................................................ Financial Markets Volatility

17 |

Click OK and you will see a graph given in Fig. 1. You could as well use

the Quick icon at the top- most window for the same results, except

that here, instead of opening the series data points, you have to

highlight the series name. All sorts of statistical manipulation of the

graph (s) are available in the graph window. It is still possible, whilst in

the graph window to retrieve the series spread sheet. Click on View and

in the drop-down menu, select Spread Sheet.

Figure 1: Evolution of Ushs/USD nominal exchange rate

It is a good idea to save such output. With the graph (s) on the screen,

right click on the mouse and choose copy to clipboard. You can then

paste the graph in an open word document. You could also, by the

same procedure, choose save graph to disk. It is also possible to keep

all results in the same work space. To do so, select Freeze and then

Name. This procedure allows you to appropriately assign a name to

your graph, e.g. Figure01.Note that the graph remains on the screen.

You can only navigate away from the graph window with the x

command and choosing yes in a small window that pops up.

Back to Fig. 1, the rather smooth curve shows what has happened to

the nominal exchange rate in Uganda over the last 11 years. We see a

Page 30: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

18 |

shift in level, but a stable and somewhat appreciated exchange rate

before 2007 and before the financial crisis of 2008 and a steep sustained

depreciation and intermittent appreciation thereafter. At the

commencement of 2005, one USD was priced at about Ushs. 1,750 and

it cost about Ushs 3,500 in the first week of February 2016. The

exchange rate hit all time high of Ushs 3,700 per USD at the close of

September, 2015. This implies that one dollar invested in the foreign

exchange market at the commencement of 2005 had multiplied 1.99

times by the beginning of February 2016, while the shilling had

depreciated by 99.1% over the 11-yearperiod, amounting to an average

annual depreciation of roughly 10%.

2. Returns to financial assets meander in a fashion that contains periods

of high volatility followed by periods of lower volatility. In other

words, visually, periods of large movements in prices alternate with

periods during which prices hardly change, causing volatility clusters–

otherwise coined as volatility clustering. Because variations in returns over

time are not constant, the data generating process (stochastic process)

is said to be heteroskedastic. And it is this feature that gave birth to

conditional heteroscedasticity (Engel, 1982) of asset returns – a subject of

interest in financial assets modelling. Relatedly, is the existence of

asymmetric movement of the volatility, i.e. a large (small) change in

prices is more likely followed by a large (small) price change, i.e.

persistence in price movements.

Volatility clustering of financial asset returns can be demonstrated with

ease, and for some reason, it starts with transforming lexr series, in our

case, into intraday changes (or day-on-day depreciation). In the

command window, type genr dlexr = lexr-lexr(-1) and execute by

taping on the enter button on the key board. A new series, dlexr is

added onto the list of variables.

If we double check on dlexr, the series opens and repeating the

procedure for producing Fig. 1, we generate Fig. 2 for volatility

clustering.

Page 31: Modelling volatility using EViews - cmi.comesa.int

................................................................................................................ Financial Markets Volatility

19 |

Figure 2: Intraday % changes in nominal exchange rate

While the picture of the level data in Fig. 1is appealing, it is the relative

price change over the holding period that really matters. Thus,

investors, portfolio and risk managers and monetary policy makers

focus attention on the relative intraday percentage change or

depreciation or returns as shown in Fig. 2. Clearly, the exchange rate

return series is centred around zero, with periods of large volatility,

followed by periods of relative tranquillity. We can note the world and

domestic events particularly in 2007, 2008-9, 2011/12 and more

recently 2014/15 when the size of depreciation and/or appreciation

dwarfs all the other changes. Volatile periods are hectic periods and

intuitively reflect heightened uncertainty. The usual suspect for such

uncertainty is uncertainty about the fundamentals in the economy. But

from an econometric point of view, uncertainty about fundamentals

only explains a moderate portion of the observed financial market

volatility. Comprehensive measurement of volatility, including its

forecast requires simple time series models beyond the fundamentals.

Page 32: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

20 |

3. The other largely noticeable feature is the non-normal empirical

distribution of asset returns. Usually, the empirical density function has

a higher peak around its mean, but fatter tails than that of the

corresponding normal distribution or high excess kurtosis. The proof

of this is quite straight forward.

Under normality, the unconditional fourth moment or kurtosis is given

by

322

4

t

t

E

Ek

: 34 tE (2)

Where 12 tE

But as mentioned earlier, volatility is meaningful only if it’s deliberately

informed by new information set available at time t so considering

expectations, conditional fourth moment becomes

222

1

44

1

ttt

ttt

eEE

eEEk

(3)

Substituting 3 into 2, we get

2222

1

44

1

ttt

ttt

eEE

eEEk

(4)

So that 222

4

1

3

t

tk

for 12

1 tt eE and 34 tteE .

3322

4

t

tk

Showing, indeed that asset returns are not Gaussian normal. In

addition, the distribution of returns is typically negatively skewed,

largely because large negative movements in financial markets are not

usually matched by equally large positive movements.

To subject this notion to data, double click on dlexr, but because the

latest we have for this is a graph, we must get back the spread sheet

through the View icon, by checking spreadsheet, which should give

Page 33: Modelling volatility using EViews - cmi.comesa.int

................................................................................................................ Financial Markets Volatility

21 |

us the data points. In the open spread sheet, click on View and choose

Descriptive Statistics & Tests, and navigate through to Histogram

and Stats. Check on Histogram and Stats as shown in the EViews

print screen. Check on Histogram and Stats to produce Fig. 3.

Road map

Figure 3: Frequency distribution of intraday % changes of nominal exchange rate

Page 34: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

22 |

Indeed, kurtosis is excess at 30.7 and the distribution is negatively

skewed(Skewness of -0.92).Therefore, because there is a good reason

to believe that the asset return has a higher probability of a very large

loss or gain than indicated by the normal distribution; one might want

to estimate Maximum-Likelihood (M-L) using student’s t–distribution

and/or Generalized Error distribution (GED), which comparatively,

approximates a normal distribution as the sample size becomes

relatively large as shown in Figure 4.

Figure 4: Comparison of the Normal (solid line) and t– and GED Distributions

Den

sity

0.0

0.1

0.2

0.3

Den

sity

0.0

0.1

0.2

0.3

0.4

−4 −2 0 2 4 −4 −2 0 2 4

The t-distribution in particular places a greater likelihood on large

realizations than does the normal distribution. The good news is both

student’s t–distribution and GED tend to approximate a normal

distribution as t , and are explicitly given as options in EViews

estimations of the G(ARCH) models.

4. It has also been shown that the mean of log-return series is close to

zero (a feature clearly depicted in Fig. 2), which is intuitive from an

econometric perspective. If we assume the log-return on an asset at

time t to take the form:

)log()log( 1 ttt ppr , (5)

Where tp is the price level of the asset at time t. If

tr – essentially

differenced log of tp is stationary, then it follows that

tp itself is non-

stationary or is a random walk process around trend, something

synonymous with the plot in Fig.1. In time series econometrics, the

Page 35: Modelling volatility using EViews - cmi.comesa.int

................................................................................................................ Financial Markets Volatility

23 |

data generating process (d.g.p) such as that for tp is said to contain a

unit root or unit roots, which is eliminated by transforming the series

into its differences. And if tp can become stationary upon first

differencing, it’s said to be integrated of order one or 1I .

It follows therefore that if 1~ Ip t, then )0(~log Ipr tt is

stationary or mean reverting, a behaviour akin to the plot in Fig. 2. In

time series, there are important distinctions between a stationary or

0I series and a non-stationary or 1I process. 0I Series fluctuate

around its mean (or is mean reverting) with a finite variance that does

not depend on time while its 1I variant wanders widely. 0I Series

has a limited memory of its past behaviour, while 1I series has

infinitely long memory i.e. innovations in the system permanently

affects the process. And as shown inFig.5, the autocorrelations of an

0I series decline rapidly to zero as the lag increases, while they decay

to zero very slowly in the case of 1I series.

Fig. 5 is produced from autocorrelation numbers over a 20-period

span. To do this, double click on lexr to open the spread sheet, and

under View, check Correlogram.... In the window that opens,

EViews by default checks in Level and chooses 36 lags to include.

Ireduced this to 20 for tractability. Click OK to see the following

output for Correlogram of LEXR. Repeating a similar process, but

checking first difference instead (which is dlexr) delivers Correlogram

of DLEXR.

Page 36: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

24 |

Figure 5: Correlogram

Using non-stationary series in econometric analysis has been shown to

bear dire consequences. Non-stationary economic time series are

commonly characterized by strong trend components, i.e. a

deterministic and/or stochastic trend or some combination of the two.

As a consequence, many of these are said to contain a unit root or

simply non-stationary, that is, the variables in question may have a time

variant mean and/or non-constant variance. Working with such series

in their levels while analysing economic relationships has a high

likelihood of giving results that are economically meaningless –a

symptom that Granger and Newbold (1974) call spurious regression. This is

often characterised by significant t-statistic and a high explanatory

power, even when the regressors are economically unrelated to the

variable being explained. Moreover, no inference can be deduced from

such results since the least-square estimates are not consistent and the

customary tests of statistical inference, namely the ‘‘F’’ and ‘‘t’’ ratio test

statistics do not have the limiting distributions (Enders, 2010). Simply

put, non-stationary series may generate poor forecasts.

5. The other common feature of financial asset returns is that we do not

observe autocorrelation in levels, but we do with squares of log-

returns. As shown in Fig. 6, the autocorrelations of variance, and

particularly those of mean absolute deviation stay positive and

Page 37: Modelling volatility using EViews - cmi.comesa.int

................................................................................................................ Financial Markets Volatility

25 |

significantly above zero for all lags. To demonstrate autocorrelation

with squares of log-returns, we transform dlexr to sq_dlexr using the

following command: genr dlexr_sq = dlexr^2, which we execute by

tapping enter button on the key board. And as before, graph sq_dlexr

to get Fig. 6.

Figure 6: Squares of log-returns

Page 38: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

26 |

Exercise 1

We have used daily frequency data on nominal exchange rate for Uganda in

the foregoing discussion to mimic the silent known features typical of

financial markets variables, the sort of S&P composite index. We have

provided similar data; in a separate folder we have named Exercise data. All

data is contained in a file given as Guideline Exercises data.xlsx, with two

sheets; daily_exr and multiple. This exercise requires you to use data on 5-

day week nominal exchange rate for Uganda, spanning September 01, 2005

to June 01, 2017 or some 2928 observations, given in daily_exr sheet of the

file to:

1. Demonstrate that returns on financial asset;

i) Evolve over-time in a continuous manner

ii) Meander in a fashion of clusters

iii) Has a higher peak around its mean, high excess kurtosis and that

returns are typically negatively skewed.

iv) Squares of log-returns display serial correlation; and

2. Demonstrate that that the autocorrelations of dlexr decay rapidly to

zero while those of lexr decay slowly as the lag increases.

Page 39: Modelling volatility using EViews - cmi.comesa.int

Chapter 3

Modelling Conditional Volatility

3.1: Heteroskedasticity and Auto (Serial) Correlation

We have shown and also demonstrated that stochastic processes generating

financial asset returns among other features are heteroskedastic and that the

residuals are serially or auto correlated. It is important that we gain insights

into these twin econometric problems and importantly their implications on

regression coefficient. Only then shall we appreciate that pertinent

corrective modelling measure, of which autoregressive moving average

(ARMA) and the auto regressive conditional heteroskedasticity (ARCH)

models and related extensions thereof, must be undertaken. To underscore

these twin heteroskedasticity and serial correlation concepts in

macroeconomic and financial time series data, consider a standard but the

simplest stationary univariate model for a random stochastic variable, yt,

observed over a sequence of time t = 1... T:

lainedun

t

lained

tt yy

expexp

1

(5)

The equation implies that the variable, y, at time t is generated by its own

past behaviour, i.e. its own lags – the explained part and a disturbance (or

residual) term t -the unknown part. In econometrics,

t is assumed to be

governed by several standard classical or Gauss-Markov assumptions,

usually condensed as ),0.(~ 2 Nt, i.e. residuals are distributed as normal

with zero mean, and constant or time invariant variance – homoskedastic

residuals. This in principal is what econometricians call white noise process.

Page 40: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

28 |

An additional assumption about the behaviour of t is that

0 sttstt EC ; st . This means that the residuals in period t

are uncorrelated with those in period s, where period s is own past. This

behaviour is particularly important when we come to producing forecasts,

since it implies that the correlation structure between sty

and ty is the

same as that between ty and

sty , i.e. we can extrapolate backwards-looking

relationships into forward-looking relationships to yield forecasts of future

values of the series.

Providing, 0tE , 22 tE and 0sttE ; st hold, then

),0.(..~ 2 diit, i.e.

t are identically and independently distributed as

normal with zero mean and constant variance, These are the classical

Gauss-Markov simplifying assumptions that ensures a pure white noise

process. However, in contrast and in practice, residuals of financial and in

as many instances macroeconomic time series data exhibit a behaviour

which is such that:

a) 22 itE , i.e. residuals are heteroskedastic, which means

variance that is varying over time.

b) 0, 1 ttE , i.e. residuals are autocorrelated (a problem of serial

correlation) - a situation where there is interdependence in the

behaviour of residuals over time.

The concern is whether the d.g.p riddled with heteroskedastic and

autocorrelated residuals, i.e. departure from the standard Gauss-Markov

assumptions warrants a worry when modelling financial and

macroeconomic time series data. Certainly, it’s worrisome and this is why.

While developments in econometrics theory suggests that even with

heteroskedastic residuals, the popular ordinary least squares (OLS)

estimator, (in eqn. 5) is still consistent (i.e. we get the correct coefficient

values especially as the sample becomes reasonably large) and is reasonably

efficient (in terms of the variance of ), the real problem is that standard

errors (s.e ( )) are not correct. As a result, the t- and F-tests are no longer

valid and inference based on them could be awfully misleading. Residual

Page 41: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

29 |

heteroskedastic behaviour is modelled, as we will show, by the

autoregressive conditional heteroskedasticity (ARCH) techniques and

related extensions thereof to obtain more efficient coefficient estimates.

Ensuring that the crucial assumption of time independence of residuals

holds is entirely an art craft of the modeller as it is purely a modelling aspect.

It requires that the modeller fits an appropriate ARMA process.

3.1.1. Fitting autoregressive (integrated) moving average models in

EViews

We will now describe how to test for and deal with serial correlation, i.e.

how to fit AR, MA and ARMA processes in practice. To see the

dependence structure of residuals in a random walk process, we will assume

for ease of exposition, an AR(1)process given as in (5) by,

ttt yy 1

Where ),0(~ 2 Nt, and additionally, the restriction that 1 - for mean

reversion to hold so that yt, is a stationary AR(1) process.

Showing the interdependence structure of it requires that the RHS is

expressed in terms of t only, a task easily achieved by backward recursive

substitution. Thus, given

ttt yy 1

tttt yy )( 12

2

2

1 tttt yy

)( 23

2

1 ttttt yy

3

3

2

2

1 ttttt yy

Repeating the back substitution 1j times, we obtain

jt

j

jt

j

tttt yy

)1(

1

2

2

1 ...

=

1

0

j

i

jt

j

it

i y , which still depends onjty .

Page 42: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

30 |

However, given the restriction that 1 , then as j , 0 jt

j y ,

such that

0i

it

i

ty . (6)

This expression is an MA representation of the AR process.

As we show in detail under the build-up to conditional volatility, serial

correlation arises because residuals for periods not too far apart, such ast ,

1t and so on are related, but this dependence decay gradually to zero as

t either exponentially if 0 , or like a damped sine wave if 0 ,

providing 1 holds.

To rid the stochastic process of serial correlation, the process is sequentially

estimated, up to an order sufficient to remove any remaining serial

correlation. Usually, we want a model with as few lags as possible to get a

parsimonious model, but at the same time we want enough lags to remove

autocorrelation of the residuals. The stationarity condition for general

)( pAR processes is for the inverted roots of the lag polynomial to lie inside

the unit circle.

Unlike the AR(1) process, the simplest class of the moving average (MA)

process, the MA(1) process, given by eqn. 7 is stationary, i.e. has mean,

variance and auto covariance that does not depend on t.

1 ttty (7)

Where ),0(~ 2 Ntand 1

By definition, from eqn. 7,

)()( 1 ttt EyE

)()( 1 tt EE

0

Page 43: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

31 |

)()( 2

0 tt yEyVar

= }){( 2

1 ttE

= )2( 1

2

1

22

ttttE

= )1( 22

And indeed

1;0

1;),(

2

s

syyC sstt

Thus, for any value of , the mean, variance and auto covariance of the

MA(1) process simply does not depend on t, so the process is stationary.

The autocorrelation function for the MA(1) process is then

1;0

1;1 2

0 s

ss

s

Thus the MA(1) process is 1-dependent.

It follows thus that the specification of the ARMA (p,q) process is given by:

;...... 22112

2

1 componentqMA

qtqtt

componetpAR

tpt

p

ttty

),0(~ 2 Nt (8)

As with AR diagnostics, the estimated ARMA process is (covariance)

stationary if all the inverted AR and MA roots lie inside the unit circle. And

in addition, if the ARMA model is correctly specified, the autocorrelation

function (ACF) and partial autocorrelation function (PACF) of the residuals

from the model should be nearly white noise.

If in eq.5-7 the log of yt in levels is in non-stationary form or if it’s found to

contain a unit or unit roots, it would require to be differenced the

appropriate number of times, usually given as d times to induce stationarity.

The number of times that yt would be differenced until it becomes stationary

is its order of integration. In such a case we would instead state the process

in eq. 7 as autoregressive integrated moving average -ARIMA, incorporating

Page 44: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

32 |

the order of integration explicitly in the modelling process, and so it

becomes ARIMA (p,d,q), with p - being the order of the AR process; d - the

order of integration and q - the order of the MA process. Lower order MA

models have in practice been found to be more useful in econometric

modelling than higher order MA models. Note that in all our usage in this

guideline, yt is assumed to take the definition we’re already very familiar with,

i.e. dlexr = lexr - lexr(-1), which by construction is already stationary so

the d.g.p is simply ARMA.

In the following, monthly frequency data on nominal exchange rate,

available in COMESA_2017 folder as Monthly_exr.xls excel file – some

241 observations spanning 1997m01 to 2017m01 is used. I will assume that

we can, as of now, easily call in this data to the EViews work file we have

used before. We shall name the page monthly_exr, using the procedure

described earlier on. We then transform exr series to natural logarithms (lexr)

and dlexr, i.e. m-o-m depreciation. This brings a screen with three series of

exr, lexr, dlexr and by default, c and resid. The data, despite being of a high

frequency nature is not adjusted for seasonal effects as this would contradict

the assumption of rational behaviour in financial markets, particularly

because the seasonality here is not regular (Bwire, Opolot and Anguyo

2013). The first task is to show that the residuals from a basic specification

of dlexr are serially correlated. We will use the screen print below to

illustrate how this is accomplished. Click on Quick icon at the top of the

command window, and in the drop down menu, select Estimate

Equation....., indeed as is shown by the arrows.

Page 45: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

33 |

Road map

Choose Estimate Equation. This action returns an Equation Estimation

window, in which under Equation specification, we have to supply a

specification of the equation we want to estimate, in the order DLEXR

c(dependent variable followed by explanatory terms, with equation terms

separated by space). By default, both estimation method, and the sample

range are already provided, but can be changed if there is a reason to do so.

These entries are shown in the screen print below.

Page 46: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

34 |

Regression Specification

Various Estimation techniques: Scroll through for appropriate – here OLS

Sample range – freely adjustable

At this stage, click OK and the resulting results table is what is extracted as

Table 1 in the text. The results table has two parts: the first part shows the

dependent variable, method of estimation, date and time the estimation was

done, the sample and included number of obervations (after any

adjustment). It’s not often useful to report this upper part of the table and

here I do for exposition purposes only (and in this case only). The second

part is the estimated output –including all the available standard statistical

criteria for evaluating the estimated results.

Page 47: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

35 |

Table 1: Residual serial correlation

Dependent Variable: DLEXR

Method: Least Squares Date: 03/20/17 Time: 10:52

Sample (adjusted): 1997M02 2017M01

Included observations: 240 after adjustments Variable Coefficient Std. Error t-Statistic Prob.

C 0.005165 0.001492 3.462719 0.0006

R-squared 0.000000 Mean dependent var 0.005165

Adjusted R-squared 0.000000 S.D. dependent var 0.023109

S.E. of regression 0.023109 Akaike info criterion -4.693057

Sum squared resid 0.127629 Schwarz criterion -4.678554 Log likelihood 564.1668 Hannan-Quinn criter. -4.687213

Durbin-Watson stat 1.290424

An indicative way of detecting serially correlated residuals is the Durbin-

Watson (hereafter, D-W) statistic (usually appeared in the lower panel of the

regression output, as in Table1). Using a rule of tumb, a model is said to be

statistically free of serial correlation if 2WD , though in applied work,

judgement may be required especially that sometimes, you may have to

accept a model with moderate levels of serial correlation. In this application,

reading from Table 1, the D-W statistic is only about 1.29, which is too low

- raising the suspicion that the residuals could be serially correlated.

Beyond the D-W statistic, there are formal serial correlation tests embedded

in EViews routines – which we now demonstrate. To confirm the suspicion

of serial correlation detected by the D-W statistic described above, while in

the results window given in Table 1, click on View and navigate through to

Residual Diagnostics. Following the arrow, you see the two available test

checks for serial correlation namely Correlogram-Q-Statistics... and

Serial Correlation LM Test.... In both tests, the null hypothesis is that of

‘no serial correlation’. We will check out this, one at a time, beginning with

Correlogram-Q-Statistics..., and replace 20 for 36 lags in the Lag

Specification. This should yield output similar to those in Fig. 5 detailed

in the screen shot below.

Page 48: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

36 |

Clearly, the p-values of the Q-Stat at all lags are significantly different from

zero, suggesting we can safely reject the null of no serial correlation in the

residuals.

We will also implement Serial Correlation LM Test....in the same window

following the same procedure as above, though with 2 lags as default in Lag

Specification to yield the extract in Table 2.

Table 2: Breusch-Godfrey Serial Correlation LM Test

F-statistic 17.22048 Prob. F(2,237) 0.0000

Obs*R-squared 30.45166 Prob. Chi-Square(2) 0.0000

Consistent with the Q-Stat and D-W statistic evaluated earlier, the F-statistic

0000.0220.17237,2 F and Chi-Square-statistic 000.0452.3022 ,

both given in Table 2suggest we can safely reject the null of no serial

correlation in the residuals, as the corresponding p-values are statistically

different from zero.

This proof of existence of serially correlated residuals requires that we have

to incorporate AR lags in the basic specification, keeping in mind that we

want a model with as few AR parameters as possible to get a parsimonious

Page 49: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

37 |

model, but at the same time we want enough AR parameters to remove any

remaining autocorrelation in the residuals.

An indicative way to identifying the ARMA structure is a visual inspection

of the autocorrelations and partial autocorrelations (Box-Jenkins, 1976) of

the DLEXR process, depicted in the screen shot above or in the right-hand

side panel of Fig. 5. Clearly, we see one extended bar at lag 1 for both the

autocorrelation and partial autocorrelation. Loosely speaking, the

autocorrelation is the AR term while the partial autocorrelation is the MA

term. Therefore, with one extended bar at lag 1 for both autocorrelation

and partial autocorrelation suggests one AR term (AR(1)) and one MA term

(MA(1)), which is ARMA(1,1) process. Note however that this easy to

identify scheme for ARMA structure is only feasible in a univariate case like

the one in our case and for a covariance stationary process. It is not possible

for 1n . Besides, this is a visual inspection scheme and may not necessarily

be robust to the formal identification procedure, described here-under.

The formal identification scheme involves fitting an ARMA model, with a

sufficient number of autoregressive parameters that ensures time

independence of the residuals, and as shown in section 3.1 that the MA

process is 1-dependent, one MA term. This is the long-tested general to specific

approach. Accordingly, here we began with k=4 AR parameters and for the

reason above, one MA component. Note however that for the sort of

frequency used in this illustration, i.e. monthly data, the generality of the

results may not be lost if the MA component is omitted altogether– the

reason being that a month’s period in financial markets is long enough for

the effect of previous month noise to have neutralized or even dissipated.

Such noise may however be very pronounced with higher frequency data

such as the daily observations. Nonetheless, for the benefit of doubt, the

MA(1) component is included. With this in mind, click on Quick icon at

the top of the command window, select Estimate Equation..... and suppy

a specification of the form DLEXR c ar(1)ar(2) ar(3) ar(4) ma(1).Noting that

by default, both estimation method, and the sample range are already

provided. Check OK to produce results extracted in Table 3:

Page 50: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

38 |

Table 3: ARMA(4,1) model Estimates

Variable Coefficient Std. Error t-Statistic Prob.

C 0.005141 0.001942 2.647304 0.0087

AR(1) -0.162363 0.416970 -0.389387 0.6974

AR(2) 0.158856 0.166143 0.956137 0.3400 AR(3) -0.008071 0.070508 -0.114474 0.9090

AR(4) -0.108533 0.068274 -1.589676 0.1133

MA(1) 0.534596 0.417367 1.280879 0.2015 R-squared 0.138359 Adjusted R-squared 0.119628

S.E. of regression 0.021794 Durbin-Watson stat 1.998234

Sum squared resid 0.109241 Inverted AR Roots .41+.37i .41-.37i -.50+.33i -.50-.33i

Inverted MA Roots -.53

Consistent with the prior that the MA component could be irrelevant for the

kind of data frequency considered in this illustration for financial data, the

MA(1) term, with a p-value of 0.2015 is indeed unimportant. Like the MA(1)

coefficient, all the AR parameters are apparently insignificant. Moreover,

implementing the model Residual Diagnostics following the procedures

described above the Q-static for some lags, notably the 11th – 15th are either

insignificant or borderline significantly different from zero. Nonetheless, all

other statistics seem to be parsimonious, i.e. the D-W statistic is 1.998,

which is very close to ranges where absence of serial correlation cannot be

safely rejected and the inverted root of the lag polynomials (inverted AR

and MA roots) are all inside the unit circle i.e. less than one in absolute

terms, which is consistent with the stationarity restriction imposed on and

parameters in the AR and MA equations, respectively, in section 3.1.

However, whilst the insignificance of the AR terms may be interpreted as

absence of evidence, it does not necessarily suggest that the d.g.p is devoid

of a dynamic structure – and could infact be a result of model

mispecification – in this case over parametization .As is the norm in

econometric modelling process, we have to drop regression terms

sequentially through general to specific approach, but with a particular

interest in the statistical performance of the resulting models. We dropped

Page 51: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

39 |

first, the MA(1) term for the same reasons given above and then the AR

terms, one at a time beginning with AR(4) term, then AR(3), and eventually

AR(2). With the exception of AR(1) model structure, all higher order AR

terms in all the other specifications were insignificant and as in the general

case given in Table 3, the Q-static for the 11th – 15th lags are either

insignificant or borderline significantly different from zero – which in effect

suggests 1AR terms are not relevant. This reduces the appropriate d.g.p

in this class to AR(1) model, for which results are extracted in Table 4.As

can be seen, the AR(1) coefficient (0.354) is highly significant at the 1%

level of significance (p-value = 0.0000) and the D-W statistic (1.97) and the

inverted roots of the lag polynomial (0.35) are consistent with the absence

of serial correlation and the stationarity restriction imposed on parameter

in the AR equation, respectively in section 3.1.

Table 4: AR(1) model Estimates

Variable Coefficient Std. Error t-Statistic Prob.

DLEXR -- C 0.005268 0.002170 2.427636 0.0159

AR(1) 0.353713 0.060684 5.828735 0.0000 R-squared 0.125378 Adjusted R-squared 0.121687

S.E. of regression 0.021679 Durbin-Watson stat 1.969633

Inverted AR Roots .35 Notes: -- denotes the dependent variable

If you do the model Residual Diagnostics following the procedures

described above, you will see that consistent with the D-W statistic,

Breusch-Godfrey Serial Correlation LM Test yields 22 = 0.537 (0.765)

and Q-statistic probabilities are all above 10 percent, upholding the view

that we cannot safely reject the null hypothesis of no serial correlation in

AR(1) residuals.

Finally, we will demonstrate how to display the ARMA structure (inverted

AR roots). To do so, whilst in the estimated results window given in Table

Page 52: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

40 |

4, select from the menu of this very estimated output, View/ARMA

Structure... and open the ARMA Diagnostic Views dialog box. We are

interested in inverse roots of the AR and/or MA characteristic polynomial,

one of the options on the left-hand side of the dialog box, which is already

selected by default. Check Graph on the right-hand side, to produce, as in

Figure 7, the roots in the complex plane. The horizontal axis is the real part

and the vertical axis is the imaginary part of the AR root.

Figure 7: Inverse Roots of AR/MA Polynomial(s)

Exercise 2

Exercise 2 makes use of the data used in exercise 1, i.e. data on 5-day week

nominal exchange rate for Uganda, spanning September 01, 2005 to June 01,

2017 or some 2928 observations. Based on the data:

1. Estimate a basic equationtty 0

, where dlexryt , and

demonstrate statistically that the model residuals are autocorrelated and

explain why testing for this kind of residuals behaviour is worthwhile

doing before a model can be used for statistical inference. .

2. Describe how the problem in (1) above can be dealt with in practice

-1.5

-1.0

-0.5

0.0

0.5

1.0

1.5

-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5

AR

roo

ts

Page 53: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

41 |

3. Based on (2) above, fit an appropriate ARMA process for dlexr and

demonstrate statistically that this fitted model is free from serial

correlation

4. Demonstrate that the inverted roots of the lag-polynomial from the

fitted model lies inside the unit circle.

3.2: Introduction to Modelling Conditional Volatility

As mentioned earlier, uncertainty or risk plays an important role in financial

analysis and is usually measured with volatility. But as alluded to, volatility

of an asset is not observable, so it’s modelling is necessary. Based on the

constructed model, volatility can be both measured and predicted. Asset

holders are interested in the volatility of returns over the holding period,

not over some historical period. This forward-looking view of risk means

that it is important to be able to estimate and forecast the risk associated

with holding a particular asset. Although in literature, numerous volatility

models have been suggested to capture the characteristics of return for an

asset, here we explore the Auto Regressive Conditional Heteroskedasticity

(ARCH) and Generalized Auto Regressive Conditional Heteroskedasticity

(GARCH) type models.

As a starting point, consider the conventional AR(1) process in eqn. 5 given

as:

ttt yy 1 ;

Where t = 1, 2, ..., T, ),0.(..~ 2 diitand 1 so that

ty is a stationary

AR(1) process. If indeed ty is generated by this process, then it can be

shown that the mean and variance (covariance) of ty are constant or are

unconditional.

As we have shown, ttt yy 1

, behaved as above, in MA

representation is simply

Page 54: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

42 |

0i

it

i

ty .

Based on this, it is straight forward to show that:

0

)(i

it

i

t EyE

= )(0

i

it

i E

= 0.

)()( 2

tt yEyV

=

2

0i

it

iE

= 2

3

3

2

2

1 ... ttttE

=

...... 3

3

2

2

13

3

2

2

1 ttttttttE

= E ( ...2

3

62

2

42

1

22

tttt

{cross terms like jt

ji

where ji })

= 0...2624222

= 2 ( ...1 642 )

=

0

22

i

i

Since 1 , this infinite sum is convergent, so using the well-known

geometric series result that

0 1

1

i

i

rr when 1r

The proof of this is straight forward. Assume an infinite geometric seriesS ,

defined as

Page 55: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

43 |

1i

iarS Where 1r

...32 arararaS (a)

Multiplying through by r , becomes

...432 ararararrS (b)

Subtract (b) from (a) to give

....... 4322 arararararararSS

r

aS

aSr

1

1

So we have

2

2

0

22

01

)(

i

i

tyV . (9)

Showing that the mean and variance of the AR(1)process do not depend on

t provided 1 . This is the unconditional mean and variance ofty .

However, the covariance shows the residuals are serially correlated and the

proof of this is straight forward.

2

2

1,

s

sstt yyC (10)

It follows that the autocorrelation function for the AR(1) process will be

ss

s

0

(11)

Showing that the AR(1) process has non-zero autocorrelations at all lags,

but these decay to 0 as s because 1 (either exponentially if 0 ,

or like a damped sine wave if 0 ).To illustrate this, let us assume

20,...,2,1s and also assume that, 4.0 , i.e. positive but less than one

Page 56: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

44 |

and 4.0 , i.e. negative but less than one in absolute terms. If we

simulate these numbers in excel and plot them, we see indeed that at all lags,

the autocorrelations are non-zero and decay to 0 as s , but fashioned

differently, as shown in Figure 8.

Figure 8: Autocorrelations decay: Exponential (left) or damped sine wave (right)

The conditional mean of ty refers to the mean of

ty , conditional on

information set available at time it . Denoting this historical information

set available at time it asit , ,...2,1i , and assuming the same d.g.p

for ty given above, the conditional mean of

ty is given by

1| titt yyE (12)

And the conditional variance of ty is given by

2

2 ||

t

ittitt EyV

(13)

Consistent with the behaviour we have seen in Fig. 2, it is straight forward

from this expression that the conditional variance is time varying – a feature

seasoned econometricians call heteroskedasticity. An important question

though is how long t should be in calculating conditional volatility. As

mentioned earlier, if the period is too short, say one past year, it will be too

noisy and if it is too long, say past 30 years or more, such a long memory is

just not so relevant for today. The solution, according to Engel (2004, p.406,

in AER) is autoregressive conditional heteroskedasticity (ARCH) process, a process

which describes the forecast variance in terms of current observations. That

Page 57: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

45 |

is, the ARCH model, rather than use short or long sample standard deviations, takes

weighted averages of past squared forecast errors, a type of weighted variance which gives

more influence to recent information and less to the distant past, making the ARCH

model a simple generalization of the sample variance. We now turn to the ARCH

model in detail.

3.2.1: The ARCH Effect

Defined by Engel (1982), t for the ARCH model is:

21

2

110 ttt v (14)

Where 1,0..~ diivt , i.e. white noise process such that 12 v , tv

and 1t

are independent of each other, i.e. 0, 1 ttvC

, and 0,

1 are

constants and strictly positive, i.e. 00

, 10 1 .Unlike the

unconditional and conditional mean, both of which are zero, the unconditional

variance is non-zero and is given as:

1

02

0

2

1

0

2

11

2

2

110

2

110

1

2

2

2

0

2

1

1

t

t

tt

t

tt

tttt

E

E

EE

E

EvE

EEEE

Like the unconditional mean, the unconditional variance is unaffected by

the presence of the ARCH error process.

Given that 12 v , implies the conditional variance is influenced by the ARCH

error process defined in Eqn. 14, and in a manner consistent with the

Page 58: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

46 |

propositions of the asset pricing models. The risk premium of holding a

financial asset is the expected return on the asset over the holding period

and the variance of that return. Indeed, it can be shown that,

2

110

2

110

1

22 ||

t

titttitt vEhE

(15)

Thus, th , or conditional variance of

t is dependent on the realized value of

the past squared forecast errors, 2

1t . This implies that if the realized value

of 2

1t is large, h in period t will be large as well. Given this, th is said to

follow a first-order autoregressive, denoted ARCH(1). We just noted that in

an ARCH model, the unconditional and conditional expectations of t are

both zero. On the contrary, th is an autoregressive process resulting in

conditional heteroskedastic errors i.e. depends on the squared error term

from the last period ( 2

1t ). Each of the coefficients 0 and

1 are restricted

to be strictly positive to ensure the conditional variance satisfies certain

regularity conditions, including the non-negativity constraint and the

restriction on1 , i.e. 10 1 ensures stability of the process. It therefore

follows that since 1 and 2

1t cannot be negative, the minimum value that

th can take is0 . Thus, the volatility of {yt} is increasing in

0 and1 which

implies any unusually large shock in tv will be associated with a persistently

large variance in the {t } sequence, i.e. the larger

1 is, the larger the

persistence.

The ARCH(1) process in Eqn. 15 has been extended in several interesting

ways, including higher order ARCH processes – the Engel’s (1982) original

ARCH (q) model, to other univariate time series models, bivariate as well as

multivariate regression models and to systems of equations.

The AR(p)-ARCH(q) model form of Eqn. 5 is given as:

Page 59: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

47 |

p

i

titit yy1

;

(16)

Where 2

1

1

2

0

q

i

ititt v ; 1,0...~ diivt and 1

The ARCH(q) multiple regression model is given as:

k

i

titity1

0 x

(17)

where 2

1

1

2

0

q

i

ititt v ; 1,0...~ diivt and 1

Where itx is a vector of lagged exogenous explanatory variables, including

yt.

Equations (16) and (17) can be extended to include dummy variables in the

model for the conditional mean if there is a reason to capture particular

features of the market e.g. day-of-the- week’ effects.

For brevity, assuming daily data, and if we let 5,...,1i such that 1

(Monday), ..., and 5 (Friday), then the model adjusts to

k

i

t

l

ltlitit Dxy1

5

1

0 (18)

Where 2

1

1

2

0

q

i

ititt v ; 1,0...~ diivt, 1 and

0

1ltD ;

if daily feature is observed, zero otherwise, 00 and 0,...,, 21 q .

Generalizing the ARCH models to systems of equations (the multivariate

ARCH model) is a natural extension of the original specification.

Page 60: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

48 |

3.2.1.1 The ARCH-M model

The ARCH in mean (ARCH-M) is an extension to the basic ARCH

framework to allow the mean of ty to depend on its own th (Engle et al.,

1987). The model, relevant in financial applications is used to relate the

expected return on an asset to the expected asset risk. A risk-averse agent

will require compensation or risk premium for holding a long-term risky

asset. Since an asset’s riskiness is measured byth , it follows that the greater

th

of returns, the greater the risk premium necessary to induce the agent to

hold the long-term risky asset, i.e. the risk premium is an increasing

function of th of returns. Thus, the ARCH-M is of the form:

ttt

t

hy

; 0 (19)

Where: ty = excess return for holding a long-term asset relative to the risk

free one-period Treasury bond

t = risk premium necessary to induce the risk-averse agent to hold

the long- term risky asset rather than the risk free one-period Treasury

bond.

= is a measure of the risk-return trade-off

th = the ARCH(q) process, defined as:

q

i

itith1

2

0 , and

t = shock to the excess return on the long-term risky asset.

Note that holding a risky asset makes sense only if the tt yE 1.

Moreover, providing th is constant (i.e., if 0...21 q ) the

ARCH-M Model degenerates into the traditional case of a constant risk

premium.

Other variants of this ARCH-M model are:

ttt

t

hy

; 0 : (20)

Page 61: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

49 |

Where conditional standard deviation is used in place of conditional

variance, and

ttt

t

hy

log ; 0 (21)

Where the log of conditional variance is used in place of conditional

variance

Due to the large persistence in volatility, ARCH models typically require 5-8

lags of 2

t to adequately model th or fit the data. Moreover, to avoid

problems associated with a negative conditional variance it is necessary to

impose restrictions on the parameters of the model. Consequently, in

practice the estimation of ARCH models is not always straight forward.

Given this, Bollerslev (1986) extends the ARCH model to be an ARMA

process, i.e. allows for a more lag structure: the generalized ARCH

(GARCH) model.

3.2.2: The GARCH Model

Under the GARCH model, th is modelled as a function of lagged values of

2

t and th . In general, assuming a dgp for the sequence {yt} in (5) and

following Engel’s (1982) generalized definition of t for the ARCH model

as in (14), t for the GARCH (p, q) model is:

5.0

1 1

2

0

q

i

p

j

jtjititt hv

(22)

where 1,0...~ diivt ; 0q ; 0p ;

00 ;

0i , qi ,...,2,1 and

0j , pj ,...,2,1 .

The sufficient condition for covariance stationarity of the process t is for

q

i

p

j ji1 11 .

Page 62: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

50 |

It is straightforward to show from eqn. 22 that

The unconditional variance of t becomes:

q

i

p

j

ji

tV

1 1

02

1

And the conditional variance is:

q

i

p

i

jtjitit hh1 1

2

0 (23)

And since tv is a white noise process, the conditional and unconditional means

of t are equal to zero.

This generalized GARCH (p, q) model in eqn. 23 allows for ARMA

components in theth . It has been shown in applied settings that a GARCH

(p, q) model with low values of q and p provides a better fit to the data than

an ARCH (q) model with a high value of q.

In general, if we suppose in eqn.23that 0p and so are all values of j ,

and 1q , the GARCH (p, q) model collapses to an ARCH(1) or GARCH

(0,1) model. Thus, an ordinary ARCH model is a special case of a GARCH

specification in which there are no lagged forecast variances in the th

equation.

Key points to NOTE in GARCH Estimation

Estimating a GARCH process typically involves an estimation of two

interrelated equations:

a) tit

p

i

it yy

1

; pi ,...,1 Mean equation.

Page 63: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

51 |

Where

5.0

1 1

2

0

q

i

p

j

jtjititt hv

b)

q

i

p

i

jtjitit hh1 1

2

0 Variance equation.

1. The two equations are related in that th is the conditional variance of

t , hence t of the GARCH process is the conditional variance of the

mean equation. In fact 2

t is itself notth - and knowledge of this is

straightforward.

We know by definition that 5.0

ttt hv ttt hv22 .

Showing that 2

t is not th itself.

2. GARCH (1, 1) model is the most popular form of conditional volatility,

especially for financial data where volatility shocks are very persistent.

As such, eqn. 23 reduces to:

11

2

110 ttt hh (24)

i) As shown, th is a function of a constant,

0 , news about volatility

from the previous period, measured as the lag of 2

t from the

mean equation (the ARCH term) and the previous period’s

forecast variance: 1th (the GARCH term).

ii) If 01 , there is no volatility clustering

iii) If 01 , there is absence of a GARCH term in th

iv) GARCH (1, 1) process for t is weakly stationary if and only if

111 .

v) Volatility persistence is captured by 11 , i.e. the degree of

autoregressive decay of the squared residuals.

Page 64: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

52 |

vi) Conditional volatility increases with large values of both 1 and 1 ,

but in different ways. The response of thto new information is an

increasing function of the magnitude of 1 . And the larger the

value of 1 , the more is the autoregressive persistence of the th.

vii) The value of 1 must be strictly positive.

3.2.2.1: The GARCH-M model

Same as ARCH-M model above, except that th in GARCH (1,1) frame

work is:

11

2

110 ttt hh

So as shown before, the variance appears in the mean of the sequence {ty }

explicitly. The sequence {ty } is stationary as long as the variance process is

stationary.

3.2.2.2: The integrated GARCH model

In empirical estimations, 1 and

1 in GARCH (1,1) or

q

i

i

1

and

p

i

i

1

in

a general GARCH(q, p) model tend to sum to a value close to one.

IGARCH is the limit case, where the sum of these parameters equals exactly

one.

Once 111

p

i i

q

i i as is the case for the IGARCH, th is not

definite anymore, and while the sequence {ty } is no longer covariance

stationary, it remains strictly stationary because the unconditional density of

t does not change over time. The IGARCH (1, 1) model is written as:

11

2

110 1 ttt hh ; 10 1 . (25)

Page 65: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

53 |

This can be re-arranged to

1

2

1110 1 tttt hhh .

3.3: Models With Asymmetry

3.3.1: The Threshold GARCH (TGARCH) model

An interesting feature of asset prices is that ‘bad’ news tends to have a more

pronounced effect on volatility than does the ‘good’ news. TGARCH

models show how to allow the effects of good and bad news to have

different effects on conditional volatility (Glosten et al., 1993). In the model,

‘new information’ is measured by the size of the shockt , and the good

news is when 0it and bad news when 0it . The TGARCH process

is given by:

11

2

111

2

110 ttttt hdh (26)

where1td is a dummy variable that is equal to 1 if 01 t and is equal to

zero if 01 t . Thus, if

i) 01 t , 01 td , and the effect of an 1t shock on th is 2

11 t .

ii) 01 t , 11 td , and the effect of an 1t shock on th is 2

111 )( t .

a) If 01 , negative shocks will have larger effects on volatility

than positive shocks. This is the leverage effect, i.e. the tendency

for volatility to decline when returns rise and to rise when

returns fall (news impact curve, Enders, 156).

b) If 1 is statistically different from zero, the data contains a

threshold effect.

Page 66: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

54 |

3.3.2: The Exponential GARCH (EGARCH) Model

As opposed to the standard GARCH model which necessitates that all

estimated coefficients are positive, EGARCH does not require non

negativity constraint (Nelson, 1991), and is specified as:

11

1

11

1

110 lnln

t

t

t

t

tt h

hhh

. (27)

Note three interesting features about the EGARCH model:

i) Regardless of the magnitude of thln , the implied value of th

can never be negative so it is permissible for the coefficient to

be negative.

ii) The standardized value of 1t is used in the place of 2

1t ,

allowing for a more natural interpretation of the size and

persistence of shocks. 5.0

1

1

t

t

h

is a unit free measure.

iii) The model allows for leverage effects.

If

05.0

1

1

t

t

h

, the effect of the shock on thln is

11 ,

and

If

05.0

1

1

t

t

h

, the effect of the shock on thln is

11 .

(see Enders 2010: 157).

3. Others include the Power ARCH (PARCH) and the Component

GARCH (CGARCH) models.

Note that while we make reference to models with asymmetry: TGARCH

and EGARCH, PARCH and CGARCH, none of this is pursued in detail in

this guideline.

Page 67: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

55 |

3.4: Demonstrating the G(ARCH) and Related Models

Estimations Using EViews Screens and Statistical Output

Tables

The appropriate way to obtain a proper order of the GARCH process is to

estimate the mean and conditional variance equations simultaneously. As

such, GARCH processes are estimated by maximum-likelihood (M-L)

techniques so as to obtain estimates that are fully efficient. If the reader is

more interested in the exposition of the M-L technique, they will need to

refer to the many leading econometrics text books, including among others

Green (2003), Enders (2010), Harris and Sollis (2003) and Hamilton (1994).

EViews contains built in routines that estimate these models. Therefore, all

that the modeller needs is to specify the order of the process and the

assumption about the conditional distribution of t and the computer does

the rest. By default, G(ARCH) models in EViews are estimated by the

method of M-L under the assumption that the errors are conditionally

normally distributed.

In this section, we explore the estimation of a basic ARCH model, including

a wide range of specifications for the same available in EViews. For brevity,

we shall use ARCH and GARCH models interchangeably, but distinguish

where there is a possibility of confusion. We now turn to a step-by-step

practical estimation procedure, implemented using monthly_exr EViews

page.

As before, in the Main menu bar, click Quick/Estimate Equation....

Among the drop-down menu of Estimation settings is ARCH –

Autoregressive conditional heteroskedasticity as shown in the screen

print.

Page 68: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

56 |

Active page

Estimation method of choice - ARCH

Select ARCH – Autoregressive conditional heteroskedasticity – our

estimation method of choice for the G(ARCH) models. This selection

brings forth the ARCH specification dialog – where we have to supply the

mean and the variance specifications, the error distribution and the

estimation sample period.

3.4.1: Equation Estimation/Specification

Mean Equation

Enter, in the dependent variable edit box, the specification of the mean

equation in eqn.5 herein. Remember that at some point, we established

ARMA(1,0) as being appropriate for the d.g.p. Therefore, for now, we will

supply this very specification by entering dlexr c ar(1) in the mean equation

edit box.

Page 69: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

57 |

The upper right-hand side of the dialog provides for a specification of the

mean equation with an ARCH-M term. We will have to select the

appropriate item of the combo box by choosing from the drop-down menu,

alternative specifications of the ARCH-M model: the Std. Dev. (given in

eqn. 20), Variance(given in eqn. 19), or the Log(Var)(given in eqn. 21).

Getting the option that best fits the data is an iterative procedure, and so in

Table 5, we report results for all these options which we compare on the

basis of standard evaluation criteria.

Variance and distribution specification/ Model

We aim to estimate the standard GARCH model described in the text. So,

retain the default selection of GARCH/TARCH in the Model combo box.

The other entries in the drop-down menu; EGARCH, PARCH and

Component ARCH(1,1) correspond to more complicated variants of the

GARCH specification.

Page 70: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

58 |

Variance and distribution specification/ Order

Here we supply the number of ARCH and GARCH terms. As noted in eqn.

24, the default of one term for ARCH and one term for GARCH is by far

the most popular specification.

Variance and distribution specification/ Threshold order

Only if we’re to estimate an asymmetric model that we would have to

supply the number of asymmetry terms in the Threshold order edit field.

So, we shall maintain the default setting, with threshold order 0.

Variance and distribution specification/ Variance regressors

This edit box allows us to supply the list of variables we wish to include in

the variance equation specification. As you will discover, save for IGARCH

models, EViews always includes a constant as a variance regressor, so we

need not supply C here, but is an appropriate place for other exogenous

variables such as dummies providing these have been found to enter the

mean equation.

Variance and distribution specification/ Restrictions

As noted earlier, this option allows us to restrict the parameters of the

GARCH model, 1 and

1 , but in two ways:

1. One option is IGARCH, which restricts 1 and

1 to sum to one.

2. The other option is Variance Target, which restricts the constant

term, 0 , in such a way that: 110 1 th , i.e.

0 is a

function of the GARCH parameters and the unconditional variance.

For now, we shall leave the default setting of None unchanged, but

you might want to specify IGARCH at some point especially if we

want to see the difference it might make.

Page 71: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

59 |

Variance and distribution specification/ Error distribution

In this combo box, we have various options for the Error Distribution to

choose from. But as we have shown before, both student’s t–distribution

and Generalized Error distribution tend to approximate a normal

distribution as t . Little is gained by changing from the default -

Normal (Gaussian).

3.4.2: Estimation Settings/ Method and Sample - obvious

Equation Estimation/options

Next, click on the Option tab, where we may need to make additional input,

but if necessary.

Page 72: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

60 |

Back casting

Back casting is a method used in the computation of the2

0 , i.e. the initial

value used in initializing the MA estimation and 0h required for the

GARCH term. While computing 0h for the GARCH, EViews behind the

scene first uses the coefficient values to compute t of the ty equation,

and then computes an exponential smoothing estimator of the initial values,

which takes the form:

T

i

iT

iTT hh0

2122

00ˆ1ˆ

Where are residuals from the mean equation; 2h is the unconditional

variance estimate, computed as

T

i

t T1

2 , and the smoothing parameter

7.0 . Note though that from the Pre-sample variance drop-down list, we

have the option to choose from a number of weights in the range 0.1 – 1.0,

in increment of 0.1. Note that if 1 , then, 2

0 hh . Except if we have a

suitable reason, we will maintain 7.0 as in the default.

Coefficient covariance

This option of heteroskedasticity consistent covariance is used especially as

expected, if we suspect that the residuals are not conditionally normally

distributed, and is available as such, only if, in the previous screen, one

chose Normal (Gaussian) under the Error Distribution. The point is that

if the assumption of conditional normality does not hold, the ARCH

parameter estimates will still be consistent, provided the mean and variance

functions are properly specified. However, the estimates of the covariance

matrix will not be consistent, unless this option is specified, resulting in

incorrect standard errors. Therefore, given our knowledge of departure

from normality assumption, part of which we have seen earlier, we shall

check out this only box to compute the quasi-maximum likelihood (QML)

covariance and standard errors due to Bollerslev and Wooldridge (1992).

Page 73: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

61 |

Derivatives/Select method to favour

Choose the method to favour accuracy (more function evaluation)

Iterative process/Starting coefficient values

By default, EViews supplies its own starting values using OLS regression

for the mean equation, but if we had a better knowledge of what is

appropriate, we would set starting values to various fractions of the OLS

starting values or specify the values by choosing the User Specified option

in the Option dialog. We now click OK to estimate the model. Estimates

of the various ARCH-M specifications, are extracted here as GARCH-M:

None; GARCH-M: std. dev.; GARCH-M: variance; and GARCH-M: log

var, and summarized for appropriate specification verification purposes and

tractability in Table 5.

GARCH-M: None

Variable Coefficient Std. Error z-Statistic Prob. C 0.005563 0.001714 3.245649 0.0012

AR(1) 0.365139 0.090046 4.055008 0.0001 Variance Equation C 5.92E-05 2.46E-05 2.411992 0.0159

RESID(-1)^2 0.323173 0.087123 3.709401 0.0002 GARCH(-1) 0.610927 0.075985 8.040092 0.0000 R-squared 0.125182 Mean dependent var 0.005234

Adjusted R-squared 0.121490 S.D. dependent var 0.023132 S.E. of regression 0.021682 Akaike info criterion -4.903957

Sum squared resid 0.111412 Schwarz criterion -4.831227

Log likelihood 591.0228 Hannan-Quinn criter. -4.874649

Durbin-Watson stat 1.991219 Inverted AR Roots .37

Notes: Dependent variable: DLEXR; Method: ML - ARCH (Marquardt) - Normal distribution; Included observations: 239 after adjustments.

Page 74: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

62 |

GARCH-M: STD.DEV. Variable Coefficient Std. Error z-Statistic Prob. @SQRT(GARCH) -0.383394 0.239740 -1.599211 0.1098 C 0.012035 0.004032 2.984840 0.0028

AR(1) 0.349790 0.083010 4.213853 0.0000 Variance Equation C 5.43E-05 2.19E-05 2.477799 0.0132 RESID(-1)^2 0.334234 0.086958 3.843615 0.0001

GARCH(-1) 0.612394 0.065935 9.287854 0.0000 R-squared 0.119554 Mean dependent var 0.005234 Adjusted R-squared 0.112093 S.D. dependent var 0.023132

S.E. of regression 0.021797 Akaike info criterion -4.906465

Sum squared resid 0.112129 Schwarz criterion -4.819190

Log likelihood 592.3226 Hannan-Quinn criter. -4.871296 Durbin-Watson stat 1.945799 Inverted AR Roots .35 Notes: Dependent variable: DLEXR; Method: ML - ARCH (Marquardt) - Normal

distribution; Included observations: 239 after adjustments.

GARCH-M: VARIANCE

Variable Coefficient Std. Error z-Statistic Prob. GARCH -6.082374 4.523817 -1.344523 0.1788

C 0.007515 0.001978 3.799458 0.0001

AR(1) 0.354549 0.083541 4.243996 0.0000 Variance Equation C 5.54E-05 2.29E-05 2.419761 0.0155

RESID(-1)^2 0.324512 0.086040 3.771629 0.0002

GARCH(-1) 0.616970 0.070153 8.794654 0.0000 R-squared 0.120146 Mean dependent var 0.005234

Adjusted R-squared 0.112690 S.D. dependent var 0.023132

S.E. of regression 0.021790 Akaike info criterion -4.902533

Sum squared resid 0.112054 Schwarz criterion -4.815257 Log likelihood 591.8526 Hannan-Quinn criter. -4.867363

Durbin-Watson stat 1.957874

Inverted AR Roots .35 Notes: Dependent variable: DLEXR; Method: ML - ARCH (Marquardt) - Normal distribution; Included observations: 239 after adjustments.

Page 75: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

63 |

GARCH-M: LOG (VAR) Variable Coefficient Std. Error z-Statistic Prob. LOG(GARCH) -0.002510 0.002082 -1.205376 0.2281

C -0.015342 0.017694 -0.867076 0.3859 AR(1) 0.354834 0.088316 4.017765 0.0001 Variance Equation C 5.45E-05 2.24E-05 2.436672 0.0148

RESID(-1)^2 0.345480 0.089545 3.858154 0.0001

GARCH(-1) 0.605935 0.069853 8.674459 0.0000 R-squared 0.124384 Mean dependent var 0.005234

Adjusted R-squared 0.116964 S.D. dependent var 0.023132

S.E. of regression 0.021737 Akaike info criterion -4.901086

Sum squared resid 0.111514 Schwarz criterion -4.813811 Log likelihood 591.6798 Hannan-Quinn criter. -4.865917

Durbin-Watson stat 1.971628 Inverted AR Roots .35

Notes: Dependent variable: DLEXR; Method: ML - ARCH (Marquardt) - Normal

distribution; Included observations: 239 after adjustments.

Based on the results in Table 5, the terms unique to variant ARCH-M

specifications are not significantly different from zero and are all wrongly

signed (in view of the restriction imposed on the coefficient in eqns. 19,

20 and 21). This signals that G(ARCH-M) variants of G(ARCH) are

inconsistent with the true d.g.p, and will not therefore be discussed beyond

this point. Given this, our subsequent interpretations of results in Table 5

draw solely from the pure G(ARCH) estimates.

Page 76: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

64 |

Table 5: GARCH(1,1) with alternative restriction for ARCH-M in the Variance equation

ARCH-M

Variable None Std. Dev Variance Log (Var)

Mean Equation

@SQRT(GARCH)

-0.383

GARCH

-6.082

LOG(GARCH)

-0.003

C 0.006** 0.012** 0.008* -0.015

AR(1) 0.365* 0.350* 0.355* 0.355* Variance Eqn.

C 0.000** 0.000** 0.000** 0.000*

RESID(-1)^2 0.323* 0.334* 0.325* 0.345*

GARCH(-1) 0.611* 0.612* 0.617* 0.606*

Adjusted R-squared 0.121 0.112 0.112 0.117

S.E. of regression 0.022 0.022 0.022 0.022

Sum squared resid 0.111 0.112 0.112 0.112

Durbin-Watson stat 1.991 1.946 1.958 1.972

Inverted AR Roots 0.37 0.35 0.35 0.35

Asterisks *, **, and *** represent 1 percent, 5 percent and 10 percent levels of significance, respectively.

Overall, the model seems plausible. All coefficients are both theoretically

plausible and statistically highly significant. The inverted AR Roots is 0.37,

which clearly lies inside the unit circle and the D-W statistic of 1.991 does

not point to serial correlation problems. The coefficient to the

autoregressive parameter of the mean equation, i.e. in eqn. 5 is 0.365,

which is less than one, implying the system is covariance stationary.

Moreover, the sum of conditional variance parameters, i.e. 11ˆˆ in eqn.

24 is 0.934, which is less than one, but very high. This implies 1,1GARCH

process for t is weakly stationary and depicts the high volatility persistency

inherent in exchange rate movements. The coefficient to RESID(-1)^2, or

1 in eqn. 24, is 0.323 and is significant at the conventional 1percent level.

This implies very strong evidence of volatility clustering and also that

availability of new information increases conditional volatility by a

magnitude of 0.32. Similarly, GARCH(-1) parameter, given as 1 in eqn. 24

Page 77: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

65 |

is 0.611 and is also highly significant at the conventional 1 percent level,

which implies presence of a GARCH term and that there is autoregressive

persistence of conditional volatility.

In addition, the properties of the error term are reasonably good. To show

these properties, click on View within the results window reported in

column 1 of Table 5. In the drop-down menus, navigate through to Residual

Diagnostics. Here we find all available tests for the properties of the error

term: Correlogram – Q- statistics, Correlogram Squared Residuals,

Histogram – Normality Test and ARCHLM Test as shown in the screen

print below.

Beginning with the formal ARCH-LM Test (given in Table 6), both the F-

statistic 338.0922.0236,1 F and the Chi-Square statistic

336.0926.012 do not show any remaining ARCH effects.

To produce the above statistic results, given in Table 6, click on ARCH

LM Test..... This route, as shown in the screen print below, brings forth

Page 78: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

66 |

the Heteroskedasticity Tests window – in which EViews highlights ARCH

as default heteroskedasticity test and includes 1 lag.

Note that in the test, the null hypothesis is that of ‘no ARCH effects’. Click

OK to yield output extracted in Table 6.

Table 6: Heteroskedasticity Test: ARCH

F-statistic 0.9218 Prob. F(1,236) 0.338

Obs*R-squared 0.9260 Prob. Chi-Square(1) 0.336

Moreover, thei of the standardized residuals (

t

t

h

) and the standardized

squared residuals (t

t

h

2 ) do not show evidence of any remaining serial

correlation (check this in self- exercise following the same procedure for

results in Table 6).

Page 79: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

67 |

However, as shown in Figure 9 (produced through the same procedure

above), normality of the G(ARCH) errors is rejected, but this is an inherent

feature of the errors from regression models for financial data.

Figure 9: Normality of G(ARCH) errors

Finally, we will now demonstrate how to generate a graph of the measured

conditional variance from this modelling procedure. Whilst in the estimated

output window (for the preferred competing model specification, here

ARCH-M with None option), click on View/Garch Graph in the results

menu bar and select Conditional Variance as shown in the screen print.

Road map

0

5

10

15

20

25

30

35

40

-3 -2 -1 0 1 2 3 4 5

Series: Standardized Residuals

Sample 1997M03 2017M01

Observations 239

Mean 0.006712

Median -0.067399

Maximum 4.946636

Minimum -3.627497

Std. Dev. 1.001617

Skewness 0.601742

Kurtosis 6.238965

Jarque-Bera 118.8952

Probability 0.000000

Page 80: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

68 |

Click on Conditional Variance to generate a graph for the measured

conditional variance or exchange rate volatility, pasted in Figure 10.

Figure 10: GARCH (1,1) Conditional variance-Measured

It is also possible to generate the corresponding conditional variance series,

by checking Proc in the same window where the graph is appeared, and

selecting Make GARCH Variance Series…- a route shown in the screen

print.

.0000

.0005

.0010

.0015

.0020

.0025

.0030

.0035

.0040

1997

:03

1998

:01

1999

:01

2000

:01

2001

:01

2002

:01

2003

:01

2004

:01

2005

:01

2006

:01

2007

:01

2008

:01

2009

:01

2010

:01

2011

:01

2012

:01

2013

:01

2014

:01

2015

:01

2016

:01

Page 81: Modelling volatility using EViews - cmi.comesa.int

.......................................................................................................... Modelling Conditional Volatility

69 |

In the resulting window, EViews will assign Conditional Variance name to

this new series to be created, and if this is the first conditional variance that

is being estimated, it will be assigned garch01.Finally, click OK and a new

series, in this case, garch01 will be added to the list of variables in the series

window. It is then possible to open and extract the measured conditional

variance series-just like you can extract any other series. Going back to the

graph for measured conditional variance in Fig.10, you might want to

refresh yourselves with what could have caused the unusually high volatility

around 2008/09, 2011/12 and very lately around 2015 – based on the

Uganda country knowledge alluded to earlier. This is generally about

keeping abreast with developments that have influenced the data path being

dealt with.

Exercise 3

In demonstrating the estimation of the G(ARCH) process, we have used

nominal exchange rate data for Uganda observed on a monthly frequency.

In this exercise, we will use CPI data contained in the same folder and excel

file for exercises in multiple sheet. This data contains 143 observations,

spanning from July 2005 to May 2017. Use the data to:

1. Fit an appropriate mean equation or ARMA model.

2. Estimate an appropriate GARCH(1,1) variant model. Hint: consider

several competing ARCH-M assumptions.

Verify that both ARCH and GARCH terms enter the conditional variance and that these parameters are well behaved.

3. Estimate an appropriate IGARCH(1,1) model: Hint: consider several

competing ARCH-M assumptions.

4. Compare the results for the GARCH(1,1) and IGARCH (1,1) models

of choice, i.e. best models under the competing ARCH-M assumptions,

showing eventually, why the former would be preferred to the latter.

5. Generate and plot the series for measured conditional volatility from

the GARCH (1,1) and IGARCH (1,1) models. Assuming these results

is to be presented to the MPC of your central bank, which of the two

would you present and why?

Page 82: Modelling volatility using EViews - cmi.comesa.int
Page 83: Modelling volatility using EViews - cmi.comesa.int

Chapter 4

Modelling Conditional Volatility in a

Multivariate Framework

4.1: Introduction

Multivariate GARCH is a natural extension of the original G(ARCH)

specification and is founded on the basis that contemporaneous shocks to

variables can be correlated with each other, allowing for volatility spill-overs

(positive or negative). That is, volatility shocks to one variable might lead to

volatility of other related variables, but to magnitudes that only empirical

analysis can reveal. Multivariate GARCH models allow the variances and

Covariances to depend on the information set in a vector ARMA manner,

the type useful in multivariate financial models, which require the modelling

of both variances and Covariances (such as Capital asset pricing models

(CAPM) or dynamic hedging models).

Building from a univariate GARCH model, an n-variant model requires

allowing the conditional variance-covariance matrix of the n-dimensional

zero mean random variables t to depend on elements of information set

1t , that is:

tH,0~ Nt

To put it in context, assume an n-dimensional G(ARCH) model, which in a

compact form is represented as:

Ntttt xxx ,...,, 21x (28)

Page 84: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

72 |

Where tx = (N x 1). μx ittE / ; μ= (N x 1) & tittVar Hx / ;

tH = (N x N)

The diagonal elements of tH are the

ith terms and the off-diagonal elements

are the ijth terms -

ith and ijth are estimated simultaneously by M-L to capture

the interactions between volatility of the N-time series.

For ease of exposition, take a case of just two variables (N=2), tx1and

tx2,

and 1 qp . As in the univariate case, the GARCH (1, 1) errors for the

two error processes become:

5.0

1111 ttt hv

5.0

2222 ttt hv

Where th11 and th22 are the conditional variances of t1 and t2 , respectively

for 1varvar 21 tt vv as before.

To allow for the possibility that t1 and

t2 are correlated, the conditional

variance between t1 and

t2 becomesth12, and specifically,

tttt Eh 21112

Allowing in this framework the interaction of volatility terms with each

other, it is possible to construct various representations of the GARCH

models available in the literature, including VECH and diagonal VECH

(Engel and Kroner, 1995), diagonal BEKK (after Baba, Engel, Kraft and

Kroner, 1990), and constant correlation. In what follows, we discuss each of

these in detail.

4.2: The VECH Representation

Under the VECH representation of multivariate GARCH, conditional

variance of each variable, th11and

th22, depends on its own and the other

related variable’s past; the conditional covariance between the two variables,

th12; the lagged squared errors, 2

11 t and 2

12 t ; and the product of the lagged

Page 85: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

73 |

errors,1211 tt . To show this, define expressions for

th11,

th12and

th22as

follows:

2

1213121112

2

11111011 ttttth

122131121211111 ttt hhh

2

1223121122

2

11212012 ttttth

122231122211121 ttt hhh

2

1233121132

2

11313022 ttttth

122331123211131 ttt hhh

A compact matrix representation of these equations takes the form:

2

1,2

1,21,1

2

1,1

333231

232221

131211

30

20

10

,22

,12

,11

t

tt

t

t

t

t

h

h

h

1,22

1,12

1,11

333231

232221

131211

t

t

t

h

h

h

(29)

Showing a rich interaction between tx1 and tx2 .

There are several complications which make it very difficult to estimate the

VECH representation of multivariate GARCH models, despite the ease

with which it can be conceptualized.

The number of parameters necessary to estimate can be extremely large.

Even for a simple two variable GARCH (1,1) model in eqn. 29above, there

are 21 parameters, and the estimation can be quite complicated with more

variables added to the system and if the order of the GARCH process

increases. Moreover, as with univariate GARCH models, it is necessary to

impose restrictions on the parameters of the product of the lagged errors of

the model to ensure the non-negativity of the conditional variances of

individual series, which in practice can however be difficult to do.

Page 86: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

74 |

Overcoming these problems involves imposing restrictions on the general

model as in the diagonal VECH model.

4.3: The Diagonal VECH Representation

This is based on the assumption that each conditional variance is equivalent

to that of a univariate GARCH process and the conditional Covariance is

quite parsimonious. In the simplest case of N=2 and 1 qp , the

diagonal representation form of the VECH reduce the number of

parameters to be estimated to nine from 21, and compressed to:

2

1,2

1,21,1

2

1,1

22

12

11

20

12

10

,22

,12

,11

00

00

00

t

tt

t

t

t

t

h

h

h

1,22

1,12

1,11

22

12

11

00

00

00

t

t

t

h

h

h

(30)

Performing the matrix multiplication yields:

1,1111

2

1,11110,11 ttt hh

1,12221,21,11212,12 tttt hh

1,2222

2

1,22230,22 ttt hh

Showing that variances depend solely on past own squared residuals and past values of itself, and each element of the Covariance matrix,

th ,12

depends only on past values of itself and a product of the past values of

tt ,2,1 .

This easy way to estimate diagonal VECH model is handy, but setting all

0 ijij ji devoid the model of interactions among the variables –

the very essence of multivariate GARCH modelling. Indeed, as can be seen,

1,1 t shock affects th ,11and

th ,12but not

th ,22. Moreover, we require that

th ,12be positive definite for all values of

it in the sample space, a

restriction that can be difficult to check, let alone impose during estimation.

Page 87: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

75 |

4.4: The BEKK Representation

The BEKK (Baba, Engel, Kraft and Kroner, 1990) multivariate GARCH

model guarantees that that the conditional variances are positive, by forcing

all the parameters to enter the model via quadratic forms. It assumes the

following model fortH :

q

1i

p

1i

iitiiititi0t βHβαεεαξξH 0

The BEKK representation in the N=2 and 1 qp case becomes:

2212

1211

2212

1211

,22,12

,12,11

tt

tt

hh

hh

2212

21112

1,21,21,1

1,21,1

2

1,1

2

1,21,21,1

1,21,1

2

1,1

2221

1211

ttt

ttt

ttt

ttt

2212

2111

1,221,12

1,121,11

2221

1211

tt

tt

hh

hh

Performing the matrix multiplication yields:

1,22

2

121,1212111,11

2

11

2

1,2

2

121,21,12111

2

1,1

2

11

2

12

2

11,11

2

2

ttt

ttttt

hhh

h

2

1,222211,21,122111221

2

1,11211

122211,12

tttt

th

1,1222211,221,11221112211,121211 tttt hhhh

1,22

2

221,1222211,11

2

21

2

1,2

2

221,21,12221

2

1,1

2

21

2

22

2

12,22

2

2

ttt

ttttt

hhh

h

(31)

For N=2 and 1 qp , the BEKK, unlike the VECH, requires only 8

parameters (without the GARCH terms) but 11 parameters with the

GARCH terms inclusive to be estimated and allows for the interaction

effects that the diagonal VECH representation does not. As such the model

allows for the spill-over effects of shocks to the variance of one of the

Page 88: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

76 |

variables to the others. In principle, the BEKK representation improves on

both the VECH and diagonal multivariate GARCH representations.

However, despite its improvement over the VECH and diagonal

representations, in practice, the BEKK model has been shown to be quite

difficult to estimate. A large number of parameters in it are not globally

identified, and as such, convergence can be quite difficult to achieve.

Given this, the BEKK model in eqn. 31 is collapsed to a representation

similar to diagonal representation in eqn. 30, becoming diagonal BEKK,

where both ARCH and GARCH terms are diagonal matrices, while the

constant terms are an indefinite matrix. Unlike the diagonal VECH in

eqn.30, diagonal BEKK allows for the interaction of the two process

ARCH and GARCH terms in its conditional covariance. It takes the form:

1,11

2

11

2

1,1

2

11

2

12

2

11,11 ttt hh

1,221,112211

22

2211122211,12 1,21,1 ttt hhh

tt

(32)

1,22

2

22

2

1,2

2

22

2

22

2

12,22 ttt hh

This reduction of the original BEKK shown in eqn.32 reduces the

estimated variance-covariance parameters to 7 from the initial 11.

4.5: The Constant Conditional Correlation (CCC)

Representation

CCC representation of the multivariate GARCH model restricts the

conditional correlation coefficients to be equal to the correlation

coefficients between the variables, which are simply constants. Thus, as the

name suggests, the conditional correlation coefficients are constant over

time.

As such, in the simplest case of N=2 and 1 qp , the CCC model

assume:

1,1

2

1

2

1,1

2

1

2

2

2

1,1 ttt hh

Page 89: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

77 |

5.0

,2,112,12 ttt hhh (33)

1,2

2

2

2

1,2

2

2

2

2

2

1,22 ttt hh

The covariance equation entails only one parameter, and the variance terms

need not be diagonalized and the covariance terms are proportional to

5.0

,22,11 tthh .

4.6: Conditional Heteroskedasticity, Unit Roots and

Cointegration

Conditional heteroskedasticity is a common feature of many financial time

series, but as discussed earlier, an assumption of many time series models is

that the error terms are zero mean, homoskedastic, iid random variables.

This makes testing for a unit root and consequently, testing for

cointegrating relationships, in the presence of conditional heteroskedasticity

an important issue. However, developments in time series econometrics

have shown that, asymptotically, the Dickey Fuller (Dickey and Fuller, 1979)

tests are robust to the presence of conditional heteroskedasticity, such as

ARCH and GARCH (see e.g., among others, Phillips and Perron, 1988).

Consequently, in applied work on testing for unit roots or cointegration in

financial time series, it is extremely rare that potential difficulties caused by

presence of conditional heteroskedasticity are considered to be a problem.

4.7: Demonstrating the Estimation of CPI and Exchange Rate

Volatility Within a Bi-variant GARCH(1,1) Framework

Using EViews Screens and Statistical Output Tables

For illustration purposes, we will estimate a simple multivariate GARCH(1,1)

framework in both the BEKK and CCC representations involving the CPI

and Exchange rate i.e. N=2 and 1 qp , i.e. GARCH (1,1) over the

period July 2005 – January 2017, some 139 observations. The data set is

available in COMESA_DATA_2017 folder under monthly.xlsx excel file

as EXR_CPI excel sheet, and is given as Multivariate in the

demonstration EViews screen.

Page 90: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

78 |

The first step, as has been emphasized before, is to fit a mean equation, i.e.

a model in which the assumption of time independence of the residuals

holds. Because from economic theory, strong causation is more likely to run

from exchange rate to CPI inflation, the so-called exchange rate pass-

through, we will specify a mean equation in which CPI inflation is assumed

to depend on its lags and lagged exchange rate, while ensuring a sufficient

number of lags or autoregressive parameters that ensures time

independence of the residuals. But prior to the estimation of the mean

equation, it is important that the series, available at such a high frequency

like we have here (monthly) are tested for and adjusted for seasonality. This

is because economic analysis is focused on business cycles, so, performing

an analysis on variables with seasonality would be incorrectly characterizing

cyclical behaviour and the ensuing results would be spurious (Dejong and

Dave, 2007; Nyanzi and Bwire, 2017).

Unlike the dlexr, which we have argued before that if adjusted for

seasonality would contradict the assumption of rational behaviour in

financial markets, particularly because the seasonality here is not regular,

CPI series is particularly a suitable candidate for seasonality adjustment.

DLCPI series is thus tested for seasonal effects using the popular X12

method by the Census Bureau of Statistics, but no evidence of seasonality

was found. This procedure which could be useful in some other

applications is briefly described here-under.

Adjusting the DLCPI series for seasonality effects using the Census X12

method, like any other built in routine procedures in EViews, is an

automated procedure. The method is available only for monthly and

quarterly series for at least 3 full years – descriptions fitting our DLCPI

series at hand. To implement the procedure, highlight and open DLCPI

series in the active multivariate page. In the open series window (excel like

sheet), click Proc, and point the cursor on Seasonal Adjustment in the

drop-down menu of Proc and select Census X12... – a road map shown in the

print screen below.

Page 91: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

79 |

Selecting Census X12...brings forth the X12 Options screen, which is also

replicated in the screen print below. In the box for X11 Method – under

Seasonal Adjustment, a choice must be made between the EViews default

of Multiplicative and Additive – the most popular two adjustment methods

in applied time series. Multiplicative method applies when the series to be

adjusted is nonstationary and the series values are strictly non-negative.

Additive method applies when the series to be adjusted is in stationary form,

but in addition, the series values must be positive. DLCPI in our application

here is stationary, but with some negative entries. Given this, we check

Additive option, while accepting as an appropriate price to pay for the few

negative observations, which certainly will be lost in the process. With the

exception of changing the X11 method to favour, the rest of the default

options remain as given, noting that under Component Series to Save, the

Base name for the series to be adjusted is given as dlcpi and the Final

seasonally adjusted series will appear in the work space window with

extension_SA(where suffix SA is used to mean seasonally adjusted). This

box is by default checked.

Page 92: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

80 |

Click OK to implement the procedure. Based on the results (table is very

large to be reproduced here), all available tests for seasonality, including the

F-tests for seasonality; Nonparametric Test for the Presence of Seasonality

Assuming Stability; Moving Seasonality Test; and Test for the presence of

residual seasonality, all reveal no evidence of seasonality at conventional

levels of statistical significance.

With this formal proof of no seasonality effects in DLCP, we proceed to fit

the mean equation – with both dlexr and dlcpi unadjusted for seasonal

effects. We began with k=4 autoregressive parameters without MA

component. To proceed, in the active multivariate page of EViews window,

click on Quick at the top of the command window, and in the drop-down

menu, select Estimate Equation...by a mouse click. In the resulting

Equation Estimation window, we then supply in theEquation

specification, a specification of the form: dlcpi c dlcpi(-1 to -4) dlexr(-1 to -4), i.e.

in the order of dependent variable, constant and a list of lags explanatory

variables, a constant inclusive. Execution of this using the Least Squares

method generates results in Table 7.

Page 93: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

81 |

Table 7: The General bi-variant mean model for Inflation

Variable Coefficient Std. Error t-Statistic Prob. C 0.002173 0.000830 2.616845 0.0100 DLCPI(-1) 0.117352 0.090634 1.294800 0.1978 DLCPI(-2) 0.267982 0.090318 2.967088 0.0036 DLCPI(-3) 0.190746 0.091682 2.080526 0.0395 DLCPI(-4) 0.039111 0.090599 0.431698 0.6667 DLEXR(-1) 0.056380 0.022538 2.501589 0.0137 DLEXR(-2) -0.006226 0.025167 -0.247397 0.8050 DLEXR(-3) 0.008312 0.024515 0.339058 0.7351 DLEXR(-4) -0.012151 0.022248 -0.546174 0.5859

S.E. of regression 0.006 Durbin-Watson stat 1.997

Breusch-Godfrey Serial Correlation LM Test:

F(2,123) = 0.928(0.398);

22 = 1.992(0.369)

Notes: 134 included observations

In the results, about four coefficients, c, dlcpi(-2), dlcpi(-3) and dlexr(-1) are

significantly different from zero. Asis the norm in econometric modelling

process, we have to drop sequentially through general to specific approach,

most insignificant lags, but first, those whose t-values are less or equal to

one. Following this procedure, the 2nd, 3rd and 4th lags of dlexr and the 4th lag

of dlcpi are dropped from the specification. Even after this reduction, the

1st lag to dlcpi still remains insignificant so subsequently, it is dropped in the

re-specification. This reduction process yields results in Table 8, which are

the most plausible estimate of the mean equation. Consistent with the

Durbin-Watson stat (1.77), formal Breusch-Godfrey Serial Correlation LM

Test does not point to any remaining autocorrelation in the model residuals.

Table 8: Estimates of the mean equation

Variable Coefficient Std. Error t-Statistic Prob.

C 0.002603 0.000753 3.456267 0.0007

DLCPI(-2) 0.302947 0.081914 3.698361 0.0003 DLCPI(-3) 0.232820 0.081549 2.854972 0.0050 DLEXR(-1) 0.059343 0.019757 3.003597 0.0032

S.E. of regression 0.005806 Durbin-Watson stat 1.770962

Breusch-Godfrey Serial Correlation LM Test:

F(2,129) = 1.059(0.350);

22 = 2.181(0.336)

Notes: p-values in parentheses; Included observations=135

Page 94: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

82 |

Therefore with the specification of the mean equation ably established as in

Table 8, we now turn to the implementation of multivariate GARCH(1,1)

framework in both the BEKK and CCC representations, but beginning with

the former.

To proceed, whilst in EViews work space, highlight the two variables in the

order dlcpidlexr. With the cursor in the highlighted area, right click and

choose Open as System…The screen that pops up, as shown in the screen

print below,is where we have to provide the system specification.

Like the VAR, each of dlcpi and dlexr are specified as potentially endogenous

or dependent variables. Under Regressors and AR() terms, enter in the

comb box for Equation Specific Coefficients, cdlcpi(-2 to -3) dlexr(-1),as

has indeed been determined beforehand. Leaving all the other entries in the

rest of the screen as default, click OK and as shown in the print screen

below, are the coefficients for the two mean equations. This is how the set-

up of the system coefficients for the mean equation will look like so it is

important this is familiar.

Page 95: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

83 |

In this very window, click on Estimate, which should lead you to the

System Estimation window, in which we provide information as follows:

Under Estimation method, choose from the drop-downlist ARCH as the

estimation method of choice (the default is OLS). You will then see that

under ARCH model specification/Model type, we have all the three

available specifications of multivariate GARCH, namely Diagonal VECH,

CCC and diagonal BEKK, all accessed through the drop-down menu(the

default is Diagonal VECH). We will implement diagonal BEKK and CCC,

but first BEKK. So, we select Diagonal BEKK as shown in the screen print.

Page 96: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

84 |

All the other comb entries are obvious. Click Options to check the box for

Bollerslev-Wooldridge SE, if in the earlier versions of EViews or leave

defaults as they are if using latest EViews versions and click OK. The

resultant estimation output for both the mean and Variance Covariance

equations (Table 9), is reproduced here, but tabulated in a useable form in

Table 10.

We have earlier on shown that

DLCPI = C(1) + C(2)*DLCPI(-2) + C(3)*DLCPI(-3) + C(4)*DLEXR(-1)

DLEXR = C(5) + C(6)*DLCPI(-2) + C(7)*DLCPI(-3) + C(8)*DLEXR(-1)

So, the positioning and ordering of the coefficients C(1) to C(8), in Table

10given in the computer generated output in Table 9,should be quite

straight forward.

Page 97: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

85 |

Table 9: EViews output for Diagonal BEKK Covariance specification

Coefficient Std. Error z-Statistic Prob. C(1) 0.002647 0.000771 3.434558 0.0006

C(2) 0.247868 0.093021 2.664659 0.0077

C(3) 0.196030 0.083824 2.338594 0.0194 C(4) 0.042519 0.013951 3.047669 0.0023

C(5) 0.005262 0.002081 2.528327 0.0115

C(6) -0.837201 0.304761 -2.747078 0.0060

C(7) 0.252033 0.239273 1.053332 0.2922 C(8) 0.464209 0.089039 5.213522 0.0000

Variance Equation Coefficients C(9) 1.38E-05 7.27E-06 1.899092 0.0576

C(10) 1.90E-06 4.82E-06 0.394011 0.6936

C(11) 4.15E-05 1.84E-05 2.261980 0.0237

C(12) 0.598470 0.168347 3.554985 0.0004 C(13) 0.535588 0.115586 4.633665 0.0000

C(14) 0.514698 0.266927 1.928237 0.0538

C(15) 0.832323 0.039751 20.93824 0.0000

Log likelihood 840.3703 Schwarz criterion -11.90490

Avg. log likelihood 3.112483 Hannan-Quinn criter. -12.09653

Akaike info criterion -12.22771

Equation: DLCPI = C(1) + C(2)*DLCPI(-2) + C(3)*DLCPI(-3) + C(4)*DLEXR(-1)

R-squared 0.232773 Mean dependent var 0.006129

Adjusted R-squared 0.215203 S.D. dependent var 0.006633

S.E. of regression 0.005876 Sum squared resid 0.004524

Durbin-Watson stat 1.702365

Equation: DLEXR = C(5) + C(6)*DLCPI(-2) + C(7)*DLCPI(-3) + C(8)*DLEXR(-1)

R-squared 0.208410 Mean dependent var 0.004929

Adjusted R-squared 0.190282 S.D. dependent var 0.025854

S.E. of regression 0.023264 Sum squared resid 0.070900

Durbin-Watson stat 1.921307 Covariance specification: Diagonal BEKK

GARCH = M + A1*RESID(-1)*RESID(-1)'*A1 + B1*GARCH(-1)*B1 M is an indefinite matrix

A1 is a diagonal matrix

B1 is a diagonal matrix

Page 98: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

86 |

Transformed Variance Coefficients Coefficient Std. Error z-Statistic Prob. M(1,1) 1.38E-05 7.27E-06 1.899092 0.0576

M(1,2) 1.90E-06 4.82E-06 0.394011 0.6936

M(2,2) 4.15E-05 1.84E-05 2.261980 0.0237 A1(1,1) 0.598470 0.168347 3.554985 0.0004

A1(2,2) 0.535588 0.115586 4.633665 0.0000

B1(1,1) 0.514698 0.266927 1.928237 0.0538

B1(2,2) 0.832323 0.039751 20.93824 0.0000

The variance equation coefficients, C(9) – C(15) and Transformed

Variance Coefficients: M(1,1), M(1,2), M(2,2), A1(1,1), A1(2,2), B1(1,1) and

B1(2,2) under the Covariance specification: Diagonal BEKK (appeared

in bold in Table 9) are the same. In other words, C(9) = M(1,1); C(10) =

M(1,2); C(11) = M(2,2); C(12) = A1(1,1); C(13) = A1(2,2); C(14) = B1(1,1)

and C(15)= B1(2,2). These correspond directly to the coefficients of the

system in eqn. 32. For brevity, mapping the system of the diagonal BEKK

model in eqn. 32 in light of the estimated output is as straight forward as:

1,11

932

2

11

2

1,1

932

2

11

932

2

12

2

11,11

)14()1,1(1

)12()1,1(1)9()1,1(

t

TABLEEQN

t

TABLEEQNTABLEEQN

t

hCB

CACMh

1,22

932

2

22

2

1,2

932

2

22

932

2

22

2

12,22

)15()2,2(1

)13()2,2(1)11()2,2(

t

TABLEEQN

t

TABLEEQNTABLEEQN

t

hCB

CACMh

22

932

2211

932

122211,12

1,21,1)2,2(1*)1,1(1

)10()2,1(

tt

TABLEEQN

TABLEEQN

t

AA

CMh

Page 99: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

87 |

1,221,11

932

2211 )2,2(1*)1,1(1

tt

TABLEEQN

hhBB

The coefficients to 2

1,2

2

1,1 tt and to1,221,11 tt hh , i.e. )2,2(1*)1,1(1 AA ; and

)2,2(1*)1,1(1 BB , respectively in the covariance equation, th ,12

are not

computer generated but are a simple product of the corresponding

coefficients in th ,11 and th ,22 , and are indicated as RESID1(-1)*RESID2(-1)

and Cov1_2(-1) in Table 10. All computer generated coefficients to the

ARCH, i.e. RESID(-1) and GARCH, i.e. GARCH(-1) terms are in quadratic

form as in eqn. 32.The computer-generated output in Table 9 is tabulated

in a useable form in Table 10.

Table 10: Diagonal BEKK estimates for bi-variant GARCH(1,1)

Estimated system mean Equations

Endogenous variable Cons DLCPI(-2) DLCPI(-3) DLEXR(-1) DLCPI

0.003* (3.434)

0.248* (2.665)

0.196** (2.339)

0.043* (3.048)

DLEXR

0.005** (2.528)

-0.837* (-2.747)

0.252 (1.053)

0.464* (5.214)

Variance and covariance Equations

Cons RESID1(-

1)^2 RESID2(-1)^2

GARCH1(-1)

GARCH2(-1)

RESID1(-1)* RESID2(-1)

COV1_2(-1)

GARCH1

0.000*** (1.899)

0.598* (3.555)

0.515*** (1.928)

COV1_2

0.000 (0.394)

0.321* (16.473)

0.428* (40.374)

GARCH2

0.000** (2.262)

0.536* (4.634)

0.832* (20.938)

Notes: Covariance specification assumption: Diagonal BEKK. ARCH and GARCH coefficients in the variance covariance equations are in quadratic form of the transformed variance coefficients while cross-terms are products of the transformed variance coefficients. In parentheses are z-statistics, but in product form for cross coefficient products, in the lower panel of the table. Robust standard errors and covariance are due to Bollerslev-Wooldridge, and the presample covariance assumption: backcast (parameter =0.7).ARCH and GARCH terms are diagonal matrices, while the constant terms are an indefinite matrix. Asterisks *, **, and *** represent 1 percent, 5 percent and 10 percent levels of significance, respectively.

Page 100: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

88 |

Overall, the estimates of the multivariate model seem plausible in both

theory and statistics sense. Each of the coefficients to the autoregressive

parameters (coefficients of the mean equations) is less than one in absolute

terms, which is consistent, in general, with the restriction on parameter in

eqn. 5. Therefore, the system is covariance stationary. In both CPI and

exchange rate depreciation mean equations, the coefficients to the second

lag of CPI, i.e. DLCPI(-2) and that on the lagged exchange rate depreciation,

i.e. DLEXR(-1) are significantly different from zero, and so, is the

coefficient to the 3rd lag of CPI, i.e. DLCPI(-3),in the CPI mean equation,

which is very intuitive.

In the CPI mean equation, significant coefficients on lagged CPI, i.e. 0.248

for DLCPI(-2) and 0.196 for DLCPI(-3)reflects inflation inertia or

persistence in inflation, i.e. prices are sticky downwards. The highly

significant coefficient of 0.043 on the first lag of exchange rate depreciation

(DLEXR(-1)) implies pass-through of exchange rate to domestic prices but

with a lag. This is consistent, in terms of direction and transmission, with

the exchange rate pass-through estimates for Uganda based on SVAR in a

wider context of key drivers of core inflation (Bwire, Opolot and Anguyo.,

2013, p. 41-68, in JSEM). Their estimate puts the pass-through at about 0.48

percentage points, with full impact being realized between 3 – 4 quarters.

These evidences are not surprising largely because small open economies,

without exception, experiences relatively high pass-through of exchange rate

depreciation to domestic inflation.

In the mean equation for exchange rate depreciation, the negative

significant coefficient of the second lag of CPI, i.e. -0.837 for DLCPI(-2)

implies that heightened domestic inflationary pressures depreciates the

exchange rate as this hurts the export sector while at the same time

promotes imports. A fall in exports reduces the inflow of foreign exchange

while an increase in imports puts pressure on foreign exchange demand. A

consequence of the resulting mismatch in supply of and demand for foreign

exchange, in a market driven environment, is heightened depreciation

pressures. The significant coefficient to the first lag of exchange rate

(DLEXR(-1))reflects persistence in the exchange rate movements.

Page 101: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

89 |

The conditional variance parameters in the conditional variance equations

for inflation and exchange rate depreciation, i.e. 0.515 for GARCH1(-1) and

0.832 for GARCH2(-1) are positive and less than one, which is consistent

with the restrictions on j in Eqn. 22, and are quite reasonably high. This

depicts the high volatility persistency inherent in inflation dynamics and the

exchange rate movements. Decomposing 1,1GARCH process into past

squared forecast errors (RESID(-1))^2and past forecast variances

(GARCH(-1)), both RESID1(-1)^2 and RESID2(-1)^2 and GARCH(-1)

and GARCH(-2) are significant in the respective conditional variance

specifications. As shown by the asterisks, the past squared forecast errors

are significant at 1 percent, which in effect, reflect strong evidence of

volatility clustering in either case. The conditional volatility persistence

coefficients are 0.83 and 0.52 for exchange rate movements and inflation,

respectively, and are respectively significant at the 1 percent and 10 percent

levels of significance (see the asterisks). The persistence in exchange rate

volatility (o.83) is therefore more pronounced than that on inflation (0.52).

Importantly, the ARCH, i.e. RESID1(-1)*RESID2(-1) and GARCH, i.e.

COV1_2(-1) parameters of the conditional covariance equation are 0.321

and 0.428, respectively, and each of this is significantly different from zero

at the 1 percent level. This reflects indeed the spill over effects from shocks

in the system variables. One can therefore argue, in view of the mean

equation results, that volatility in exchange rates and that in inflation triggers

volatility in each other (correlation is both ways, i.e. lags of dlexr are

significant in the dlcpi equation and like- wise, lags of dlcpi are significant in

the dlexr equation).

Finally, we can follow the demonstration in the screen prints below to

generate a graphical exposition of the estimated variance covariance

structure. Whilst in the estimated output window, click on View and in the

drop-down menu, choose and click on Conditional Covariance… The

Conditional Variance window pops up as in the screen print. As can be

seen, we will be displaying Covariance (default in the drop-down menu) for two

variables, dlcpi and dlexr in graphs format over the sample period 2005m11

to 2017m01.

Page 102: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

90 |

The good news is that all these entries are already default and all we have to

do is to be in agreement, by clicking OK – to generate variance covariance

structure depicted in Figure 10.

Figure 11: Measured Conditional Covariance

.00000

.00005

.00010

.00015

.00020

.00025

.00030

05:1

1

06:0

1

07:0

1

08:0

1

09:0

1

10:0

1

11:0

1

12:0

1

13:0

1

14:0

1

15:0

1

16:0

1

Var(DLCPI)

-.0002

-.0001

.0000

.0001

.0002

.0003

.0004

05:1

1

06:0

1

07:0

1

08:0

1

09:0

1

10:0

1

11:0

1

12:0

1

13:0

1

14:0

1

15:0

1

16:0

1

Cov(DLCPI,DLEXR)

.000

.001

.002

.003

.004

05:1

1

06:0

1

07:0

1

08:0

1

09:0

1

10:0

1

11:0

1

12:0

1

13:0

1

14:0

1

15:0

1

16:0

1

Var(DLEXR)

Page 103: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

91 |

Next, we estimate the same model but under the Covariance specification

assumption of Constant Conditional Correlation (CCC), following a similar

route as in Diagonal BEKK, the only departure being that we now choose

Constant Conditional Correlation in the drop-down menu of Model type in the

ARCH model specification shown in the screen print earlier. The resulting

EViews output is provided here in Table 11, which as with diagonal BEKK,

is organized in a usable form in Table 12.

Note that as with diagonal BEKK, it follows from the illustrations earlier

that

DLCPI = C(1) + C(2)*DLCPI(-2) + C(3)*DLCPI(-3) + C(4)*DLEXR(-1)

DLEXR = C(5) + C(6)*DLCPI(-2) + C(7)*DLCPI(-3) + C(8)*DLEXR(-1)

So that the positioning and ordering of the coefficients C(1) to C(8), in

Table 11, doesn’t have to be problematic and is as straight forward as

shown in Table 12.

Table 11: E-Views output for Constant Conditional Correlation Covariance specification

Coefficient Std. Error z-Statistic Prob. C(1) 0.003035 0.000762 3.982980 0.0001

C(2) 0.216693 0.097286 2.227385 0.0259

C(3) 0.158123 0.086229 1.833758 0.0667

C(4) 0.048551 0.014412 3.368877 0.0008 C(5) 0.003255 0.001916 1.698930 0.0893

C(6) -0.718685 0.278260 -2.582787 0.0098

C(7) 0.410830 0.244465 1.680525 0.0929

C(8) 0.493501 0.088435 5.580404 0.0000 Variance Equation Coefficients C(9) 9.41E-06 4.95E-06 1.901835 0.0572

C(10) 0.311793 0.180619 1.726253 0.0843

C(11) 0.413061 0.197150 2.095164 0.0362

C(12) 2.64E-05 1.67E-05 1.580114 0.1141

C(13) 0.449382 0.151510 2.966018 0.0030 C(14) 0.616743 0.067245 9.171604 0.0000

C(15) 0.107338 0.080460 1.334054 0.1822

Page 104: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

92 |

Log likelihood 843.6630 Schwarz criterion -11.95368

Avg. log likelihood 3.124678 Hannan-Quinn criter. -12.14531

Akaike info criterion -12.27649

Equation: DLCPI = C(1) + C(2)*DLCPI(-2) + C(3)*DLCPI(-3) + C(4)*DLEXR(-1)

R-squared 0.223750 Mean dependent var 0.006129 Adjusted R-squared 0.205974 S.D. dependent var 0.006633

S.E. of regression 0.005911 Sum squared resid 0.004577

Durbin-Watson stat 1.678926

Equation: DLEXR = C(5) + C(6)*DLCPI(-2) + C(7)*DLCPI(-3) + C(8)*DLEXR(-1)

R-squared 0.205090 Mean dependent var 0.004929

Adjusted R-squared 0.186886 S.D. dependent var 0.025854

S.E. of regression 0.023313 Sum squared resid 0.071198 Durbin-Watson stat 1.965731

Covariance specification: Constant Conditional Correlation

GARCH(i) = M(i) + A1(i)*RESID(i)(-1)^2 + B1(i)*GARCH(i)(-1)

COV(i,j) = R(i,j)*@SQRT(GARCH(i)*GARCH(j)) Transformed Variance Coefficients Coefficient Std. Error z-Statistic Prob. M(1) 9.41E-06 4.95E-06 1.901835 0.0572

A1(1) 0.311793 0.180619 1.726253 0.0843

B1(1) 0.413061 0.197150 2.095164 0.0362

M(2) 2.64E-05 1.67E-05 1.580114 0.1141

A1(2) 0.449382 0.151510 2.966018 0.0030 B1(2) 0.616743 0.067245 9.171604 0.0000

R(1,2) 0.107338 0.080460 1.334054 0.1822

The variance equation coefficients, C(9) – C(15) and Transformed

Variance Coefficients: M(1), A1(1), B1(1), M(2), A1(2), B1(2), R(1,2) under

the Constant Conditional Correlation are the same. In other words, C(9)

= M(1); C(10) = A1(1); C(11) = B1(1); C(12) = M(2); C(13) = A1(2); C(14)

= B1(2) and C(15)= R(1,2). These correspond directly to the coefficients of

the system in eqn. 33, which for brevity can be mapped as follows:

Page 105: Modelling volatility using EViews - cmi.comesa.int

............................................................. Modelling Conditional Volatility in a Multivariate Framework

93 |

1,1

1133

2

1

2

1,1

1133

2

1

1133

2

2

2

1,1 )11()1(1)10()1(1)9()1(

t

TABLEEQN

t

TABLEEQNTABLEEQN

t hCBCACMh

1,2

1133

2

2

2

1,2

1133

2

2

1133

2

2

2

1,2 )14()2(1)13()2(1)12()2(

t

TABLEEQN

t

TABLEEQNTABLEEQN

t hCBCACMh

5.0

,2,1

1133

12,12 )15()2,1( tt

TABLEEQN

t hhCRh

Thus, an easy to follow form of computer generated output in Table 11 is

given in Table 12.

Table 12: CCC estimates for bi-variant GARCH(1,1)

Estimated system mean Equations

Endogenous variable Cons DLCPI(-2) DLCPI(-3) DLEXR(-1)

DLCPI 0.003* (3.983)

0.217** (2.227)

0.158*** (1.834)

0.049* (3.369)

DLEXR 0.003***

(1.698) -0.719* (-2.583)

0.411*** (1.681)

0.494* (5.580)

Variance and covariance Equations

Cons RESID1 (-1)^2

RESID2 (-1)^2

GARCH1 (-1)

GARCH2 (-1)

SQRT(GARCH1* GARCH2

GARCH1

0.000*** (1.902)

0.312*** (1.726)

0.413** (2.095)

COV1_2

0.107 (1.334)

GARCH2 0.000

(1.580) 0.449* (2.966)

0.617* (9.172)

Notes: Covariance specification assumption: Constant Conditional Correlation (CCC). In

parentheses are z-statistics. Robust standard errors and covariance are due to Bollerslev-

Wooldridge, and the presample covariance assumption: backcast (parameter =0.7).Asterisks *,

**, and *** represent 1 percent, 5 percent and 10 percent levels of significance, respectively.

These results are consistent with those estimated under the Covariance

specification assumption of diagonal BEKK, except that here, the spill over

effects are absent despite the strong causal effect of exchange rate

depreciation on CPI inflation and vice versa in the estimated system mean

Page 106: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

94 |

equations (upper window of the results table). I would be hard pressed

therefore to prefer this to the former, in the context of Uganda, and indeed

many COMESA small open economies, which are ideally vulnerable to both

domestic and external shocks.

Exercise 4

We have demonstrated the estimation of GARC(1,1) in a multivariate

environment, in particular, estimation of BEKK and CCC models. As with

exercise 3, the sheet named multiple in guideline exercises file, there are

three series, exr, cpi and 91-day T-bill, some 143 observations for each of

the variables for July 2005 to May 2017. In this exercise, consider a vector

of two variables: nominal exchange rate and the risk free 91-day T-bill rate

to perform the following tasks:

1. Use your economic intuition to fit a specification for a single equation

involving nominal exchange rate and 91-day T-bill

2. Based on (1), estimate a bi-variate GARC(1,1) model in

i). diagonal BEKK framework

ii). CCC representation framework

iii). Interpret the results and show how these compare across the two

competing analytical methodologies.

3. Plot conditional covariance structure arising from both the estimated

BEKK and CCC frameworks.

Page 107: Modelling volatility using EViews - cmi.comesa.int

Chapter 5

Forecasting Conditional Volatility and

Forecast Performance Evaluation

Consider the GARCH (1,1) model:11

2

110 ttt hh

5.1: One-step-ahead Forecast

Simply update th by one period and since 2

t and th are known in period t ,

one–step-ahead forecast is:

ttt hh 1

2

101 .

5.2: The j-step-ahead Forecasts

First, we know that:

ttt hv22

Updating this by j periods gives:

jtjtjt hv 22

Taking the conditional expectations gives:

)( 22

jtjttjtt hvEE

The fact that 0,cov jtjt hv

and12 jttvE

, it follows that:

Page 108: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

96 |

jttjtt hEE 2 (34)

Update eq. 23 by j-periods and take the conditional expectation to obtain:

11

2

110 jttjttjtt hEEhE

Combine this with eq. 34 to get:

1110 )( jttjtt hEhE (35)

Using eq. 35 and given 1th , it is possible to obtain the j-steps-ahead forecast

of the conditional variance recursively.

t

jj

j

jtt hhE )(...1 11

1

11

2

11110

Providing 111 , the conditional forecast of jth will converge to the

long-run value

11

0

1

tEh

5.3: Forecast Evaluation

Once an appropriate model (one in which all ideal conditions hold) has

been chosen and all the diagnostic tests are done, the next step is to test for

accuracy of the forecasts. Several tests are used to determine the accuracy of

the forecasting model, including;

The Mean Absolute Error (MAE) =

n

t

tn 1

1

The Mean Square Error (MSE) =

n

t

tn 1

21 .

The lower the values of MAE and MSE, the better the forecasts

Page 109: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

97 |

Mean Absolute Percentage Error (MAPE) =

ht

Tt t

tt my

yy

1

ˆ100

Where ty and

ty are the actual and forecast values, respectively and m is

the number of observations. MAPE is used to compare the fits of different

forecasting and smoothing methods. Smaller values usually indicate a better

fitting model.

Root Mean Squared Error (RMSE) = 21

1

1

T

j

jtjt AFT

Where A represents actual values and F represents the forecasts. The RMSE

is representative of the size of the error because it is measured in the same

units as the data. A lower RMSE signifies better/more accurate forecasts

Theil’s Forecast Accuracy (U) =

5.0

1

2

5.0

1

2

n

i

i

n

i

ii

A

AP

Where P and A stand for a pair of predicted and observable values. If the

theil Coefficient is 0 then, P=A, therefore perfect forecasts. If the theil

coefficient is greater than 1, then the forecasts are not good. In other words,

the closer the theil coefficient is to zero, the better the forecasts.

5.4: Performing the Exchange Rate Forecast in a Univariate

GARCH(1,1) Framework Using EViews Screens and

Statistical Output Tables

The first thing to note is that the data from which GARCH(1,1) model in

column 2 of Table 5 derives contains observations spanning 1997M01 –

2017M01. This historical data is vital for performing in-sample forecast for

forecast evaluation purposes. To be able to perform out-of-sample forecast,

we will need to resize the sample to include the forecast horizon, which in

this exercise, shall be set at 9 months from the latest available observation.

Page 110: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

98 |

This then requires that the end date is set to 2017M10, a resizing which is

easily done from within the EViews work space window (this is

demonstrated later).

The first step to this task therefore, is to re-estimate the GARCH(1,1)

model in in column 2 of Table 5. As it is better having to forecast the

actual exchange rate series, we will this time re-estimate the GARCH(1,1)

model in column 2 of Table 5, butusing the following command for the

mean equation d(log(exr)) c ar(1) – where d(log(exr)) is the first difference of

the log of exr and c and ar(1) are the constant and the first autoregressive

parameters to be estimated. The rest of the provisions, including the

appropriate boxes in Options remain unchanged as described in the steps

leading to the results in Table 5 above. This alteration in the mean equation

command should appear as in the screen print here-under.

Page 111: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

99 |

With these entries, press the enter button on your key board to replicate the

exact results in column 2 of Table 5, and which for purposes of describing

the route to forecasting, the screen print is provided here-under.

I will now describe the route to performing in-sample forecast. Whilst in the

GARCH(1,1) output window (shown in the screen shot above), click on the

Forecast icon and as you will see in the Forecast dialog box (also

provided below) which pops up, EViews displays the necessary information

about the forecast.

Page 112: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

100 |

Ensure, as in default, the Series to forecast is EXR. The other alternative,

D(LOG(EXR)), would forecast month-on-month depreciation, but in log

form. Implicitly, the modeller would be required to make backward

calculations, to convert the resulting depreciation numbers to actual

exchange rate series. In addition to choosing the Series to forecast, i.e. EXR

(repeated for emphasis), we have to provide the following information:

Forecast name, which by default is given as exrf, where f is forecast. You

can however change this, but remember to make it different from that of

the dependent variable else the dependent variable is over written. Note that

the S.E. dialog box is given as optional and is indeed black. However,

because of the forecast uncertainty and the need as such to indicate 2

confidence bands, we will declare in this box, exrf_se.

Forecast sample: We want to perform, first, in-sample forecast to judge how

accurate our out-of-sample forecasts are likely to be. To produce

particularly appealing forecast, which is distinct from history, we will need

to adjust the data forecast range say to 2011M01 2017M01(which is part of

the series history) and is easily executed within the active output window.

Simply minimize (do not close) the current active GARCH(1,1) output

window and get back to the work space window. Double click on range in

Page 113: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

101 |

the series window and adjust the Start to 2011M01. Note that the resized

sample is well within our original sample data. Click OK (you will see this

resizing removes 168 historical observations – which you accept by

checking Yes). Here after, make active the output window again. With this,

the Forecast sample, adjusts to 2011m01 2017m01.

Forecasting Method, a choice has to be made between Dynamic and Static

forecast methods. Dynamic calculates dynamic, multi-step forecasts starting

from the first period in the forecast sample, and is available only when the

estimated equation contains dynamics, i.e. lagged terms of the dependent

variable. Static calculates a sequence of one-step ahead forecasts, using the actual

rather than forecasted values for lagged dependent variable. Both methods

perform in-sample forecasts, but the question of which of the two

outperforms the other is an empirical one. Because we will be performing

out-of-sample forecast, we will choose the default, Dynamic forecast, and

also select Coef uncertainty in S.E. calc, to allow for some degree of

forecast uncertainty, as having accurate forecasts are a wish but never a

reality in the modelling world.

Forecast standard error (S.E) measures the forecast variability, and are

majorly due to two sources of forecast uncertainty. First, is the innovation

uncertainty, which arises because the innovationst in the equation used to

forecast are unknown for the forecast period, but while performing

forecasts, EViews replaces this with t expectations. While it is true by

assumption that 0tE , we know that the individual values of t are

non-zero – which suggests that the larger the variation in the individual

residuals, the greater the overall error in the forecasts. Second, is coefficient

uncertainty, which arises because the estimated coefficient deviates from

the true coefficient in a random fashion. Coefficient uncertainty therefore

measures the precision with which the estimated coefficient measures the

true coefficient . Besides these two, an additional uncertainty is generated

when lags of the dependent variable are used as explanatory variables. These

uncertainties, collectively or individually, make point forecasts less realistic

and is a reason why in applied work, we report interval forecasts – informed

Page 114: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

102 |

by the S.E. Interval forecasts are given with 2 S.E bands, which provides

approximately 95 percent forecast interval. In other words, providing the

forecasting model is well specified and is evaluated as relatively accurate, the

forecast of the actual value of the dependent variable will fall inside these

bounds 95 percent of the time. This is much more nicely illustrated using

fan charts, but for technical reasons entirely associated with versions of

EViews prior to version 9.5, will not be produced in this guideline.

Output - shows us how to see the forecast output, as a graph and numerical

forecast evaluation. The latter is available only for in-sample forecasts.

With these specifications, click OK to display in-sample forecast results.

Figure 12: In-the-Sample forecast performance

The top graph is the forecast of exr (exrf) from the mean equation with 2

S.E bands. The second graph is the forecast of the conditional variance. As

can be seen, the Theil Inequality coefficient is 0.037, which is not only less

than one but also extremely low. The other ratios, namely RMSE (212.372),

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

2011 2012 2013 2014 2015 2016

EXRF ± 2 S.E.

Forecast: EXRF

Actual: EXR

Forecast sample: 2011M01 2017M01

Adjusted sample: 2011M03 2017M01

Included observations: 71

Root Mean Squared Error 212.3724

Mean Absolute Error 166.9608

Mean Abs. Percent Error 5.979584

Theil Inequality Coefficient 0.036861

Bias Proportion 0.035133

Variance Proportion 0.136396

Covariance Proportion 0.828471

.00060

.00065

.00070

.00075

.00080

.00085

.00090

2011 2012 2013 2014 2015 2016

Forecast of Variance

Page 115: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

103 |

MAE (166.961) and MAPE (5.979) may appear elevated, but relative to the

units of level EXR in which they are being measured, they are by all means

very low too. Indeed, as with Theil Inequality coefficient, the Bias (0.035)

and Variance (0.136) proportions are very close to zero and Covariance

proportion (0.828) is less than one. All these suggest relatively accurate

forecasts. In other words, the in-sample forecast performance seems

satisfactory, but this could be enhanced, especially by looking at forecast of

the same from other competing models. However, a key limitation of

ARIMA class of models is that they are known to have a very long memory

so that the resulting forecast, as is indeed the case herein, only seem sensible

over a very short horizon, while over the long term, they tend to revert to

the long-run average, provided in eqn. 1, 1 . The forecasts would be

explosive, i.e. not revert to the long-run steady state or average, if in the

estimated model used to generate forecasts 1 . This would be true if the

d.g.p used in the estimation of the model used for forecasting, is

nonstationary or contains a unit root or unit roots.

We now need to compare actual and forecast values of EXR, with

confidence bands around the forecast. To do this, first minimize (do not

close) the output window above and thereafter, perform several additional

important calculations. The first of this involve calculating the lower and

upper confidence bands around the forecast. Turning to the work space, we

see two additional series, exrf and exrf_se, in the series window. Note that

exrf_se series is only available for the forecast period of 2011M01 to

2017M01 and is NA elsewhere. We use the two series, exrf and exrf_se to

construct 2 confidence bands around the forecast, where (+) is the upper

band (ub) and (-) is the lower band (lb). To do this, execute in the command

window the following commands, but one at a time: genr

exrf_ub=exrf+1.96*exrf_se(where ub=upper band) and then genr

exrf_lb=exrf-1.96*exrf_se (where lb=lower band) and +/- 1.96 is the

statistical approximation of +/- 2 S.E. Once this is done, you will need

again to resize the historical EXR series, which is easily achieved through

the Range operation in the work space window following the procedure

described earlier. Note that in here, I do adjust the Start date back to

1997M01 and through the edit window, paste in the historical EXR series

Page 116: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

104 |

for the period 1997M01 to 2010M12. With this, open as a group and graph

exr (actual), exrf (the forecast), exrf_ub (upper band confidence interval) and

exrf_lb (lower band confidence interval), adjusting the sample say from

2008M01 to 2017M01 (which makes the graph even more appealing). This

is done by checking and adjusting the sample period in Sample icon of this

very graph window.

Figure 13: Actual and in-the-Sample forecast with confidence bands

This shows that the actual exchange rate, in 2011M03, which is exactly 3

months from the start of the forecast horizon, could fall in the range of Shs

2,253 – Shs 2,453 per USD, with the actual point forecast of Shs 2,353 per

USD, which is the same as the actual exchange rate corresponding to that

time. Extending this to 6 months into the forecast horizon, the forecast

reveals that the exchange rate could fall in the range of Shs 2,114 – Shs

2,666 per USD. The point forecast as of 2011M06 is Shs 2,390 per USD,

which is off the corresponding actual exchange rate of Shs 2,461 per USD,

but within the upper band. The quality of the forecast clearly deteriorates as

the forecast horizon increases – indeed as has already been discussed.

Next, if we can make active the output window for Fig. 12 (recall this was

minimized), we will choose Proc within this very active window and

navigate through the drop-down menu to Make GARCH Variance Series...,

1,000

2,000

3,000

4,000

5,000

6,000

2008

:01

2009

:01

2010

:01

2011

:01

2012

:01

2013

:01

2014

:01

2015

:01

2016

:01

EXREXRFEXRF_LB

EXRF_UB

Page 117: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

105 |

for which we will retain the default name as garch01. Click OKto complete

the procedure. After this series has been generated and now part of the

series in the variable window, double click on it (garch01) and you will see

that these forecasts cover the period for which exr series is observed and is

exactly as in Figure 10.

We now turn to performing out-of-sample forecast. Again, the first thing

we do is to ensure we have exactly the same model for the results in column

2 of Table 5. Minimize these results window and adjust the data Range, in

the work space window so we accommodate the out-of-sample forecast

period, here set at 9 months ahead of 2017M01. Double click on the Range

and adjust the End date to 2017M10 and click OK. EViews will show you

the number of observations; in this case 09 that have been added, and if in

agreement, click yes. If you recall the spread sheet for exr series, you will

see that the data points for the period 2017M02 – 2017M10 are all indicated

as NA. These are the out-of-sample data points that we have to forecast.

After adjusting for the data range, recall or make active the estimated output

window and check Forecast icon as before. Provide for exrf_se in the S.E

dialog box, as before, and edit the entry for Forecast sample to 2017M02

2017M10. Note that the forecast sample may or may not overlap with the

sample of observations used to estimate the equation. Edit the space for

GARCH (optional) with GARCH_forecast (here the forecasts will be

stored), as shown under.

Page 118: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

106 |

User supplied

Trimmed for out-of-sample

Check OK to display the following out-of-sample forecast results:

Figure 14: Depreciation forecast

This operation automatically updates exrf and conditional variance to

include the out-of-sample forecast and conditional variance/volatility. Both

of these are retrievable from the variable window. AS with Fig. 13, Fig. 14

plot exrf, exrf_lb and exrf_ub, where exrf_lb and exrf_ub are computed in

exactly the same way as before. Also note that exrf series is adjusted to

include historical data for the period 1997m01 – 2017m01 by EViews own

routines. In Fig. 15, we have intentionally adjusted the sample period for the

graph to cover 2016m01 to 2017m10.

2,800

3,200

3,600

4,000

4,400

4,800

M2 M3 M4 M5 M6 M7 M8 M9 M10

2017

EXRF ± 2 S.E.

.00025

.00030

.00035

.00040

.00045

.00050

.00055

02 03 04 05 06 07 08 09 10

2017

Forecast of Variance

Page 119: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

107 |

Figure 15: Nominal Exchange rate forecast

We see that exchange rate is forecast in the range of Shs 3471.43 – Shs

3780.226 at the beginning of the forecast period, but then the forecast

deteriorates to the range of Shs 3073.699 – Shs 4486.953 at the end of the

forecast horizon. The forecasts are off the actual exchange rate outturns for

March, April and May 2017 by Shs. 16.93, Shs -2.00 and Shs. -6.601,

respectively. Nonetheless, you must avoid as much as possible, mentioning

point forecasts (because very definitely, the outturn will be off the point

forecast). The graph below compares the measured and forecast conditional

volatility.

Figure 16: Historical and volatility forecast

3,000

3,200

3,400

3,600

3,800

4,000

4,200

4,400

4,600

I II III IV I II III IV

2016 2017

EXRFEXRF_LB

EXRF_UB

.0000

.0005

.0010

.0015

.0020

.0025

.0030

.0035

.0040

.0000

.0005

.0010

.0015

.0020

.0025

.0030

.0035

.0040

199

7:0

1

199

8:0

1

199

9:0

1

200

0:0

1

200

1:0

1

200

2:0

1

200

3:0

1

200

4:0

1

200

5:0

1

200

6:0

1

200

7:0

1

200

8:0

1

200

9:0

1

201

0:0

1

201

1:0

1

201

2:0

1

201

3:0

1

201

4:0

1

201

5:0

1

201

6:0

1

201

7:0

1

Historical conditional volatilityForecast conditional volatility(rhs)

Page 120: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

108 |

In both cases, compared to the historical depreciation and evolution of the

conditional variance, the future trajectory is less volatile, i.e. is relatively

stable. In fact, comparing history and forecast numbers, depreciation

averaged 0.86 percent in the 9 months to Jan 2017 (monthly average

depreciation of about 0.10 percent) and is forecast to average 0.54 percent

in the 9 months from February 2017 (average monthly depreciation of 0.06

percent). Nonetheless, the out-of-sample forecast over a relatively long

horizon converges to the unconditional variance, largely because of the

strong memory embedded in the AR structure.

5.5: Performing the Forecast in a Multivariate GARCH(1,1)

Framework Using EViews Screens and Statistical Output

Tables

As a starting point, we need to adjust the End date of the data points in the

Multivariate page of our EViews COMESA_2017 work file, following

pretty similar procedures described earlier, to 2017M10. Note that with this

resizing of the sample size, all these out-of-sample data points for the period

2017M02 – 2017M10 are indicated as NA and they are the data points that

we have to forecast. Next, we will need to recall the EViews window for the

BEKK estimated output in Table 9. Here, I reproduce the same following

the procedures detailed earlier.

Page 121: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

109 |

Output window

Whilst in the output window, click on Proc and select from the drop down

menuMake Model. You will see the following window given as Equations: 2

Baseline.

Equation 2

Page 122: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

110 |

Whilst in this window, click again at Proc and select from the drop-down

menuSolve Model…This gives us the following print screen.

This EViews screen has a number of dialog boxes in which we have to

provide user specific input. The good news though is that a great majority

of the input is common knowledge and as can be seen, EViews generously

fills out most of them and are given as default. Under Simulation type,

change from default of Deterministic to Stochastic- reason being that all

our entries in the mean equation are really stationary, i.e. in first difference

and lags of first difference. Deterministic applies if series are in level i.e.

non-stationary. Save for this, the default in the rest of the dialog boxes is

fine. The estimation allows for a dynamic structure of the model - the fact

that we have lags in the mean equation devoid it from being static and

allows for Std Dev in both the Baseline and Alternate Scenarios. Solution

sample should be the forecast horizon, here 2017m02 – 2017m10, which is

our 9 months out-of-sample forecast horizon. These have been adjusted for

in the screen shot above.

Page 123: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

111 |

The rest of the entries remain as in default, but briefly, under Solution

scenarios & output, we’re estimating an active model as Baseline,

providing for Std Dev – checked in the appropriate box. Check stochastic

option (in the menu of the window) and declare Baseline in the Page

Name dialog box and check Include coefficient uncertainty. Check also

Diagnostics (in the menu of the window) and check display detailed

messages including iteration count by block, and click OK to execute the

instructions, which then prints output of the form:

Ideally this shows whether the model has successfully solved or not and as

can be seen, here it is shown the model solve is complete with 1000

successful repetitions, 0 failure(s) – which is all good news in this round of

application – but note that in some applications, this is not always the case

as successive failures may be generated but consider this as a learning point

rather than frustration – it happens even to the most experienced seasoned

forecasters. Now turn to the series window, to see as highlighted, series

with extensions of _0m and _0s for all system variables being modelled.

Page 124: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

112 |

Check again Proc in this very window and in the drop-down menu, select

Make Graph…, a route shown in the print screen below:

This brings forth the following screen print:

Page 125: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

113 |

The only change we make in this is under Graph series, where in the dialog

box for Solution series, we choose from the drop-down menu, mean +/-2

Std. Deviation, replacing the default of Mean of Stochastic. Note that we

have set the Sample for graph to 2016M01 2017M10. Click OK to execute

this to give the graph in Fig.17.

Figure 17: Inflation and Depreciation forecast

The actual forecast numbers, if interested, can be retrieved either in a new

EViews page named Baseline (if you made provisions for it) or from the

workspace window, and is given with an extension _0 (if in a new EViews

page) or _0m if saved in the original work space window as in the screen

print below.

-.010

-.005

.000

.005

.010

.015

.020

III IV I II III IV

2016 2017

Actual

DLCPI (Baseline Mean)

DLCPI ± 2 S.E.

-.06

-.04

-.02

.00

.02

.04

.06

.08

III IV I II III IV

2016 2017

Actual

DLEXR (Baseline Mean)

DLEXR ± 2 S.E.

Page 126: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

114 |

_0m is the baseline mean forecast, both for in- and out of- sample forecast.

_0s is the baseline standard deviation, covering only the forecast horizon

and measures the extent to which the forecast deviates from the

unconditional variance. Using this, we might want to open as a group dlcpi,

dlcpi_0s, dlexr, and dlex_0s. Since dlcpi_0s and dlexr_0s only begin at 2017m02

and the level and baseline mean forecasts (_0m) are the same for the

corresponding periods, double click on Edit +/- (this allows us to edit the

open spread sheet), then copy the historical dlcpi/dlexr series and paste it

over the NA space in the columns for dlcpi_0s/dlexr_0s (2005m08 –

2017m01). After this, check again Edit +/- to effect the changes. This

should effectively enable us to plot and compare historical and predicted

values of dlcpi and dlexr as in Fig. 18.

Page 127: Modelling volatility using EViews - cmi.comesa.int

......................................... Forecasting Conditional Volatility and Forecast Performance Evaluation

115 |

Figure 18: Inflation and Depreciation forecast

-.01

.00

.01

.02

.03

.04

2005:07

2006:01

2007:01

2008:01

2009:01

2010:01

2011:01

2012:01

2013:01

2014:01

2015:01

2016:01

2017:01

DLCPI (Baseline Mean)

DLCPI (Baseline S.D.)

-.12

-.08

-.04

.00

.04

.08

.12

2005:07

2006:01

2007:01

2008:01

2009:01

2010:01

2011:01

2012:01

2013:01

2014:01

2015:01

2016:01

2017:01

DLEXR (Baseline Mean)

DLEXR (Baseline S.D.)

Like in the univariate case, the future evolution of the depreciation and

inflation appear less volatile, at least when compared to history.

Depreciation averaged 0.86 percent in the 9 months to Jan 2017 (monthly

average depreciation of about 0.10 percent). Over the same 9 months to

October 2017, bi-variate period average nominal exchange rate depreciation

forecast is 0.4 percent, which is an average monthly depreciation of 0.04

percent. Unfortunately, in the framework, the accuracy of the forecast

cannot be evaluated and for some reason, purely related to the model at

hand, these are mean forecasts and not conditional covariance forecasts.

Page 128: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

116 |

Exercise 5

This exercise uses the models estimated in exercises 3 and 4.

1. Based on the appropriate model in exercise 3,

i). Perform and evaluate the in-sample forecast

ii). Perform 12-period ahead forecast of the measured conditional

volatility, and comment on the observed future trajectory of

inflation.

2. Based on the estimated a bi-variate GARC(1,1) model in exercise 4,

perform 18-month ahead forecast for exchange rate depreciation and

91-day T-bill in a diagonal BEKK framework

Page 129: Modelling volatility using EViews - cmi.comesa.int

References

Baba, Y., R.F. Engel, D.F. Kraft and K.F. Kroner (1990), “Multivariate

Simultaneous generalizedARCH”, Mimeo, University of California at San

Diego, Department of Economics.

Beach, E.F. (1958), Economic Models: An Exposition, The Canadian Journal of

Economics and Political Science24 (3), 435 - 436

Bollerslev Tim (1986), Generalized Autoregressive Conditional Heteroskedasticity,

Journal ofEconometrics31: 307-27.

Bollerslev, Tim and Jeffrey M. Wooldridge (1992), Quasi- maximum Likelihood

Estimation andInferencein Dynamic Models with Time Varying

Covariances, Econometric Reviews11, 143-172.

Box, G.E.P. and Jenkins, G.M. (1976), Time Series Analysis: Forecasting and

Control. HoldenDay, San Francisco

Bwire, T., J. Opolot and F. L. Anguyo (2013), Exchange rate Pass- Through to

Domestic Prices in Uganda: Evidence from a Structural Vector Auto-

Regression (SVAR), Journal of Statistics and Econometric Methods2(4), 41 – 68.

Dejong, David N, and Chetan Dave (2007),Structural Macroeconometrics, Princeton,

New Jersey: Princeton University Press.

Dickey, D.A., and W. A. Fuller (1979), Distribution of estimators for

Autoregressive time series with aunit Root, Journal of American Statistical

Association74 (366): 427-31.

Enders Walter, Applied Econometric Time Series, John Wiley and Sons Ltd, 2010

(Chapter 3)

Engel, F. Robert (1982), Autoregressive Conditional Heteroskedasticity with

Estimates of the Variance of United Kingdom Inflation, Econometrica50(4),

987-1007

______ (2004), Risk and Volatility: Econometric Methods and Financial Practice,

The American Economic Review94(3), 405-420.

Engel, R.F. and Kroner K.F. (1995), Multivariate Simultaneous generalized ARCH,

EconometricTheory 11,122-150

E-views 7 User’s Guide 11, (Chapter 22-25)

Page 130: Modelling volatility using EViews - cmi.comesa.int

Modelling and Forecasting Volatility in Financial Markets Using E-Views .........................

118 |

Glosten L.R., R. Jagannathan and D.E. Runkle (1993), On the relation between the

expected value and the volatility of the nominal excess return on

stocks, Journal of Finance 48, 1779 1801.

Granger, C., and P. Newbold (1974), Spurious Regressions in Econometrics,

Journal of Econometrics2: 111-20

Harris, R and Sollis, R. (2003), Applied Time Series Modelling and Forecasting, John

Wiley and Sons Ltd, 2003 (Chapters 1 and 8)

Hamilton, J.D. (1994),Time Series Analysis, Princeton University Press,

Princeton.

Nelson D.B (1991), Conditional Heteroskedasticity in asset returns: A new

approach, Econometrica 59 (2), 347-70.

Phillips, P.C.B., and Pierre Perron (1988), ‘Testing for a unit root in Time Series

Regression’, Biometrika 75:335-46

Poon, S-H and C.W.J Granger (2003), Forecasting Volatility in Financial Markets:

A Review, Journal of Economic Literature XLI,478-539

Sulaiman, N., and Bwire, T. (2017), “The Macroeconomic responses to Petro

Shocks for Uganda”, Bank of Uganda working paperseries No. 04/2017.

William, H., Green (2003), Econometric Analysis, 5th Edition, Prentice Hall.