Content uploaded by Javier Fernández-Macho

Author content

All content in this area was uploaded by Javier Fernández-Macho on Dec 05, 2017

Content may be subject to copyright.

Time-Localized Wavelet Multiple Regression and Correlation

Javier Fernández-Machoa,∗

aDpt. of Econometrics & Statistics,

University of the Basque Country, Bilbao, Spain

Abstract

This paper extends wavelet methodology to handle comovement dynamics of multi-

variate time series via moving weighted regression on wavelet coefﬁcients. The concept

of wavelet local multiple correlation is used to produce one single set of multiscale

correlations along time, in contrast with the large number of wavelet correlation maps

that need to be compared when using standard pairwise wavelet correlations with rolling

windows. Also, the spectral properties of weight functions are investigated and it is

argued that some common time windows, such as the usual rectangular rolling window,

are not satisfactory on these grounds.

The method is illustrated with a multiscale analysis of the comovements of Eurozone

stock markets during this century. It is shown how the evolution of the correlation

structure in these markets has been far from homogeneous both along time and across

timescales featuring an acute divide across timescales at about the quarterly scale. At

longer scales, evidence from the long-term correlation structure can be interpreted as

stable perfect integration among Euro stock markets. On the other hand, at intramonth

and intraweek scales, the short-term correlation structure has been clearly evolving along

time, experiencing a sharp increase during ﬁnancial crises which may be interpreted as

evidence of ﬁnancial ‘contagion’.

Keywords: Comovement dynamics, Euro zone, local regression, multiscale analysis,

multivariate time series, non-stationary time series, stock markets, wavelet transform,

weighted least squares.

1. Introduction

One important aspect in the analysis of economic and ﬁnancial time series is the study

of the degree and behavior of their comovements at different periods and frequencies.

Whilst traditional time series analysis (TSA) is mostly based on cross-correlation functions

in the time domain, that is, on an observation-by-observation basis, Fourier analysis

∗Corresponding author: phone: +34 946013729, fax: +34 946017100.

Email address: javier.fernandezmacho@ehu.eus (Javier Fernández-Macho)

Preprint submitted to Physica A November 19,2017

allows for the visualization of the data in the frequency domain, that is, on a frequency-

by-frequency basis. In other words, traditional TSA provides full time resolution of such

relationships but does not expose frequency information while Fourier analysis has full

frequency resolution but does not preserve information in time. These types of analysis

implicitly assume stationarity, possibly after differences, as the main characteristic of the

time series under study [21, p.435].

The more recent wavelet analysis emerges as a compromise between both approaches,

with partial resolution in both time and frequency domains. Thus, the continuous wavelet

transform (CWT) allows for a visualization of the spectral features of the time series and

their comovements but as a function of both time and scale (frequency), separating their

different periodic components as they evolve over time [27,2].

The CWT is highly redundant on both time and scale dimensions, the latter not being

a desirable feature for regression/correlation decomposition over timescales. On the

other hand, the discrete wavelet transform (DWT) selects a minimal subsample of time-

frequency values from the CWT without loosing any information present in the original

data. This is an important feature for some engineering applications like signal and

image compression, but for most economic applications time redundancy is somehow

desirable as long as it allows for data features to be properly aligned and compared across

all scales/frequencies. In this sense, the maximal overlap discrete wavelet transform

(MODWT) is the most popular wavelet transform as it is redundant in the time dimension

but non-redundant in the scale/frequency dimension. MODWT is known to have several

important advantages, including energy preservation which is particularly important for

the main objective of this paper (28,27;20, p.135).

MODWT based wavelet multiple correlations (WMC) and cross-correlations (WMCC)

were introduced by Fernández-Macho

[15]

. These statistics distribute among the different

timescales the overall statistical relationship that might exist between several time series

and they have received some attention in the recent literature [see e.g.

5

,

2

,

37

,

6

,

7

,

23

,

24

,

1

,

34

,

36

, among others]. However, as with standard bivariate wavelet correlations,

it is implicitly assumed that the time series follow difference-stationary processes and,

therefore, that there exists a sufﬁciently long wavelet ﬁlter that eliminates this type of

nonstationarity from the data. In consequence, only one single global correlation per

scale needs be produced.

This notwithstanding, with economic and ﬁnancial time series, such data features are

probably non-stationary in nature and a regression/correlation analysis must be able to

handle and visualize a changing structure that evolves along time. Therefore, the present

paper generalizes the previous global WMC to a local multiple regression framework

where comovement dynamics across the different scales/frequencies can be analyzed

along time by using weighted or windowed wavelet coefﬁcients.

The proposed method is justiﬁed on several grounds. First of all, the alternative of

combining standard bivariate wavelet correlation analysis with rolling time windows

needs to calculate, plot and compare a large number of wavelet correlation graphs that

now would require an additional time dimension [

31

,

10

,

32

,

5

,etc.]. More speciﬁcally,

with

n

time series, a total of

n(n−1)/2

wavelet correlation maps would be required

2

each of dimension

J×T

, where

J=blog2(T/(L−1) + 1)c

is the order of the wavelet

transform,

L

is the wavelet ﬁlter length and

T

is the time series length.

1

Not surprisingly,

when dealing with all possible pairwise comparisons in a multiscale context, the analyst

may end up with a vast amount of potentially conﬂicting information that can be very

difﬁcult to process and even lead to the typical experimentwise error rate inﬂation

and the spurious detection of correlations at some wavelet scales [

15

]. In contrast,

the proposed method based on local multiple regression, consists in one single set of

multiscale relationships which can be expressed in a single scale-time correlation map.

This is not only easier to handle and interpret but also may provide a better insight of

the overall statistical comovement dynamics within the multivariate time series under

scrutiny. Also, in the proposed method the number of feasible scales remains the same

as in global wavelet analysis and does not depend on the length of the time window.

Therefore, long wavelet ﬁlters and windows of long length or even with inﬁnite support

like the gaussian weight function can be used. Finally, as discussed in section 4, the

spectral properties of the weight function need to be taken into account as, for example,

the usual rectangular rolling window will not be satisfactory on these grounds.

All this will be illustrated with the application of the proposed Wavelet Local Multiple

Correlation (WLMC) in the multiscale analysis of daily returns obtained from a set of

eleven Eurozone stock markets during the 17-year period of the present century during

which several ﬁnancial and debt crises have occurred. In this relation, we may point

out that correlation among European stock markets is a common measure of market

integration in the economic and ﬁnancial literature [see, e.g.,

18

,

42

,

22

,

38

,

4

, and others].

However, these studies do not usually take into account the fact that stock markets

involve heterogenous agents that make decisions over different time horizons (

20

, p.10,

19

), or that such comovement structure across different timescales may be evolving along

time. On the other hand, the relatively large but not uncommon number of markets to be

analyzed will render, as already mentioned, pairwise multiscale comparisons pointless

in practice, which is the reason why this type of market analysis may ﬁnd useful the

wavelet local multiple regression tools proposed here.

The paper is organized as follows. Sections 2and 3set up the framework for the

proposed wavelet local multiple regression tools and extend such framework with the

deﬁnition of the WLMC considering the decomposition of the time series structure

across different timescales. Sample estimators of these quantities and their approximate

conﬁdence intervals based on their large sample theory are also provided for estimation

and testing purposes. Section 4discusses the spectral properties of common weight

functions in local regression that can be used in practice and Section 5presents some

examples: the ﬁrst two with simulated changes along time in the correlation structure

across different timescales that serve to illustrate the validity of the proposed statistics

and, ﬁnally, a case study that shows the results of an empirical application using Eurozone

stock markets. Section 6summarizes the main conclusions.

1

For example, the empirical analysis in Section 5.3would need to handle a total of 55 wavelet correlation

maps of dimension 9×4542 each.

3

2. Outline of the method

The proposed method consists of the following steps: a) discrete wavelet transform

(MODWT), Section 3.1; b) weight function or rolling time window, i.e. moving averages,

Section 4; c) local least-squares regression and d) local multiple-correlation coefﬁcients,

Section 3; or a-b-d if only correlations are needed.

The use of rolling-window correlations in bivariate wavelet analysis has been proposed

by Ranta

[31]

, Dajcman et al.

[10]

, Ranta

[32]

, Benhmad

[5]

among others. However, many

studies seem to reverse the above order to b-a-d so that they calculate wavelet correlations

on a rectangular rolling window of data. In principle, since both a) and b) are linear

ﬁlters, it would appear that reversing this order does not matter. Indeed, this would be

the case if boundary conditions on the rolling window take into account surrounding

values from the complete series, but this is not done. Instead, each subsample selected

by the rolling window is taken as if it were a complete series with the usual standard

periodic or reﬂecting boundary conditions and wavelet coefﬁcients affected by such

boundaries customarily rejected. This explains why these authors complain of running

out of data points as the wavelet level increases and, trying to mitigate this boundary

problems, they are forced to use a ﬁlter with the shortest length such as the Haar ﬁlter,

which is not recommended due to its poor band-pass properties [

32

, p.142].

2

Using the

a-b-d order solves these problems without further ado.

3. Local multiple regression and correlation

Let

X∈Rn×R

be a

n

-variate time series observed at times

t

=1. . .

T

, and let

X−i=

X\ {xi}

for some

xi∈X

. We wish to obtain a linear function

fs(X−i)

that for a ﬁxed

s∈[1, . . . , T], minimizes a weighted sum of squared errors

Ss=min

fs

∑

t

θ(t−s)fs(X−i,t)−xit2, (1)

where

θ(x)

is a given moving average weight function, such as those in Table 1, that

depends on the time lag between observations Xtand Xs[cf. e.g. 26].

Thus, the local weighted least squares approximation around scan be written as

fs(X−i) = Ziβs,Zi=X−i−X−i, (2)

where

X−i

is the vector of values of

X−i

at ﬁxed

s

, and the unknown coefﬁcients

βs

can

be estimated as b

βs=∑

t

θ(t−s)ZitZ0

it−1∑

t

θ(t−s)Zit xit. (3)

2

Benhmad

[5]

seems to apply the preferred a-b-d order. Nevertheless, he uses DWT instead of MODWT

for the scale decomposition and, therefore, he also runs out of data points as the wavelet level increases.

4

The corresponding variance-covariance matrix can be estimated as

Vb

βs=σ2

s∑

t

θ(t−s)ZitZ0

it−1, (4)

where

σ2

s

is the error variance within a local neighborhood of

Xs

that is approximately

stationary.

Finally, letting

s

move along time we obtain a local regression

b

fs(X−i) = Zib

βs

and

the corresponding residual weighted sum of squares

RwSSs=∑tθ(t−s)Z0

it b

βs−

xit2.

These residuals could then be used to calculate a series of local coefﬁcients of

determination

R2

s=1−RwSSs

TwSSs

,s=1 . . . T, (5)

where

TwSSs=∑tθ(t−s)x2

it

is the total weighted sum of squares at time

s

. Alternatively,

they can also be obtained directly from the data correlation matrix as in [

15

] (see

Section 3.1below).

3.1. Wavelet local multiple correlation

Let

Wjt = (w1jt ,w2jt, . . . , wnjt )

be the scale

λj

wavelet coefﬁcients obtained by applying

the maximal overlap discrete wavelet transform (MODWT) [

20

,

27

] to each time series

xi∈X

in Section 3. Fernández-Macho

[15]

used a MODWT based global multiple

regression context to deﬁne the wavelet multiple correlation (WMC)

ϕX(λj)

, and its

companion wavelet multiple cross-correlation (WMCC), as single sets of multiscale

correlations and cross-correlations calculated for the multivariate time series

X

. However,

the evolution of nonstationary dynamics cannot be studied with these global measures

and therefore they need to be extended to a local multiple regression framework where

comovement dynamics can be properly analyzed.

Following [

15

], at each wavelet scale

λj

we calculate a series of local multiple cor-

relation coefﬁcients as the square roots of the regression coefﬁcients of determination

(Eq. (5)) for that linear combination of variables

wijt

,

i

=1. . .

n

, where such coefﬁcients of

determination are maxima. In practice, none of these auxiliary regressions need to be run

since, as it is well known, the coefﬁcient of determination corresponding to the regression

of a variable

zi

on a set of regressors

{zk

,

k6=i}

, can be obtained as

R2

i=1−1/ρii

,

where

ρii

is the

i

-th diagonal element of the inverse of the complete correlation matrix

P

.

Therefore, ϕX,s(λj)is obtained as

ϕX,s(λj) = s1−1

max diag P−1

j,s

,s=1 . . . T, (6)

where

Pj,s

is the

(n×n)

weighted correlation matrix of

Wjt

with weights

θ(t−s)

, and the

max diag(·)operator selects the largest element in the diagonal of the argument.

5

Since a regression coefﬁcient of determination can also be obtained as the square of

the correlation between observed values and ﬁtted values, we have that

ϕX,s(λj)

can also

be expressed as

ϕX,s(λj) = Corr(θ(t−s)½wijt,θ(t−s)½b

wijt)

=Cov(θ(t−s)½wijt ,θ(t−s)½b

wijt)

qVar(θ(t−s)½wijt )Var(θ(t−s)½b

wijt)

,s=1 . . . T, (7)

where

wij

is chosen so as to maximize

ϕX,s(λj)

and

b

wij

are the ﬁtted values in the local

regression of

wij

on the rest of wavelet coefﬁcients at scale

λj

. Hence the adopted name

of ‘wavelet local multiple correlation’ (WLMC) for this new statistic. Equation (7) will be

useful later in determining the statistical properties of an estimator of ϕX,s(λj).

Applying a MODWT of order

J

to each of the univariate time series in

X

we would

obtain

J

length-

T

vectors of MODWT coefﬁcients

e

Wj={e

Wj0. . . e

Wj,T−1}

, for

j

=1. . .

J

.

From Eq. (6) the WLMC of scale

λj

is a nonlinear function of all the

n(n−1)/2

weighted

correlations of

Wjt

. Alternatively, it can also be expressed in terms of all the weighted

covariances and variances of

Wjt

as in Eq. (7). Therefore, a consistent estimator of the

WLMC based on the MODWT is given by

e

ϕX,s(λj) = s1−1

max diag e

P−1

j,s

=Corr(θ(t−s)½e

wijt,θ(t−s)½b

e

wijt)

=Cov(θ(t−s)½e

wijt,θ(t−s)½b

e

wijt)

qVar(θ(t−s)½e

wijt)Var(θ(t−s)½b

e

wijt)

,s=1 . . . T, . (8)

The weighted wavelet covariances and variances can be estimated as

Cov(e

wijt,b

e

wijt) = γj,s=

T−1

∑

t=Lj−1

θ(t−s)e

wijt b

e

wijt,s=1 . . . e

T, (9a)

Var(e

wijt) = δ2

j,s=

T−1

∑

t=Lj−1

θ(t−s)e

w2

ijt,s=1 . . . e

T, (9b)

Var(b

e

wijt) = ζ2

j,s=

T−1

∑

t=Lj−1

θ(t−s)b

e

w2

ijt,s=1 . . . e

T, (9c)

where

e

wij

is such that the local regression of

e

wij

on the set of regressors

{e

wkj

,

k6=i}

maximizes the corresponding coefﬁcient of determination,

b

e

wij

denotes the ﬁtted values

and

Lj= (2j−1)(L−1) + 1

is the number of wavelet coefﬁcients affected by the boundary

associated with a wavelet ﬁlter of length Lat scale λj.

6

The large-sample distribution of the sample WLMC

e

ϕX,s(λj)

can be established along

similar lines as for the standard pairwise wavelet correlation [

20

]. In our present local

multivariate case, we note from Eq. (8) that

e

ϕX,s(λj)

is a nonlinear function of all the

sample weighted wavelet variances and covariances which, in turn, are just sample

moments of vectors of MODWT coefﬁcients. Therefore, the estimator can be written as a

function of the three local wavelet moments in Eq. (9):

e

ϕX,s(λj) = f(γj,s,δj,s,ζj,s) = γj,s

δj,sζj,s

. (10)

We may now apply the continuous mapping theorem to establish that

qe

Tjhe

ϕX,s(λj)−ϕX,s(λj)i∼ N(0, Vj,s), (11)

where

e

Tj=T−Lj+1

is the number of coefﬁcients unaffected by the boundary conditions

and

Vj,s=d f 0

j,sSj,s(0)d fj,s, (12)

with d fj,sas the gradient vector of f(γj,s,δj,s,ζj,s)and

Sj,s(0) =

Sγ2,j,s(0)Sδγ,j,s(0)Sζγ,j,s(0)

Sδγ,j,s(0)Sδ2,j,s(0)Sζδ,j,s(0)

Sζγ,j,s(0)Sζδ,j,s(0)Sζ2,j,s(0)

(13)

where e.g.

Sδγ,j,s(0)

is the spectral density function of the product of scale

λj

local wavelet

moments δj,sγj,sevaluated at the zero frequency, etc.[cf. 40].

In practice, obtaining the spectral density functions involved in the computation of

a consistent estimate of

Vj,s

can be very tiresome. As in [

20

] or [

15

], a more feasible

alternative can be obtained by using Fisher’s’s transformation [

16

]. In the present case,

applying the transformation to the sample wavelet multiple correlation coefﬁcient

e

ϕX(λj)

we obtain:

Theorem 1.

Let

X={X1. . . XT}

be a realization of a multivariate Gaussian stochastic process

Xt= (x1t,x2t, . . . , xnt)

and let

e

Wj={e

Wj0. . . e

Wj,T−1}

=

{(e

w1j0. . . e

wnj0)

,

. . .

,

(e

w1j,T/2j−1. . .

e

wnj,T/2j−1)}

,

j

=1. . .

J

, be vectors of wavelet coefﬁcients obtained by applying a MODWT of order

J

to each of the univariate time series

{xi1. . . xiT }

for

i

=1. . .

n

. Let

e

ϕX,s(λj)

be the sample wavelet

local multiple correlation (WLMC) obtained from Eq. (6). Then,

e

zj,s

a

∼ FN(zj,s,(T/2j−3)−1). (14)

where zj,s=arctanh(ϕX,s(λj)) and FN stands for the folded normal distribution.3

3

That is, the probability distribution of

abs(e)

such that

e

is normally distributed with the given mean

and variance.

7

Table 1: Weight functions

solid long dash short dash

blue lines: Uniform window: Cleveland’s tricube window: Epanechnikov’s parabolic

window:

u(x) = 1/(2M)c(x) = 701−x

M33/(81 M)e(x) = 31− | x

M|2/(4M)

red lines: Bartlett’s triangular window: Wendland’s truncated power window: Gaussian window:

b(x) = 1−| x

M|/M w(x) = 31−x

M44x

M+1/(2M)g(x) = e−(x/M)2/(√πM)

All windows θ(x)with compact support |x| ≤ Mand 0 value otherwise with M>0, except the Gaussian window that takes values

for x∈(−∞,∞). The line color and format refer to their graphical representation in Fig. 1.

The demonstration is straightforward along similar lines as in Fernández-Macho

[15]

.

X

being Gaussian implies that, at each scale

λj

, the sample wavelet coefﬁcients in

e

Wj

are

also Gaussian and, in turn, this means that

b

e

wij

, which is a linear combination of

e

w1j

,

. . .

,

e

wnj

, must also be Gaussian. Therefore, we have from Eq. (7) that

e

ϕX,s(λj)

is a correlation

coefﬁcient between weighted observations from two Gaussian variates, of which

T/2j

are

(asymptotically) serially uncorrelated.4Applying Fisher’s result the theorem follows.

Therefore,

CI(1−α)(ϕX,s(λj)) = tanh he

zj,s±φ−1

1−α/2/pT/2j−3i, (15)

where

φ−1

p

is the 100

p

% point of the standard normal distribution, can be used in practice

to construct a conﬁdence interval for the wavelet multiple correlation coefﬁcient, as well

as for testing hypothesis about the value of the wavelet correlation amongst a multivariate

set of observed variables X.

4. Weight functions and their spectral properties

In principle, any weight function satisfying the properties suggested by Cleveland

[8]

could be used and in fact many choices have been proposed in the literature [see e.g.

30

]. Table 1shows a selection of the six most widely used functions for averaging and

smoothing that are graphically depicted in Fig. 1. It can be shown that for all of them

R∞

−∞θ(x)dx =1, so that they can be described as moving averages.

However, the spectral properties of these moving averages differ much as shown by

the corresponding Fourier transforms in Figs. 2and 3. For example, the Fourier transform

of the variances needed to calculate the wavelet local correlations

ϕX(λj)

in Eq. (7) can

4

Note that this is the number of wavelet coefﬁcients from a DWT that can be shown to decorrelate a

wide range of stochastic processes [9].

8

-M

-M

2

0

M

2

M

1

2M

3

4M

1

M

3

2M

Figure 1: Some weight functions for local least-squares regression (see Table 1). Blue lines:

u(x)

solid,

c(x)

long-dash, e(x)short-dash; Red lines: b(x)solid, w(x)long-dash, g(x)thick short-dash.

be obtained from Eq. (9b) as

τ(ω) = 1

2πe

T

∑

s=1

e−iωsδ2

j,s=1

√2πe

T

∑

s=1

e−iωs1

√2π

T−1

∑

t=Lj−1

θ(t−s)e

w2

ijt

=1

√2π

T−1

∑

t=Lj−1

e−iωte

w2

ijth1

√2π

T−t

∑

s=1−t

e−iωsθ(s)i=ξ(ω)φ(ω),ω∈(−π,π), (16)

where

φ(ω)

, the Fourier transform of the weight function

θ(x)

, must be non-negative to

ensure that

τ(ω)≥0

. This is certainly a desirable property for the spectral decomposition

of a variance [cf. 30, p.438] and similarly for ζ2

j,sand γj,sin Eq. (9).

However, common weight functions such as the uniform window

u(x)

, Cleveland’s

tricube window

c(x)

[

8

] and Epanechnikov’s parabolic window

e(x)

[

14

] are not rec-

ommended because of the presence of negative values in their corresponding spectral

windows. This means that, within a particular timescale, some frequencies may be

negatively weighted, which is not desirable. Even more so, those frequencies that are

negatively weighted are not invariant to the choice of bandwidth

2π/M

so that, in

the present case, the sign of correlation at frequencies corresponding to a particular

timescale may change depending of the choice of bandwidth. This, as can be seen in

Fig. 2, is particularly true for the uniform window which is a common choice in the

rolling-window wavelet correlation literature so far.

On the other hand, some other weight functions such as the Gaussian window,

Bartlett’s triangular window [

3

] and Wendland’s truncated power window [

39

] are

favored in the signal extraction and smoothing literature because their spectral windows

are non-negative everywhere which in the present case ensures that the sign of correlation

9

-15 Π

2M

-11 Π

2M

-7Π

2M

-3Π

2M

3Π

2M

7Π

2M

11 Π

2M

15 Π

2M

-0.1

0.1

0.2

0.3

0.4

Figure 2: Spectral windows corresponding to the blue weight functions in Fig. 1:

u(x)

solid,

c(x)

long-dash,

e(x)short-dash. Note that they take negative values at some frequencies.

at frequencies corresponding to a particular timescale will be invariant to the choice of

bandwidth.

If computational power is an issue Bartlett and Wendland windows are probably good

choices that are not difﬁcult to implement. In what follows, we will use the Gaussian

window because of some desirable properties. In particular, it is the closest to uniform

weights in the time domain within a given bandwidth, its Fourier transform is also a

Gaussian function, it has near-compact support in the frequency domain, and its spectral

window is positive everywhere, therefore frequency/scale weights are always positive

and correlation sign is invariant to the choice of bandwidth.

5. Examples

In order to demonstrate the validity of the proposed tool this section shows ﬁrst its

performance with simulated data sets generated by two nonstationary statistical models

that try to mimic some relevant features relating to the evolving correlation structure at

different frequencies of many multivariate ﬁnancial time series of interest, especially at

the shortest timescales (short-run transient comovements typical of market ‘contagion’

[

17

,

13

,

32

,

6

]), while possibly maintaining a high correlation at the longest timescales

(long-run permanent comovements typical of market integration [

18

,

42

,

22

,

15

,

25

,

12

]).

In both cases the proposed WLMC is shown to clearly capture these changing correlation

structures both along time as well as across the different timescales. The last example

illustrates the usage of the WLMC with real data carrying out a multiscale analysis of

the comovements of Eurozone stock markets during a recent period.

10

-6Π

M

-4Π

M

-2Π

M

0

2Π

M

4Π

M

6Π

M

0.1

0.2

0.3

0.4

Figure 3: Spectral windows corresponding to the red weight functions in Fig. 1:

b(x)

solid,

w(x)

long-dash,

g(x)thick short-dash. Note that they are non-negative everywhere.

5.1. Simulation: detecting breaks in the correlation structure.

Figure 4shows the WLMC of a simulated bivariate time series

Xt= (xt,yt)

of length

T=512

with varying correlation both along time and across timescales/frequencies. The

two series were obtained from the following data generating process (dgp) (17):

xt=η1t, (17a)

yt(ω1) = (η2t,T/3 <t<2T/3,

0.9 η1t, otherwise, ,ω1∈(0, π/8), (17b)

yt(ω2) = (0.9 η1t,T/3 <t<2T/3,

η2t, otherwise, ,ω2∈[π/8, π), (17c)

where

ηt= (η1t,η2t)

is a zero-mean bivariate normal random variable with covariance

matrix Σ=[(0.1,0)0,(0,0.1)0]and ωdenotes the angular frequency.

Notice that since the dgp for

yt

differs depending on the angular frequency

ω

the

implied correlation structure will not be the same across different timescales. That

is,

xt

and

yt

are highly correlated at long timescales (low frequencies up to

π/8

) but

uncorrelated at short timescales (frequencies higher than

π/8

). However, during a period

of time spanning the second third of the sample (

T/3 <t<2T/3

) that behavior is

reversed so that data become highly correlated at short timescales but uncorrelated at

low frequencies. Altogether, the correlation structure is quite complex involving several

sudden changes both along time and across the different timescales. We also note that

this bivariate time series, even though it appears to be stationary in the means and

variances, it is intrinsically nonstationary due to its changing correlation structure.

In spite of the complexity of the changes in the correlation structure both along time

and across timescales generated by dgp (17), the heatmap in the middle of Fig. 4shows

11

time

0 100 200 300 400 500

-3 -2 -1 0 1 2 3

Wavelet Local Multiple Correlation

time

periods

0.2

0.4

0.6

0.8

j

10 30 50 70 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510

(2-4]

(4-8]

(8-16]

(16-32]

(32-64]

(64-128]

smooth

-1.0

-0.5

0.0

0.5

1.0

level6

-1.0

-0.5

0.0

0.5

1.0

level5

-1.0

-0.5

0.0

0.5

1.0

level4

-1.0

-0.5

0.0

0.5

1.0

level3

-1.0

-0.5

0.0

0.5

1.0

level2

10 50 90 130 180 230 280 330 380 430 480

-1.0

-0.5

0.0

0.5

1.0

level1

10 50 90 130 180 230 280 330 380 430 480

time

Wavelet Local Multiple Correlation

Figure 4: Wavelet local multiple correlation of two simulated time series (top) with sudden breaks in the

correlation structure (dgp 17). The heatmap (middle) shows how the WLMC clearly detects the complex

changes implicit in the simulated data. The red lines (bottom) correspond to the upper and lower bounds

of the 95% conﬁdence interval at different timescales.

12

how the WLMC clearly picks up these changes without any problem. The graphs at the

bottom complete the statistical analysis obtained from the WLMC showing the actual

correlation values together with their 95% conﬁdence intervals at each individual scale.

As expected from the dgp, for the three shortest timescales the WLMC estimates

are very low, some even not statistically signiﬁcant, at both ends of the sample while

showing high correlation during the middle part of the sample. In contrast, for the three

longest timescales the WLMC gives high correlation values at both ends but does not

detect a statistically signiﬁcant correlation during the middle part. These results conﬁrm

the validity of the proposed WLMC in detecting complex evolving correlation structures,

both along time and across different frequencies/timescales, that may be present in the

data.

5.2. Simulation: detecting gradual change in correlation structure of nonstationary process.

The second example (see Figure 5) illustrates the WLMC with a simulated bivariate

nonstationary time series

Xt= (xt,yt)

of length

T=512

with constant high correlation

in the long run and increasing correlation at shorter timescales. More speciﬁcally, the

two series were now generated as follows (dgp 18):

xt=µ1t+ε1t, (18a)

yt(ω1) = µ1t+ε2t,ω1∈(0, π/32), (18b)

yt(ω2) = ctµ1t+ (1−ct)µ2t+ε2t,ω2∈[π/32, π), (18c)

where

ct

are a set of slowly-increasing plus rapidly-decreasing weights in the interval

[0, 1]5and µt= (µ1t,µ2t)is a bivariate random-walk trend series

µt=µt−1+ηt, (18d)

with

ηt

as in the previous example and

εt= (ε1t,ε2t)

as a new zero-mean bivariate normal

random variable with the same covariance matrix Σand uncorrelated with ηt.

That is,

xt

and

yt

are now two nostationary ARIMA(0,1,1) processes [

21

] that share a

common trend and, therefore, they are highly correlated at long timescales (frequencies

up to

π/32

) for the whole span of the sample. This is similar to the long-run permanent

comovements that are typical of market integration in, for example, close ﬁnancial

markets. On the other hand, at shorter timescales (frequencies higher than

π/32

) their

correlation structure evolves in such a manner that they gradually become more and

more correlated as time increases until nearing the last stretch of the sample when the

correlations decrease. This is similar to the short-run transient comovements that are

typical of market ‘contagion’ due to, for example, ﬁnancial crises.

We also note that this bivariate time series is nostationary not only in the means and

variances but also in its correlation structure. However, using a sufﬁciently long wavelet

5More speciﬁcally, ct={(t−1

t0−1)3/2|t=1 . . . t0;(T−t

T−t0)3/2|t=t0. . . T}, with t0=7T/8.

13

time

0 100 200 300 400 500

96 98 100 102 104

Wavelet Local Multiple Correlation

time

periods

0.2

0.4

0.6

0.8

1.0

j

10 30 50 70 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510

(2-4]

(4-8]

(8-16]

(16-32]

(32-64]

(64-128]

smooth

-1.0

-0.5

0.0

0.5

1.0

level6

-1.0

-0.5

0.0

0.5

1.0

level5

-1.0

-0.5

0.0

0.5

1.0

level4

-1.0

-0.5

0.0

0.5

1.0

level3

-1.0

-0.5

0.0

0.5

1.0

level2

10 50 90 130 180 230 280 330 380 430 480

-1.0

-0.5

0.0

0.5

1.0

level1

10 50 90 130 180 230 280 330 380 430 480

time

Wavelet Local Multiple Correlation

Figure 5: Wavelet local multiple correlation of two nonstationary I(1) simulated time series (top) highly

correlated in the long run and with increasing correlation at shorter timescales (dgp 18). The heatmap

(middle) shows how the WLMC clearly picks up the evolving correlation structure at different timescales

implicit in the simulated data. The red lines (bottom) correspond to the upper and lower bounds of the

95% conﬁdence interval at different timescales. 14

ﬁlter, in this case the usual Daubechies wavelet ﬁlter of length

L

=4[

11

], this type of

combined nonstationarity poses no problem for the WLMC.

As can be seen in the middle of Fig. 5the heatmap shows how the WLMC clearly

picks up the evolving correlation structure at different timescales implicit in dgp (18)

while the graphs at the bottom show the 95% conﬁdence intervals for the correlations at

each individual scale.

All this can be taken as evidence conﬁrming the validity of the proposed tool in

detecting evolving correlation structures both along time and across different frequen-

cies/timescales.

5.3. Eurozone stock markets.

In this section we illustrate the usage of the advocated wavelet local multiple cor-

relation (WLMC) with data from the eleven main Eurozone stock markets as follows

(ordered by nominal GDP of the country where they operate): DAX (Germany), CAC40

(France), FTSE/MIB (Italy), IBEX35 (Spain), AEX (Netherlands), BEL20 (Belgium), ATX

(Austria), ISEQ (Ireland), OMXH25 (Finland), PSI20 (Portugal) and FTSE/ASE (Greece).

The data were collected daily (closing prices) from January 3,2000 (Monday) to May 31,

2017 (Wednesday)

6

and the analysis was conducted using daily stock market returns, i.e.,

Rit =log(Sit /Si,t−1) = ∆log Sit

, where

Sit

,

i

=1...11, are the corresponding stock market

index values for

t

=2. . . 4543 trading days. Therefore, the total number of observations

used is 49962 returns, thus containing a large amount of information that may not be

easy to convey using standard procedures.

In order to calculate the proposed WLMC we decomposed the daily stock market

returns applying the MODWT with a Daubechies wavelet ﬁlter of length

L

=4[

11

].

7

The

maximum decomposition level

J

is given by

blog2(T)c

[

27

], which, in the present case,

means a maximum level of 12. Since the number of feasible wavelet coefﬁcients gets

critically small for high levels, we chose to carry out the wavelet analysis with

J

=9so that

ten vectors (nine of wavelet coefﬁcients and one of scaling coefﬁcients) were produced

for each daily returns series, i.e. e

wi1, . . . , e

wi9and e

vi9,i=1...11, respectively.

We may note that, since a MODWT based on Daubechies wavelets approximates

an ideal band-pass ﬁlter with bandpass given by the frequency interval

[2−jπ, 21−jπ)

for

j

=1. . .

J

, after inverting that frequency range the corresponding periods are within

(2j, 2j+1]

time units intervals [

41

]. This means that, with 5daily data per week, the scales

λj

,

j

=1...9, of the wavelet coefﬁcients are associated to periods of, respectively, 2–4days

(which includes most intraweek scales), 4–8days (including the weekly scale), 8–16 days

(fortnightly scale), 16–32 days (monthly scale), 32–64 days (quarterly scale), 64–128 days

(quarterly to biannual scale), 128–256 days (biannual scale), 256–512 days (annual scale)

and 512–1028 days (two to four year scale).

6

As published by Yahoo! https://ﬁnance.yahoo.com, Investing https://www.investing.com/indices/

and Financial Times https://markets.ft.com/data/indices.

7

Results with the Daubechies LA(8) ﬁlter were practically the same except for the two longest timescales

(one year and longer) that were indistinguishable from 1up to three decimal points for the whole length of

the sample period.

15

5

6

7

8

9

10

11

time

logs

2001 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17

DAX

CAC40

MIB

IBEX35

AEX

BEL20

ATX

FTSE.ASE20

OMXH25

PSI20

ISEQ

Wavelet Local Multiple Correlation

time

periods

0.90

0.95

0.96

0.97

0.98

0.99

1

j

2001 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17

(2-4]

(4-8]

(8-16]

(16-32]

(32-64]

(64-128]

(128-256]

(256-512]

(512-1024]

smooth

0.986

0.988

0.990

0.992

0.994

0.996

0.998

1.000

level 9

CAC40

0.96

0.97

0.98

0.99

1.00

level 8

CAC40

0.96

0.97

0.98

0.99

1.00

level 7

CAC40

0.96

0.97

0.98

0.99

1.00

level 6

CAC40

0.94

0.95

0.96

0.97

0.98

0.99

1.00

level 5

CAC40

0.94

0.95

0.96

0.97

0.98

0.99

1.00

level 4

CAC40

0.92

0.94

0.96

0.98

1.00

level 3

CAC40

0.92

0.94

0.96

0.98

1.00

level 2

2001 03 05 07 09 11 13 15 17

CAC40

0.90

0.92

0.94

0.96

0.98

1.00

level 1

2001 03 05 07 09 11 13 15 17

CAC40

time

Wavelet Local Multiple Correlation

Figure 6: EUro11 stocks (top) and WMLC of their daily returns. The heatmap (middle) shows how the

WLMC evolves along time revealing perfect market integration at long timescales and evidence of ﬁnancial

‘contagion’ at short timescales during 2007-2012. The red lines (bottom) correspond to the upper and lower

bounds of the 95% conﬁdence interval at different timescales.

16

Figure 6shows the wavelet local multiple correlations obtained as a measure of

comovement dynamics among Eurozone stock markets. As can be seen, the correlation

structure of these markets during this century is far from homogeneous both along time

and across timescales/frequencies. One of the most striking features that the WLMC

brings to light is the sharp divide in the correlation structure across timescales at about

the quarterly scale.

Above the quarterly scale, the long-term correlation structure appears to be quite

stable in time with multiple correlations that are all very high starting at around 0.98

and reaching values near 1at the longest timescales (year long and above). This can

be interpreted as near integration among Euro stock markets at quarterly horizons and

above in the sense that the returns obtained in any of them can be determined by the

overall performance in the other markets [

38

,

25

]. Also, for time horizons of one year

and longer the existence of an exact linear relationship between Eurozone stock markets

cannot be ruled out. This can be taken as evidence of perfect integration even in spite of

several ﬁnancial and debt crises occurring during this period.

On the other hand, the WLMC in Fig. 6shows that for intraweek and intramonth

periods the correlation structure is clearly evolving along time. This is specially so during

the ﬁnancial crises of 2007–2012. Prior to this period, short-term multiple correlations

were around 0.90 but experienced a sharp increase above 0.98 during 2007 which can be

taken as evidence of ﬁnancial ‘contagion’ among Eurozone stock markets [

17

,

13

,

32

,

6

].

8

Such phenomenon appears to have mitigated after 2012 where short-term multiple

correlations have decreased.

6. Conclusions

This paper presents a new statistical tool, the wavelet local multiple correlation

(WLMC), that may be useful in the analysis of comovements within a set of time series.

The WLMC consists in one single set of multiscale correlations along time, each of

them calculated as the square root of the regression coefﬁcient of determination in that

linear combination of locally weighted wavelet coefﬁcients for which such coefﬁcient

of determination is a maximum. In contrast, the alternative of using standard bivariate

wavelet correlations with rolling windows needs to calculate, plot and compare a large

number of wavelet correlation maps and it may run out of data points at longer timescales.

Also, it has been shown how the spectral properties of the weight function or rolling

window need to be taken into account. Figures 4and 5offer some graphical examples of

this tool as obtained from two simulated data sets with either breaks or gradual changes

in the correlation structure illustrating the validity of the proposed WLMC statistic.

8

On the other hand, it has been suggested by one anonymous reviewer that this result for intra-

EU co-movement relationships contrasts with evidence from Islamic stock market indexes where it is

found that “recession periods were accompanied by a local dissociation at some frequency subbands

between conventional and Islamic market indexes”, especially in emerging markets, with a co-movement

relationship that “appeared to be varying in both time and frequency” [34].

17

Furthermore, Figure 6presents the time-localized wavelet analysis of a set of eleven

Eurozone stock market returns during a recent period of 4542 trading days. The WLMC

analysis reveals the existence of a stable and practically exact linear relationship between

these stock markets for periods of time of one year and longer, which can be interpreted

as perfect integration. On the other hand, the WLMC shows that for intraweek and

intramonth periods the correlation structure is clearly evolving along time, experiencing

a sharp increase during ﬁnancial crises which some authors interpret as evidence of

ﬁnancial ‘contagion’.

The scope of suggestions for further research using the WLMC analysis is really

huge. In general, when it is suspected that a multivariate dataset is subject to different

implications depending on the time horizon, WLMC analysis can be very useful. For

example, a similar analysis as in the previous section can be extended to applications

with other types of multivariate data (ﬁnancial, energy, commodities, etc.) as well as to

other geographical areas where bivariate correlations and global indices have been used

so far. In this sense, WLMC analysis could be applied to unconventional or developing

stock markets to see how their reactions to economic/ﬁnancial crises across different

timescales compare to those from conventional developed stock markets such as in the

Eurozone [cf.

34

]. Further development of methodological aspects of the WLMC could

consider other contexts such as artiﬁcial neural networks [

35

], causality issues [

33

,

29

], or

even the actual local regression coefﬁcients (see Section 3) which could be exploited to

study how the relationship connecting the different markets under study evolves in time

across scales as well as for forecasting purposes.

We may ﬁnally point out that all these results and suggestions would be quite hard

to establish using the standard wavelet analysis that relies on the visualization of all

the wavelet correlation maps between pairs of variables and they serve to illustrate the

potential of this new tool in the multiscale analysis of multivariate data along time.

Supplemental material

A new version of the wavemulcor Rcomputer package facilitates the computation

of wavelet local multiple correlations. It can be obtained from The Comprehensive R

Archive Network (CRAN) at https://cran.r-project.org/package=wavemulcor.

Acknowledgments

The author would like to acknowledge research funding received from UPV/EHU

Econometrics Research Group (Basque Government Dpt. of Education grant IT-642-13)

and Spanish Ministry of Economy and Competitiveness (grant MTM2013-40941-P).

References

[1]

Addison, P. S., 2017. The illustrated wavelet transform handbook: introductory theory and applications

in science, engineering, medicine and ﬁnance. CRC Press, Taylor & Francis, Boca Raton, FL.

18

[2]

Aguiar-Conraria, L., Soares, M. J., 2014. The continuous wavelet transform: moving beyond uni-and

bivariate analysis. Journal of Economic Surveys 28 (2), 344–375.

[3] Bartlett, M. S., 1950. Periodogram analysis and continuous spectra. Biometrika 37 (1-2), 1–16.

[4]

Bartram, S., Taylor, S., Wang, Y., 2007. The Euro and European ﬁnancial market dependence. Journal

of Banking & Finance 31,1461–1481.

[5]

Benhmad, F., 2013. Bull or bear markets: A wavelet dynamic correlation perspective. Economic

Modelling 32,576–591.

[6]

Berger, T., 2015. A wavelet based approach to measure and manage contagion at different time scales.

Physica A: Statistical Mechanics and its Applications 436,338–350.

[7]

Chakrabarty, A., De, A., Gunasekaran, A., Dubey, R., 2015. Investment horizon heterogeneity and

wavelet: Overview and further research directions. Physica A: Statistical Mechanics and its Applica-

tions 429,45–61.

[8]

Cleveland, W. S., 1979. Robust locally weighted regression and smoothing scatterplots. Journal of the

American Statistical Association 74 (368), 829–836.

[9]

Craigmile, P., Percival, D., 2005. Asymptotic decorrelation of between-scale wavelet coefﬁcients. IEEE

Transactions on Information Theory 51 (3), 1039–1048.

[10]

Dajcman, S., Festic, M., Kavkler, A., 2012. European stock market comovement dynamics during some

major ﬁnancial market turmoils in the period 1997 to 2010 – a comparative dcc-garch and wavelet

correlation analysis. Applied Economics Letters 19 (13), 1249–1256.

[11] Daubechies, I., 1992. Ten lectures on wavelets. Society for Industrial Mathematics.

[12]

de Truchis, G., Keddad, B., 2016. Long-run comovements in East Asian stock market volatility. Open

Econ Rev 27,969–986.

[13]

Dufﬁe, D., Eckner, A., Hore, G., Saita, L., 2009. Frailty correlated default. The Journal Of Finance 64,

2089–2123.

[14]

Epanechnikov, V., 1969. Non-parametric estimation of a multivariate probability density. Theory of

Probability & Its Applications 14,153–158.

[15] Fernández-Macho, J., 2012. Wavelet multiple correlation and cross-correlation: A multiscale analysis

of eurozone stock markets. Physica A 391,1097–1104.

[16]

Fisher, E. A., 1915. Frequency distribution of the values of the correlation coefﬁcient in samples from

an indeﬁnitely large population. Biometrika 10,507–521.

[17]

Forbes, K. J., Rigobon, R., 2002. No contagion, only interdependence: Measuring stock market

comovements. The Journal of Finance 57 (5), 2223–2261.

[18]

Fratzscher, M., 2002. Financial market integration in Europe: on the effects of EMU on stock markets.

International Journal of Finance & Economics 7,165–193.

[19]

Gallegati, M., 2008. Wavelet analysis of stock returns and aggregate economic activity. Computational

Statistics & Data Analysis 52,3061–3074.

[20] Gençay, R., Selçuk, F., Whitcher, B., 2002. An introduction to wavelets and other ﬁltering methods in

ﬁnance and economics. Academic Press.

[21] Hamilton, J. D., 1994. Time Series Analysis. Princeton University Press.

[22]

Hardouvelis, G., Malliaropulos, D., Priestley, R., 2006. EMU and European stock market integration.

The Journal of Business 79,365–392.

[23]

Huang, S., An, H., Gao, X., Huang, X., 2015. Identifying the multiscale impacts of crude oil price

shocks on the stock market in China at the sector level. Physica A: Statistical Mechanics and its

Applications 434,13–24.

[24]

Khalfaoui, R., Boutahar, M., Boubaker, H., 2015. Analyzing volatility spillovers and hedging between

oil and stock markets: Evidence from wavelet analysis. Energy Economics 49,540–549.

[25]

Li, H., Daly, V., Jan. 2014. Stock market integration and ﬁnancial crises: Evidence from Chinese sector

portfolios. Working Paper 14, The University of Nottingham.

[26]

Nealen, A., 2004. An as-short-as-possible introduction to the least squares, weighted least squares

and moving least squares methods for scattered data approximation and interpolation. Tech. rep., TU

Darsmstadt.

19

[27]

Percival, D., Walden, A., 2000. Wavelet methods for time series analysis. Cambridge University Press,

reprinted 2006.

[28]

Percival, D. B., Mofjeld, H. O., 1997. Analysis of subtidal coastal sea level ﬂuctuations using wavelets.

Journal of the American Statistical Association 92 (439), 868–880.

[29]

Polanco, J., Fernández-Macho, J., Neumann, M., Faria, S., 2018. A pre-crisis vs. crisis analysis of

peripheral EU stock markets by means of wavelet transform and a nonlinear causality test. Physica A:

Statistical Mechanics and its Applications 490.

[30] Priestley, M. B., 1981. Spectral analysis and time series. Academic press.

[31]

Ranta, M., 2010. Wavelet multiresolution analysis of ﬁnancial time series. Ph.D. thesis, University of

Vaasa, Finland, acta Wasaensia 223, Statistics 5.

[32]

Ranta, M., 2013. Contagion among major world markets: a wavelet approach. International Journal of

Managerial Finance 9(2), 133–149.

[33]

Saâdaoui, F., 2013. The price and trading volume dynamics relationship in the EEX power market: A

wavelet modeling. Computational Economics 42,47–69.

[34]

Saâdaoui, F., Naifar, N., Aldohaiman, M. S., 2017. Predictability and co-movement relationships

between conventional and Islamic stock market indexes: A multiscale exploration using wavelets.

Physica A: Statistical Mechanics and its Applications 482,552–568.

[35]

Saâdaoui, F., Rabbouch, H., 2014. A wavelet-based multi-scale vector ANN model for econophysical

systems prediction. Expert Systems with Applications 41, (13), 6017–6028.

[36]

Shahzad, S., Nor, S., Kumar, R., Mensi, W., 2017. Interdependence and contagion among industry-level

US credit markets: An application of wavelet and VMD based copula approaches. Physica A: Statistical

Mechanics and its Applications 466,310–324.

[37]

Sousa, R., Aguiar-Conraria, L., Soares, M., 2014. Carbon ﬁnancial markets: A time-frequency analysis

of CO2prices. Physica A: Statistical Mechanics and its Applications 414,118–127.

[38]

Syllignakis, M., 2006. EMU’s impact on the correlation across the European stock markets. International

Research Journal of Finance and Economics 6,201–219.

[39]

Wendland, H., 1995. Piecewise polynomial, positive deﬁnite and compactly supported radial basis

functions of minimal degree. Advances in Computational Mathematics 4,389–396.

[40]

Whitcher, B., 1998. Assessing nonstationary time series using wavelets. Ph.D. thesis, University of

Washington.

[41]

Whitcher, B., Guttorp, P., Percival, D., 2000. Wavelet analysis of covariance with application to

atmospheric time series. Journal of Geophysical Research 105,941–962.

[42]

Yang, J., Min, I., Li, Q., 2003. European stock market integration: does EMU matter? Journal of

Business Finance & Accounting 30,1253–1276.

20