Lab 3 Discussion Preamble before Exercise 1

10
Lab 3 Discussion Preamble before Exercise 1 Conclude that the Normal distribution is not a good choice for modelling the delta(t). Exercise 1 > jbtest(d) Skewness = -1.32993 Kurtosis = 38.15654 Jarque-Bera = 726773.9 p-value = 0 [1] 0 > Conclude: the JB test statistic is extremely large leading us to reject the i.i.d. Normal hypothesis.

Transcript of Lab 3 Discussion Preamble before Exercise 1

Page 1: Lab 3 Discussion Preamble before Exercise 1

Lab 3 Discussion

Preamble before Exercise 1

Conclude that the Normal distribution is not a good choice for modelling the delta(t).

Exercise 1

> jbtest(d)

Skewness = -1.32993

Kurtosis = 38.15654

Jarque-Bera = 726773.9

p-value = 0

[1] 0

>

Conclude: the JB test statistic is extremely large leading us to reject the i.i.d. Normal hypothesis.

Page 2: Lab 3 Discussion Preamble before Exercise 1

Exercise 1b

The left hand plot is the QQ plot of the delta(t) versus quantiles of the theoretical normal

distribution. The right hand plot is a QQ plot of simulated normal data versus the theoretical normal

quantiles. The right-hand plot should be repeated several times for you to judge how much deviation

from linear to expect under the Normal hypothesis. This example is typical and is very close to linear.

The left-hand plot is clearly non-linear compared to the right hand plot. Additionally it gets steeper

on both the left and right hand side which is consistent with the data having fatter tails than the

theoretical normal distribution.

Exercise 1c

Page 3: Lab 3 Discussion Preamble before Exercise 1

The bar shows the expected frequency in each of the 100 bins. Under the Normal hypothesis the

number of observations in each bin has a binomial distribution with parameters 14032 and 0.01,

leading to a mean of 140.32 and a standard deviation of just under 12. There are systematically too

many high counts in the middle (many way above 2StDev’s) and too few observations on the left and

right of the centre with the exception of the first and last bars. The first and last bars are way too

high given the binomial distribution. This is consistent with the data having much fatter tails than the

normal distribution.

The spikes in bin 1 and 100 are much more prominent than our ability to see fat tails in a histogram

of delta(t).

Exercise 2

Page 4: Lab 3 Discussion Preamble before Exercise 1

The red line is the standard t and has a higher variance than the N(0,1). The green line has a scaling

parameter s=0.707 that results in a t distribution with variance 1 to facilitate comparison with the

Normal. The t (green) has a narrower and higher peak than the Normal (black) and fatter tails.

> sum(density1)*dx# check that the density integrates to 1

[1] 1

> sum(density2)*dx# check that the density integrates to 1

[1] 0.9961293

> sum(density3)*dx# check that the density integrates to 1

[1] 0.9989458

The values are all close to 1 which indicates that we have programmed the densities correctly. The

discrete steps along with linear interpolation might result in values that are slightly different from 1.

Also a value slightly less than 1 as above indicates that there is a small but non-negligible probability

of falling outside the range -6 to +6. This probability is higher (as evidenced in the sums) for the

standard t which has the higher variance.

Chapter 4

Page 5: Lab 3 Discussion Preamble before Exercise 1

Comments: see the discussion in the chapter 4 notes!

The left hand plot is the QQ plot with theoretical geometric quantiles versus the interexceeedance

times for the data. The right hand plot is the same but with genuine random geometric data with the

same sample size. The right hand plot is typical for genuine Geometric data in terms of its variability

around a straight line. The left hand plot is far from linear. The gradient is too low for small values

Page 6: Lab 3 Discussion Preamble before Exercise 1

and too high for large values. These are consistent with too many small interexceedance times,

which in turn is consistent with clusters of high volatility and too many large interexceedance times

(low volatility) compared to the Geometric.

Left: plot of delta(t) with estimated stochastic volatility (the simple model) superimposed. Right:

volatility standardised residuals, Z(t). The time series plot of the Z(t) looks reasonably uniform with

no clusters of high or low volatility. There is possible evidence for skewness as there are more

negative extremes than positive extremes.

The ACF’s for Z(t) and Z(t)^2 are much closer than the delta(t) ACF’s to consistency with the i.i.d.

hypothesis.

Page 7: Lab 3 Discussion Preamble before Exercise 1

The QQ plot for the interexceedance times for the Z(t) looks reasonably linear, indicating that the

data are consistent with the i.i.d. hypothesis.

Page 8: Lab 3 Discussion Preamble before Exercise 1

Exercise 3: Different theta =0.9, 0.92, 0.95, 0.98

Page 9: Lab 3 Discussion Preamble before Exercise 1

The plots are all similar for the ACF(z(t)).

The ACF’s for Z(t)^2 are definitely worse for theta=0.95 and 0.98.

The QQ plots all look reasonable although theta=0.9 seems not as good, perhaps, as the others.

Exercise 4: mainly see what is in the detailed lecture notes for chapter 4.

> pv=mle.t(z1hat)

mu = 0.02548587

sigma = 0.9298973

nu = 8.414471

log-likelihood = -7419.633

> Y=(z1hat-pv[1])/pv[2]# should now be a standard t with pv[3] degrees of freedom

> uv=pt(Y,df=pv[3])

> hist(uv,nclass=100,col=3)

> abline(h=n/100)

Page 10: Lab 3 Discussion Preamble before Exercise 1

The histogram should look random and uniform. It is close to this but there is slight evidence for a

bit of skewness. There are slightly too many small values up to 0.1. Possibly too few between 0.1 and

0.5. Too many from 0.5 to 0.9, and too few above 0.9.

The standard deviation for the number of observations in each bin is about 7.