+ All Categories
Home > Documents > Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96...

Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96...

Date post: 08-Jun-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
32
Lesson 8: Testing for IID Hypothesis with the correlogram Umberto Triacca Dipartimento di Ingegneria e Scienze dell’Informazione e Matematica Universit` a dell’Aquila, [email protected] Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram
Transcript
Page 1: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Lesson 8: Testing for IID Hypothesis withthe correlogram

Umberto Triacca

Dipartimento di Ingegneria e Scienze dell’Informazione e MatematicaUniversita dell’Aquila,

[email protected]

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 2: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis

Given a time series {x1, x2, ..., xT}, we want establish if it can beconsidered a realization of an i.i.d. process

xt ∼ i .i .d .(0, σ2)

An i.i.d. process is a sequence of independent and identicallydistributed (i.i.d.) random variables with zero mean and varianceσ2

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 3: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis

We want to test the null hypothesis

H0 : ρk = 0

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 4: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis

The decision rule could be:

Reject H0 if |ρk | > c

where c is a constant.

How do we can choose the constant c?

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 5: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

We can choose c such that

P(|ρk | > c |H0) = 0.05

Now, we have

P(|ρk | > c |H0) = 1− P(|ρk | ≤ c|H0) = 0.05

This implies that

P(|ρk | ≤ c |H0) = P(−c√T ≤

√T ρk ≤ c

√T)

= 0.95

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 6: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

Ifxt ∼ i .i .d .(0, σ2)

then

√T ρk → N(0, 1)

This means that the standard normal distribution provides a goodapproximation to the true distribution of

√T ρk for large T .

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 7: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

It follows that

P(−c√T ≤

√T ρk ≤ c

√T)

= 0.95

if and only ifc√T = 1.96

and hence

c =1.96√T

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 8: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

Reject H0 if

|ρk | >1.96√T

that is if

ρk /∈[−1.96√

T,

1.96√T

]

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 9: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

If the data {x1, ..., xT} were really generated by an i.i.d. process,then about 95% of the sample autocorrelations ρ1, ρ2, ...ρn shouldfall between the bounds ±1.96√

T.

In other terms, if the considered process is i.i.d., we would expect5% of sample autocorrelations to lie outside the blue dashed lines.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 10: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

For example if we calculate the first 40 values of ρk , then oneexpects only two values which fall outside these limits.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 11: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

Consider the following time series

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 12: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

The correlogram for the data of this example is

We see that 2 of the first 40 values of ρk lie just outside thebounds ±1.96/

√T . As these occur not at relevant time lags, we

conclude that there is no evidence to reject the hypothesis that theobservations are independently distributed.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 13: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

If we compute the sample autocorrelations up to lag 40 and findthat more than two or three values fall outside the bounds, or thatone value falls far outside the bounds, we reject the i.i.d.hypothesis.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 14: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

Consider the following time series

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 15: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

We reject the i.i.d. hypothesis.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 16: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

Consider the following time series

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 17: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Testing for i.i.d. Hypothesis with the correlogram

In this case, only one value of ρk lies outside the bounds±1.96/

√T . However, this occurs at lag 1, a relevant time lag.

Thus, we reject the i.i.d. hypothesis. As we will see, in this case,an MA(1) model could be appropriate.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 18: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

Are the prices of financial assets random walk?

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 19: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

The process {xt ; t ∈ Z} is a random walk if

xt = xt−1 + ut

where ut ∼ i .i .d .(0, σ2).The increments, or first differences of x , are independently andidentically distributed (i.i.d.). Thus the increments areunpredictable.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 20: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

Usually, to investigate whether the data are RW, the firstdifference data

∆t = xt − xt−1

are used.The difference data should be i.i.d. (0, σ2) if the system is a RW.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 21: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

We examine the logarithm of the daily close prices of IBM stockfrom 3 January 2000 to 1 October 2002.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 22: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

The graph of the differenced (the returns) series is

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 23: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

The corellogram is given by

We accept the random walk hypothesis

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 24: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

Here, we consider monthly returns on Bank of New York stockfrom 1990.01 through 1998.12.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 25: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

The corellogram is given by

We accept the random walk hypothesis

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 26: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Squared Returns

Consider the series of the squared returns

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 27: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

The corellogram is given by

We conclude that the the squared returns are not i.i.d.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 28: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Test of the random walk hypothesis for financial data

Whereas the sample autocorrelations of the returns are close tozero, the correlogram of the squared returns shows quite a differentpicture: the squared return seems significantly correlated.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 29: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Portmanteau testing for i.i.d. processes

In addition to assess the individual significance of sampleautocorrelogram, at a specific lag, the researchers are ofteninterested to the joint significance of a set of sampleautocorrelations.

H0 : ρk = 0 for k = 1, ...,K

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 30: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Portmanteau testing for i.i.d. processes

If xt is an i.i.d. sequence with mean zero and finite variance, thenfor T large and K < T , the random variable

QK = TK∑

k=1

ρ2k

is approximately chi-square with K degrees of freedom.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 31: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Portmanteau testing for i.i.d. processes

Thus, the joint statistical significance of ρ1, . . . , ρK may be testedusing the Box-Pierce Portmanteau statistic

QK = TK∑

k=1

ρ2k

.

We reject the i.i.d. hypothesis

H0 : ρ1 = ρ2 = . . . = ρK = 0

at level α if QK > χ21−α,K , where χ2

1−α,K is the 1− α quantile ofthe chi-squared distribution with K degrees of freedom.The value K is chosen, somewhat arbitrarily, equal to 20.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram

Page 32: Lesson 8: Testing for IID Hypothesis with the correlogram · n should fall between the bounds 1p:96 T. In other terms, if the considered process is i.i.d., we would expect 5% of sample

Portmanteau testing for i.i.d. processes

A refinement of this test, formulated by Ljung and Box (1978), isobtained replacing QK with

QLBK = T (T + 2)

K∑k=1

ρ2k/(T − k)

whose distribution is better approximated by the chi-squareddistribution with K degrees of freedom. Large values of QLB

K leadto a rejection of the null hipothesis.

Umberto Triacca Lesson 8: Testing for IID Hypothesis with the correlogram


Recommended