/* Apostolos Thomadakis
S2.125
Email: a.thomadakis@warwick.ac.uk
Personal webpage: https://sites.google.com/site/apostolosthomadakis/ */
cap log close
log using "H:\Documents\WESS\2016\Class3\arch.smcl", replace
set more off
use "H:\Documents\WESS\2016\Class3\arch.dta", clear
/* Brief history: 1979 was a turning point for the pound. Exchange controls were lifted, and for
the first time it was allowed to float. And it promptly fell. The fall of sterling
in the 1980s was due to the growing strength of the dollar, which climbed steadily
against all currencies (not just the pound) until 1985. But in 1985, currency
management started again. The Plaza Accord of 1985 introduced active depreciation
of the dollar against all major currencies including the pound, a strategy which
only ended with the Louvre Accord of 1987.
From 1987 onwards the government pegged the pound to the German Deutschmark in order
to establish some form of stability for the currency. This caused inflation (due to
the inappropriately low interest rate), a credit bubble and a property market boom
which eventually crashed in 1990, followed by a recession. In October of 1990 Britain
decided to join the ERM (European Exchange Rate Mechanism). However, less than two
years later the country forced to withdraw on "Black Wednesday" (16/09/1992) as
Britain's economic performance made the exchnage rate unsustainable.
In 1997 the Bank of England took control of interest rates with the responsibility
to set its base rate of interest so as to keep inflation very close to 2%. */
/*******************/
/* Questions 1 */
/*******************/
gen luke=log(uke)
/* It is common practice to use the log of the series rather than the series itself,
because changes in logs represent relative changes or percentage changes if the
relative changes are multiplied by 100. */
/*******************/
/* Questions 2 */
/*******************/
generate Date = tm(1980m1) + _n-1
format %tm Date
tsset Date
order Date uke ukp uks usp uss
twoway line luke Date /* which is similar to "tsline luke" */
/* We see that the volatility of log exchange rate: the aplitude of the changes
swings wildly from time to time. Not only that, it seems that there is a persistence
in the swings that lasts for some time (volatility clustering).
The variance of a random variable is a measure of the variability in the values
of the reandom variable. */
/*******************/
/* Questions 3 */
/*******************/
hist luke
kdensity luke
sum luke
sum luke, detail
/* The distibution is not normal since it is negatively skewed (skewness=-0.6989)
and the kurtosis is greater than 3 (kurtosis=4.6056). */
/*******************/
/* Questions 4 */
/*******************/
reg d.luke
/* Obtain the residuals from this regression, square them, and then regress by
adding one lag. */
predict resid, resid
gen sqresid=resid^2
twoway (line sqresid Date)
/* This shows wide swings in the squared residuals, which can be taken as an indicator
of underlying volatility in the exchange rate returns. Observe that not only are
there clusters of periods when volatility is high and clusters of periods when
volatility is low, but these clusters seem to be "autocorrelated". That is, when
volatility is high, it continues to be high from some time and when volatility is
low, it continues to be low for a while. */
reg sqresid L(-1).sqresid
/* The coefficient of the lagged residuals is statistical significant at 5%.
Therefore, we reject the null hypothesis that there is no ARCH effect, and we
conclude that the there is an ARCH effect */
/*******************/
/* Questions 5 */
/*******************/
/* Let's estimate an ARCH(8) model. In practice, we rarely use higher-order ARCH
models because they consume too many degress of freedom (i.e. too many parameters
need to be estimated). Besides, more economical models, such as GARCH, can be
easily estimated. We'll see that later. */
reg sqresid L(1/8).sqresid
/*******************/
/* Questions 6 */
/*******************/
arch d.luke, arch(1/8)
/* As we can see, all the lagged variance coefficients are positive, as expected.
The first is statistically significant at 5%, while the third and eighth only at
10% level. It seems that there is an ARCH effect in the exchange rate return.
A drawback of least squares approach to estimate an ARCH model is that there is
no guarantee that all the estimated ARCH coefficients will be positive. Remember
that the conditional variance must be positive.
Another reason the least squares method is not appropriate for estimating the ARCH
model is that we need to estimate both the mean function and the variance function
simultaneously. This can be done with the method of maximum likelihood. */
/*******************/
/* Questions 7 */
/*******************/
predict residarch, resid
gen sqresidarch = residarch^2
tsline sqresidarch
twoway (line sqresidarch Date) (line luke Date, yaxis(2))
/* Yes, the periods where the conditional variance is high coincide with the periods
where the are big changes in the exchange rate. */
twoway (line sqresidarch Date) (line d.luke Date, yaxis(2))
/*******************/
/* Questions 8 */
/*******************/
/* In its simplest from, in the GARCH model we keep the mean equation the same,
but modify the variance equation. This means that the conditional variance at time
t depends not only on the lagged squared error term at time (t-1), but also on the
lagged variance term at time (t-1). */
arch d.luke, arch(1) garch(1)
/* It can be shown that ARCH(p) model is equivalent to GARCH(1,1) as p increases.
Notice that in the ARCH(p) model we have to estimate (p+1) coefficients, whereas
in the GARCH (1,1) model we have to estimate only three coefficients.
From the results we can see that in the variance equation both the lagged squared
error term and the lagged conditional variance term are individually highly
significant. Since lagged conditional variance affecrs current conditional variance,
there is evidence that there is a pronounced ARCH effect.
We can conclude that there is clear evidence that the pound/dollar exchange rate
returns exhibit considerable time-varying and time-correlated volatility, whether
we use the ARCH or the GARCH model. */
predict residgarch, resid
gen sqresidgarch = residgarch^2
twoway (line sqresidgarch Date) (line luke Date, yaxis(2))
/*******************/
/* Questions 9 */
/*******************/
/* As we said in the lecture, an investor is interested not only in maximizing the
return on his investment, but also in minimizing the risk associated with such
investment. Therefore, we can modify the mean equation by explicitly introducing
the risk factor, the conditional variance, to take into account the risk. */
arch d.luke, arch(1/1) garch(1/1) archm
/* The mean equation now includes the risk factor, the conditional variance. The
risk factor is positive but insignificant (1.3212), suggesting that the mean retrun
is not affected by the risk factor. The positive sign means that higher risk implies
higher returns. */
predict residgarchm, resid
gen sqresidgarchm = residgarchm^2
twoway (line sqresidgarchm Date) (line luke Date, yaxis(2))
/*******************/
/* Questions 10 */
/*******************/
/* The insignificance of the GARCH-in-mean term suggests that the GARCH-in-mean
model is not better than the GARCH model in econometric sense.
The positive sign suggests that returns increase when volatility rises which is
consistent with financial economi theory. */
cap log close