Portmanteau test of independence - Univerzita...

Post on 13-Aug-2020

0 views 0 download

Transcript of Portmanteau test of independence - Univerzita...

Portmanteau test of indepen-dence

Stochastic Modelling in Economics and Finance 1

Petr Jonas

6th January 2014

Contents

1 Introduction

2 Test procedure

3 Finite sample performance

4 Application to credit card transaction and geomagneticvariation

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Introduction

Most tools of FDA rely on the assumption of iid functionalobservations⇒ portmanteau test of independence for functionalobservationsThe functional observations Xn(t), n = 1, 2, . . . ,N areapproximated by the first p terms of the principal componentexpansion (Xkn are the scores).

Xn(t) ≈p∑

k=1

Xknvk(t), n = 1, 2, . . . ,N (1)

If the populations FPC’s vk(t) are known ⇒ Testing the iidassumption for the curves Xn(t) reduces to testing thisassumption for the random vectors [X1n, . . . ,Xpn]T .We find multivariate analogs of correlations and an analog ofthe sum of squares which has a χ2 asymptotic distribution.

1

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

We observe zero mean random function{Xn(t), t ∈ [0, 1] , n = 1, 2, . . . ,N} and we want to test

- H0 : the Xn(t) are independent and identically distributed(iid)

- HA : H0 does not hold

2

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

We approximate the Xn(t) by EFPCs

Xn(t) =

p∑k=1

Xknvk(t)

where

Xkn =

∫ 1

0Xn(t)vk(t)dt =

∫ 1

0Xknvk(t)dt (2)

we take p components explains so that large fraction of samplevariance.

3

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

To establish the null hypothesis distribution we need followingassumptionASSUMPTION 1The observations X1, . . . ,XN are iid in L2, have mean zero andsatisfy

E ‖Xn‖4 = E

[∫ 1

0X 2n (t)dt

]2<∞ (3)

The eigenvalues of the (population) covariance operator Csatisfy

λ1 > λ2 > · · · > λp (4)

whereC = E [〈(X − µ), .〉 (X − µ)]

4

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

We will work with the following notation. Denote

Xn =[X1n, . . . , Xpn

]T(5)

andXn = [X1n, . . . ,Xpn]T (6)

where

Xkn =

∫ 1

0Xn(t)vk(t)dt (7)

5

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

under H0, the Xn are iid mean zero random vectors in Rp forwhich we denote

v(i , j) = E [XinXjn], V = [v(i , j)]i ,j=1,...,p

The matrix V is p × p covariance matrix of the Xn. Let usdenote the autocovariance matrix Ch with elements

ch(k, l) =1

N

N−h∑n=1

XknXl ,n+h 0 ≤ h < N

Definerf ,h(i , j) =

(C−10 Ch

)(i ,j)

rb,h(i , j) =(ChC

−10

)(i ,j)

and denote

QN = NH∑

h=1

p∑i ,j=1

rf ,h(i , j)rb,h(i , j) (8)

analogously we can construct QN from the vectors X6

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Theorem 7.1

If Assumption 1 holds, then

QND→ χ2

p2H (9)

(Chi-square distribution with p2H degrees of freedom)

7

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Let us consider a special case of functional AR(1) model

Xn+1 = Ψ(Xn) + εn+1 (10)

with iid zero mean innovations εn ∈ L2 and Ψ(x) the anintegral Hilbert-Schmidt operator. We assume that {Xn} isstationary solution to equation (10) (see chapter 13). Let usintroduce the p × p matrix Ψ with elements

ψlk = 〈vl ,Ψ(vk)〉 , l , k = 1, 2, . . . , p

where vk are the eigenfunctions of the covariance operator ofX1. If Ψ is not zero then Ψ is not zero for sufficiently large p

9

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Theorem 7.2

Suppose the functional observations Xn follow a stationarysolution to equation (10), assumption 1 hold and p is so largethat p × p matrix Ψ is not zero. Then

QNP→ +∞

10

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Finite sample performance

The simulation study focused on the power of the test forAR(1) model (10) which can be written as

Xn(t) =

∫ 1

0ψ(t, s)Xn−1(s)ds+εn(t), t ∈ [0, 1], n = 1, 2, . . . ,N

(11)The sufficient condition for the assumptions of Theorem 7.2 tohold is

‖Ψ‖S =

∫ 1

0

∫ 1

0ψ2(t, s)dtds < 1 (12)

In the study εn are Brownian Motions (BM) or BrownianBridges (BB)

11

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Two kernels are used.Gaussian kernel

ψ(t, s) = C exp(t2 + s2

2), t, s ∈ [0, 1]

and Wiener kernel

ψ(t, s) = C min(s, t), t, s ∈ [0, 1]

The constant C is chosen so that ‖Ψ‖S = 0.3, 0.5, 0.7

12

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

- The power increases with N

- The power increases with ‖Ψ‖S- The power is highest for lag H = 1 because for AR(1) the

”correlation” between Xn and Xn−1 is largest at this lag

13

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

72.png

14

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

The BM and BB have a different covariance structure andtherefore the power of the test for BB is higher.

15

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

73.png

16

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

The portmanteau test will be applied to the date from VilniusBank about transactions and the geomagnetic data

Bank dataSuppose Dn(ti ) is the number of credit card transactions in dayn, n = 1, 2, . . . , 200 between times ti−1 and ti , where ti − ti−1= 8 min (i = 1, . . . , 128).To remove weekly periodicity, the study works withXn(ti ) = Dn(ti )− Dn−7(ti ), n = 1, 2, . . . , 193.

17

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation Example of first 3 weeks of the data

18

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

17.jpg

19

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

The test rejects H0 at 1% level for smooth and lagged values1 ≤ H ≤ 5 and the number of principal components equal to4, 5, 10 and 20.Study also tried to apply the test to the residualsεn = Xn − Ψ(Xn−1).Next table displays the p−values for the sequence of residuals.

20

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

74.jpg

21

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Ground based magnetometer records

The study focus on horizontal (H) component measured atHonolulu in 2001. In the first two weeks the data are :

22

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

71a.png

23

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

After subtracting linear change over the day (the linear lineconnecting first and last point of the day), we obtain.

24

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

71b.jpg

25

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Testing one year magnetometer data with lags H = 1, 2, 3 anddifferent numbers of principal components p = 3, 4, 5 yieldsp−values very close to zero. The result of the test applied onsmaller subset gives

26

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

75.jpg

27

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

It advocated that the transformed data can to a reasonableapproximation be viewed as a functional simple random sample,at least with respect to the second order properties.The two examples discussed in this section show that our testcan detect departures from the assumption of independence oridentical distribution (magnetometer data), and confirm bothassumptions when they are expected to hold.

28

Portmanteautest

Introduction

Test procedure

Finite sampleperformance

Application tocredit cardtransactionandgeomagneticvariation

Thank You For Your Attention!

29