1 Introduction

Perhaps one of the finest ideas in the research world is the conceptualization that one variable could have predictive information about how another variable behaves (Granger 1969). This notion, often referred to as the Granger causality in honour of Sir. Clive W. J. Granger, has been applied in many fields of study including economics, neuroscience, geophysics, finance, image processing etc. One of the shortcomings of Granger causality in its original construction, however, is that one cannot separately distinguish the long run causal effects from the short run causal effects. However, causal relation is not a notion that is peculiar to any horizon and it will be interesting to configure how this happens on different horizons. An innovative idea due to Geweke (1982) was to transform causality into frequency domain. Indeed, that idea was revolutionary and has been further developed (see Hosoya 2001; Breitung and Candelon 2006). It has also aided finer analysis of the data (Seth 2010). However, the fact that causality cannot be tracked over time with the Granger-Geweke causality has provoked further innovative ideas. One idea due to Dhamala et al. (2008) is along this line. They employed continuous wavelet transforms to analyze the causal links.

Wavelet analysis has become widely used in empirical studies to understand the relationship between variables particularly the temporal fluctuations between them on different horizons. Crowley (2007), Yogo (2008), Gallegati and Gallegati (2007), Gençay et al. (2001), Fan and Gençay (2010), Gallegati et al. (2011) present few of these examples. However, much more interesting to the researchers are the causal effects among the variables of interest. For instance, it should be more appealing and indeed more acceptable to see how the causal effects evolve over time and over frequencies. One of the benefits of frequency representation is that one is able to isolate the long run causal effects from the short run causal effects and be able to see whether it is the short or the long run that modulates the correlation between the variables. Measuring causal effects using continuous wavelet transform has been particularly problematic because such measures as wavelet coherence only embodies amplitude between the variables; the information on the direction necessary for scooping out causal links is unavailable. However, the useful information on lead-lag relationship is encoded in the phase-difference. In few studies that hazard to undertake causality in wavelet non-parametrically (see, Dhamala et al. 2008), the trouble lies in computing the spectral matrix factors in order to derive the minimum phase. This process involves inverse Fourier to communicate between the time and frequency domain. In this study, we propose an alternative method that dispenses with spectral matrix factorization but instead uses the information contained in both the amplitude and the phase-difference to derive the causal information between the variables of interest as encoded in the phase-difference. We authenticate the results based on this method by developing a data generating process (DGP) and find that the method is able to identify the causal period in the synthetic data. At the empirical level, we also deploy the method to investigate the relationship between the US financial stress and economic activity.

The rest of the paper is organized as follows. Section 2 provides a brief review of related literature that motivates the study, while Sect. 3 discusses the background to the proposed method. In Sect. 4, we apply the method on synthetic data generated from the DGP for causality and, in Sect. 5, we apply the proposed method on the relationship between measures of economic activity and financial stress. Section 6 concludes.

2 Related Literature and Motivation

To meet the needs of the analysts the idea of causality has been extended in a number of ways. For example, the notion of causality-in-variance, causality-in-risk, causality-in-quantiles and indeed causality-in-distribution extends the idea of causality-in-mean brilliantly. Another area of extension remedies the inability of causality testing to distinguish between the long run and the short run causal effects. Thus, when causal effects are detected, it is not clear whether the underlying driver is domiciled in low or high frequency domain. Granger (1969), Geweke (1982), Hosoya (1991), Granger and Lin (1995), Yao and Hosoya (2000) and Breitung and Candelon (2006) suggest causality in frequency domain. Geweke (1982) makes an outstanding extension in this direction and his idea has been well received among the researchers interested in uncoupling the frequencies of causal influence. To illustrate, suppose a \(p\)-order VAR model as in Breitung and Candelon (2006) or Dhamala et al. (2008):

$$\begin{aligned} A(L)z(t)=\varepsilon (t), \end{aligned}$$
(1)

where \(A(L)=\left[ {{\begin{array}{cc} {I-A_{XX} (L)}&{}\; {A_{YX} (L)} \\ {A_{XY} (L)}&{} \;{I-A_{YY} (L)} \\ \end{array} }} \right] ,\;A_{jk} (L)=\sum _{i=1}^{p} {A_{jk,i} L^{i}} \) is a polynomial lag operator, \(z(t)=[x(t), y(t)]'\) and \(\varepsilon (t)=[\varepsilon _{X} (t), \varepsilon _{Y} (t)]'\) are respectively the (column) vectors of endogenous variables (that is, variables \(x\) and \(y\)) and error terms at time \(t\). The error terms, whose variance–covariance matrix is given by \(\Sigma =\left[ {{\begin{array}{ll} {\Sigma _{XX} }&{}\; {\Sigma _{YX} } \\ {\Sigma _{XY} }&{}\; {\Sigma _{YY} } \\ \end{array} }} \right] \), account for the unexplained part of the model. Then, assuming that \(A(L)\) is invertible, we have \(z(t)=H(L)\varepsilon (t)\), where \(H(L)=A(L)^{-1}\). It follows that the Fourier transform of Eq. (1) is \(S_{ZZ} (\omega )=H(\omega )\Sigma \tilde{H}(\omega )\), with \(\tilde{H}(\omega )\) as the complex conjugate of \(H(\omega )\). Further, the transfer function \(H(\omega )\) is a spectral matrix given by

$$\begin{aligned} H(\omega )=\left[ {{\begin{array}{ll} {H_{XX} (\omega )}&{}\; {\tilde{H}_{YX} (\omega )} \\ {H_{YX} (\omega )}&{}\; {H_{YY} (\omega )} \\ \end{array} }} \right] \end{aligned}$$
(2)

\(H_{XY} (\omega )\) is then the transfer function between variables \(x\) and \(y\). Then the Granger-Geweke causality in angular or radian frequency \(\omega \) is given by

$$\begin{aligned} G_{Y\rightarrow X} (\omega )=\log \left[ {\frac{S_{XX} (\omega )}{S_{XX} (\omega )-\left\{ \Sigma _{XX} -\Sigma _{XY}^{2} /\Sigma _{XX} \right\} |H_{XY} (\omega )|^{2}}} \right] , \end{aligned}$$
(3)

where \(S_{XX} (\omega )\) is the spectral power of variable \(x\) at frequency \(\omega \) and \(\Sigma _{ij} \) are the variance-covariance matrices of the errors. In Eq. (3), the denominator is the total power minus the causal contribution representing the intrinsic power. Note that Eqs. (2) and (3) can also be specified in Fourier or ordinary frequency \(f\), since \(\omega =2\pi f\), which says that angular frequency is larger than ordinary frequency by a factor of \(2\pi \).

The Granger-Geweke causality in frequency domain as specified in Eq. (3) has been particularly useful. Yet, testing causality in frequency domain collapses the time dimension into a single point in time and information is lost on the time variation in causality. The researchers interested in the causality content in the frequency domain, who may also want to gain insight into the causal fluctuations over time, often resort to decomposition of the variables into different scales or frequencies before engaging the traditional causality measure. The usual practice here is to use discrete wavelet transforms (DWT) to decompose the variables. Essentially, this approach is not different from the Granger-Geweke causality measure. Indeed, the approach still fails to indicate the time-domain content of causal effects.

To extend the Granger-Geweke causality to nonparametric modelling in time-frequency domain and be able to study the power distribution of Granger causality, the essential requirement is the factorized spectral matrix. The spectral matrix factorization is achieved by employing Wilson’s algorithm (Wilson 1972). The condition for the factorization of any spectral matrix \(S(\omega )\) into a set of unique minimum-phase functions is given by \(\int _{-\pi }^\pi {\log \det S(\omega )df>-\infty } \). Let \(\Xi \) be the minimum-phase spectral density matrix factor. The factorization of the spectral matrix \(S(\omega )\) is given by \(S=\Xi \tilde{\Xi }\) where \(\tilde{\Xi }\) is the complex conjugate transpose of \(\Xi \). The minimum-phase spectral density matrix factor has an infinite sum representation that enables the computation of the minimum-phase transfer function \(H(\omega )\) through the expansion in nonnegative power \(\exp (ik2\pi \omega )\). That is, \(\Xi =\sum _{k=0}^\infty {A_k \exp (ik2\pi \omega )} \). In sum, the noise variance-covariance matrix and the minimum-phase spectral transfer function are respectively \(\Sigma =A_0 A_0^T \) and \(H=\Xi A_0^{-1} \) such that \(\Xi =H\Sigma H^{*}\), where \(H^{*}\) is the Hermitian transpose of matrix \(H\). Having computed the spectral matrix and obtained the minimum-phase transfer function, one needs to evaluate the Geweke-Granger causality in time–frequency given by Eq. (4) by looping over time. The bane of this approach however lies in the requirement that the spectral matrix be factored to be able to compute the transfer function as given in Eq. (4). Besides, Wilson’s algorithm on which the factorization is based may not converge and the condition for factorization may not be satisfied.

In this respect, Dhamala et al. (2008) make an insightful contribution by introducing wavelet causality, which combines the Granger-Geweke causality measure with continuous wavelet transforms (CWT). Their formula parallels Eq. (3):

$$\begin{aligned} G_{Y\rightarrow X} \left( \omega ,\tau \right) =\log \left[ {\frac{W_{XX} \left( \omega ,\tau \right) }{W_{XX} (\omega ,\tau )-\left\{ \Sigma _{XX}-\Sigma _{XY}^{2} /\Sigma _{XX}\right\} |H_{XY} \left( \omega ,\tau \right) |^{2}}} \right] , \end{aligned}$$
(4)

where \(W_{XX} (\omega ,\tau )\) is the wavelet spectral power of variable \(x\) in radian frequency \(\omega \). Averaged over time, the above measure can be compared with the causality in frequency. By projecting \(x(t)\) onto the mother wavelet function, \(\psi _{s,\tau } (t)={\psi \left( {(t-\tau )/s} \right) }/{\sqrt{s}}\), that is possibly complex-valued, we obtain the wavelet coefficient as:

$$\begin{aligned} W_{X}(s,\tau )=\left( x{*}\psi _{s,\tau }\right) \left( t \right) =\int \limits _{-\infty }^{\infty }x(t)\frac{1}{\sqrt{s}}\tilde{\psi }\left( {\frac{t-\tau }{s}} \right) dt, \end{aligned}$$
(5)

where tilde on \(\psi (\cdot )\) denotes the complex conjugate of function \(\psi (\cdot )\). From Eq. (5), we obtain in turn the power spectrum \(W_{XX} (s,\tau )=\left| {W_X (s,\tau )} \right| ^{2}\) capturing the variability of \(x(t)\) as a function of scale and time. Lilly and Olhede (2009) offered three alternative mappings of scale to frequency where \(\omega \) used in Eq. (4) is inversely related to \(s\) given in Eq. (5): \(\omega (s)={\omega _{o}}/s\), where \(\omega _{o} \) is the first moment satisfying \({\omega _{0}=\int _{-\infty }^{\infty } {\omega (t)\psi (t)^{2}}}\big /{\int _{-\infty }^{\infty } {\psi (t)^{2}dt} }\). Aguirar-Conraria and Soares (2011) derived the same relation based on the Heisenberg uncertainty principle. Lilly and Olhede (2009) further noted that the relationship can be viewed in terms of the Fourier rather than angular frequency. In that case, they showed that the relationship is given by \(f(s)={\omega _{o}}/{2\pi s}\). This relationship guarantees that at higher scales corresponding to lower radian frequencies, the Heisenberg window stretches, while at lower scales corresponding to higher radian frequencies, the Heisenberg window compresses. This process of stretching and compressing makes the CWT capable of adapting to the coarser and finer details and configuration in the time-frequency space.

Assume that we have a wavelet with Fourier transform satisfying the admissibility condition given by

$$\begin{aligned} C_{\psi }=\int \limits _{-\infty }^{\infty } {\frac{\left| {\hat{{\psi }}(\omega )} \right| ^{2}}{\left| \omega \right| }d\omega <\infty }. \end{aligned}$$

Then Torrence and Compo (1998) show that it is possible to reconstruct the original series by means of the following formula:

$$\begin{aligned} x(t)=\frac{1}{C_\psi }\int \limits _{0}^{\infty }{\int \limits _{-\infty }^{\infty } {W_{X}(s,\tau )\psi _{\tau ,s} (t)d\tau \frac{ds}{s^{2}}}} \end{aligned}$$
(6)

This reconstruction formula will come in handy when simulating the data generating process (DGP) to construct the synthetic data.

Observe that the wavelet coefficients are given in terms of frequency and time, whereas they are determined in terms of scale and time. One has to exploit the correspondence between the scale and frequency in order to arrive at this. Specifically at every point in time domain, the Granger-Geweke causality measure in Eq. (4) is applied. By looping over the time domain this way, they arrive at the time-frequency distribution of causality. Thus, one can preview the evolution not only over time but also over frequency.

3 Background on the Proposed Methodology

The requirement for spectral matrix factorization is not usually satisfied and Wilson’s algorithm may not converge to allow for the computation of the transfer function. Besides, this requirement renders this application not completely nonparametric as the estimation is still driven by the assumption not inherent in the data. Our proposed CWT causality measure overcomes this problem. As a starting point and following Torrence and Compo (1998) and Aguiar-Conraria et al. (2008), we can discretize Eq. (5) measuring continuous wavelet transform for time series \(\left\{ x_n :n=1,\ldots ,N\right\} \) as

$$\begin{aligned} W_{X}^{m} (s,\tau )=\frac{\delta t}{\sqrt{s}}\sum {x_{n}\cdot \tilde{\psi }\left( {(m-n)\frac{\delta t}{s}} \right) ,\, m=1,2,\ldots ,N-1}, \end{aligned}$$
(7)

where tilde on \(\psi (\cdot )\) denotes the complex conjugate of function \(\psi (\cdot ),\, s\) and \(\tau \) are the scale and location parameters and \(\delta t\) denote a uniform step size. From the expression above, the wavelet power that measures the variability in the time series both in time and in frequency is defined as \(|W_{X}^{m} (s,\tau )|^{2}\). The CWT suffers from edge effects caused by a discontinuity at the edge because wavelet is not completely localized in time. To cope with this challenge, the cone of influence (COI) has been introduced. The COI earmarks the area where edge effects cannot be ignored and determines the set of CWT coefficients influenced by the value of the signal at a specified position. Outside COI, edge effects are predominant and can distort the result. Here we take the COI as the area in which the wavelet power drops to \(e^{-2}\) of the value at the edge. Likewise, the CWT for variable \(y\) can be defined as \(W_{Y}^{m} (s,\tau )\). Also, the cross-spectrum is defined as \(W_{XY}^{m} (s,\tau )=W_{X}^{m} (s,\tau )\tilde{W}_{Y}^{m} (s,\tau )\), where \(\tilde{W}_{Y}^{m} (s,\tau )\) is the complex conjugate of \(W_{Y}^{m} (s,\tau )\).

If a complex mother wavelet such as the Morlet wavelet function adopted in this study is used, then the wavelet transform can be decomposed into real and imaginary parts, that is, for variable \(x,\, W_{X}^{m} (s,\tau )=\mathfrak {R}\left\{ W_{X}^{m} (s,\tau )\right\} +i\mathfrak {I}\left\{ W_{X}^{m} (s,\tau )\right\} \), and ditto for variable \(y\). Furthermore, one can compute local phase, \(\varphi _{X} (s,\tau )=\tan ^{-1}\left\{ {\mathfrak {I}\left( W_{X}^{m} (s,\tau )\right) }/{\mathfrak {R}\left( W_{X}^{m} (s,\tau )\right) }\right\} \), and also the phase difference. Besides, the Morlet wavelet function can be shown to achieve an optimal localization between the resolution in time and in frequency due to its Gaussian envelop. This property is guaranteed by Heisenberg’s uncertainty theorem stating that there is a lower limit to the product of time and frequency resolution. Also implying a tradeoff between the resolution in time and in frequency, the theorem ensures that any improvement in time degrades the frequency resolution and any improvement in frequency degrades the time resolution. Thus, to achieve optimal balance, we employ the Morlet wavelet function first introduced by Grossman and Morlet (1984):

$$\begin{aligned} \psi (\eta )=\pi ^{-1/4}e^{i\omega \eta }e^{-\frac{1}{2}\eta } \end{aligned}$$
(8)

where \(\omega \) is the angular or radian frequency and \(\eta \) is dimensionless time. For optimal balance, we set \(\omega =\omega _o =6\) following Torrence and Compo (1998) so that \(f(s)=\omega _0 /2\pi s\approx 1/s\). Since the idea behind CWT is to apply the wavelet as a band pass filter to the time series, the wavelet is stretched in time by varying its scale \(s\), so that \(\eta =s\cdot t\) and normalizing it to have unit energy. To facilitate interpretation, it is convenient to convert from scale to period, which will require applying the following formula to obtain the (Fourier) period:

$$\begin{aligned} Ft=\lambda \cdot s \end{aligned}$$
(9)

where \(\lambda \) is the Fourier wavelength. For the Morlet wavelet function, \(\lambda =4\pi /[\omega _{o} +(2+\omega _{o}^{2})^{1/2}]\) (see Table 1 in Torrence and Compo 1998). Thus, the Fourier period \((Ft)\) for the Morlet wavelet function is \(Ft\approx 1.033~\mathrm{s}\). This conversion will be useful for the geometric presentation of our result.

The correlation measure in CWT proposed by Rua (2013) provides the background for our causality measure. The Rua (2013) wavelet correlation measure is given by

$$\begin{aligned} \rho _{XY} (s,\tau )=\frac{\zeta \left\{ s^{-1}|\mathfrak {R}\left( W_{XY}^{m}\left( s,\tau \right) \right) |\right\} }{\zeta \left\{ s^{-1}\sqrt{|W_{X}^{m}\left( s,\tau \right) |^{2}}\right\} \cdot \zeta \left\{ s^{-1}\sqrt{|W_{Y}^{m} \left( s,\tau \right) |^{2}}\right\} } \end{aligned}$$
(10)

where \(\zeta (Q)=\zeta _{scale} \left( \zeta _{time} (Q)\right) \) with \(\zeta _{scale} \) as the smoothing operator along scale axis while \(\zeta _{time} \) as the smoothing operator along the time axis. As a correlation measure, \(\rho _{XY} (s,\tau )\)is bounded between \(-\)1 and +1. We observe that \(\rho _{XY} (s,\tau )\) differs from the measure of wavelet coherence only with respect to subduing the quadrature, that is, the imaginary part of \(W_{XY}^{m} (s,\tau )\). In other words, coherence is defined as

$$\begin{aligned} R_{XY} (s,\tau )=\frac{\zeta \left\{ s^{-1}|\left( W_{XY}^{m}(s,\tau )\right) |\right\} }{\zeta \left\{ s^{-1}\sqrt{|W_{X}^{m} (s,\tau )|^{2}}\right\} \cdot \zeta \left\{ s^{-1}\sqrt{|W_{Y}^{m} (s,\tau )|^{2}}\right\} } \end{aligned}$$
(11)

Unlike the wavelet correlation, coherence is bounded between 0 and 1, that is, \(0\le R_{XY}^{2} (s,\tau )\le 1\) and is an analogue of the coefficient of determination in the time-domain analysis.

Applications of continuous wavelet analysis using some or all of the above measures abound in the literature. Some of the more recent studies in this regard include Uddin et al. (2013) on the relationship between oil price and exchange rates, Olayeni (2013) on the Feldstein-Horioka puzzle, Tiwari and Olayeni (2013) on oil prices and trade balance in India, Tiwari et al. (2013) on inflation co-movement in G-7 countries, Tiwari (2013) on the relationship between oil price and macroeconomy in Germany, Tiwari et al. (2014) on inflation-output gap relationship for France, and Rua and Nunes (2012) on the assessment of market risk. Others include Chaker and Besma (2014) on co-movement of stock markets in GCC as well as Lukas and Jozef (2012) on the co-movement of energy commodities. Our focus in this paper is to expand the number of toolkits needed for analysis in this respect by introducing a measure of causality in continuous wavelet that is easy to implement. The next section undertakes our proposal.

3.1 Causality in Continuous Wavelet Transform: A Proposal

In the time-domain analysis, there is a precursor to the idea that the correlation measure can be augmented with the direction of information flow to generate a measure of causality (see, for example, Hong et al. 2003, 2009). In this case, causality is tested by restricting the kernel spectral density associated with the cross-correlation function (CCF). This idea carries over into the present analysis. However, we need to first define the concept of phase-difference between variables \(x\) and \(y\), given by \(\phi _{XY} (s,\tau )=\phi _{X} (s,\tau )-\phi _{Y} (s,\tau )\) or:

$$\begin{aligned} \phi _{XY} (s,\tau )=\tan ^{-1}\left( {\frac{\mathfrak {I}\left\{ W_{XY}^{m} (s,\tau )\right\} }{\mathfrak {R}\left\{ W_{XY}^{m}(s,\tau )\right\} }} \right) \end{aligned}$$
(12)

with \(-\pi \le \phi _{XY} (s,\tau )\le \pi \). This range can be subdivided into four intervals as indicated in Fig. 1: \(\phi _{XY} (s,\tau )\in (0,\pi /2),\; \phi _{XY} (s,\tau )\in (-\pi /2,0),\; \phi _{XY} (s,\tau )\in (\pi /2,\pi )\) and \(\phi _{XY} (s,\tau )\in (-\pi ,-\pi /2)\). In the first two intervals, the two variables are in-phase suggesting that they move in the same direction. Moreover, the interval \(\phi _{XY} (s,\tau )\in (0,\pi /2)\) suggests that \(x\) leads \(y\) (or, alternatively, \(y\) lags \(x\)), meaning that \(y\) has some significant predictive information about \(x\) in Granger’s sense, while the interval \(\phi _{XY} (s,\tau )\in (-\pi /2,0)\) suggests that \(y\) leads \(x\) (or, alternatively, \(x\) lags \(y)\), meaning that \(x\) has some significant predictive information about \(y\) in the same sense. In the other two intervals, namely, \(\phi _{XY} (s,\tau )\in (\pi /2,\pi )\) and \(\phi _{XY} (s,\tau )\in (-\pi ,-\pi /2)\), the two variables are out-of-phase indicating that they move in opposite direction. The lead-lag information on the interval \(\phi _{XY} (s,\tau )\in (\pi /2,\pi )\) suggests that \(y\) leads \(x\) (or, alternatively, \(x\) lags \(y)\), meaning that \(x\) has some significant predictive information about \(y\). On the interval \(\phi _{XY} (s,\tau )\in (-\pi ,-\pi /2),\; x\) leads \(y\) (or, alternatively, \(y\) lags \(x\)), meaning that \(y\) has some significant predictive information about \(x\).

Fig. 1
figure 1

Phase-difference circle (Aguira-Conraria and Soares, 2011)

Table 1 The lead-lag relationship

Table 1 summarizes the lead-lag relationship between \(x\) and \(y\) and also indicates the union of intervals over which one variable lags the other in-phase and out-of-phase. These phase-difference sub-intervals can be appropriately used to restrict the Rua (2013) wavelet correlation to separate the embedded causal links from the non-causal content. A convenient way to impose these restrictions is to formulate an indicator function \(I_{Y\rightarrow X} (s,\tau )\) that takes the value of one if the phase difference is defined over the required interval and zero otherwise. For instance if the focus is on whether \(x\) leads \(y\) and not particularly on the direction of causal effects, then we may restrict the space for phase difference thus \(\phi _{XY} (s,\tau )\in (0,\pi /2)\cup (-\pi ,-\pi /2)\) and define the indicator function correspondingly as

$$\begin{aligned} I_{Y\rightarrow X} (s,\tau )=\left\{ {{\begin{array}{ll} 1, &{} \hbox { if }\, \phi _{XY} (s,\tau )\in (0,\pi /2)\cup (-\pi ,-\pi /2) \\ 0, &{} \hbox { otherwise }\\ \end{array}}}\right. \end{aligned}$$
(13a)

where the operator \(\cup \) means that two mutually exclusive spaces are being “unionized”. If on the other hand the focus is not only on whether \(x\) leads \(y\) but also on the direction of relation, then we will have to define the indicator function as either

$$\begin{aligned} I_{Y\rightarrow X} (s,\tau )=\left\{ {{\begin{array}{ll} 1, &{}\hbox { if }\, \phi _{XY} (s,\tau )\in (0,\pi /2) \\ 0, &{}\hbox { otherwise }\\ \end{array}}}\right. \end{aligned}$$
(13b)

in case we are interested in the negative (or out-of-phase) causal relationship, or

$$\begin{aligned} I_{Y\rightarrow X} (s,\tau )=\left\{ {{\begin{array}{ll} 1, &{} \hbox { if }\, \phi _{XY} (s,\tau )\in (-\pi ,-\pi /2)\\ 0, &{} \hbox { otherwise }\\ \end{array}}}\right. \end{aligned}$$
(13c)

in case we are interested in the positive (or in-phase) causal relationship. Other spaces of interest can likewise be described.

This process is equivalent to restricting the flow of information by imposing \(A_{12} (L)=0\) or \(A_{21} (L)=0\) on VAR(\(p)\) in Eq. (1) in the case of time-domain analysis or by imposing \(|H_{XY} (e^{-i\omega })|=0\) or \(|H_{YX} (e^{-i\omega })|=0\) in the case of frequency-domain analysis (see, e.g., Breitung and Candelon 2006; Hosoya 1991; and Geweke 1982).

We now propose our measure of causality in CWT, which essentially modifies the formula for correlation in CWT (Eq. (10)). Indeed, the proposed measure of causal effects only differs by the inclusion of the lead-lag information through the indicator function analyzed above. Specifically, if predictive information flows from \(x\) to \(y\), our proposed Granger causality formula then augments the Rua (2013) wavelet correlation formula with \(I_{X\rightarrow Y} (s,\tau )\) in the following manner:

$$\begin{aligned} G_{X\rightarrow Y} (s,\tau )=\frac{\zeta \left\{ s^{-1}|\mathfrak {R}\left( W_{XY}^{m} (s,\tau )\right) I_{X\rightarrow Y} (s,\tau )|\right\} }{\zeta \left\{ s^{-1}\sqrt{|W_{X}^{m} (s,\tau )|^{2}}\right\} \cdot \zeta \left\{ s^{-1}\sqrt{|W_{Y}^{m} (s,\tau )|^{2}}\right\} } \end{aligned}$$
(14)

Similarly, if predictive information flows from \(y\) to \(x\), the indicator function will be given by \(I_{Y\rightarrow X} (s,\tau )\) and the Granger causality measure will be defined as:

$$\begin{aligned} G_{Y\rightarrow X} (s,\tau )=\frac{\zeta \left\{ s^{-1}|\mathfrak {R}\left( W_{XY}^m (s,\tau )\right) I_{Y\rightarrow X} (s,\tau )|\right\} }{\zeta \left\{ s^{-1}\sqrt{|W_{X}^{m} (s,\tau )|^{2}}\right\} \cdot \zeta \left\{ s^{-1}\sqrt{|W_{Y}^{m} (s,\tau )|^{2}}\right\} } \end{aligned}$$
(15)

It is also possible to investigate the in-phase or the out-of-phase causal effects separately by appropriately defining the indicator function over the required phase-difference. Thus, if the indicator function \(I_{X\rightarrow Y} (s,\tau )\) is true over \(\phi _{XY} \in (0,\pi /2)\) or \(\phi _{XY} \in (-\pi /2,0)\), then \(G_{X\rightarrow Y} (s,\tau )\) is a measure of in-phase causality. Further, if the indicator function \(I_{X\rightarrow Y} (s,\tau )\) is true over \(\phi _{XY} \in (-\pi ,-\pi /2)\) or \(\phi _{XY} \in (\pi /2,\pi )\), then \(G_{X\rightarrow Y} (s,\tau )\) is a measure of out-of-phase causality. Predictive information can also flow from \(y\) to \(x\), in-phase or out-of-phase, so that the relevant indicator function is given by \(I_{Y\rightarrow X} (s,\tau )\) and the Granger causality is given by \(G_{Y\rightarrow X} (s,\tau )\).

4 Data Generating Process (DGP) for Synthetic Data

Our objective in this section is to see how our measure of causality in continuous wavelet transform performs on synthetic data and thus put in perspective its ability to identify the region of causal effects between any two given variables in time and frequency. We will also use the synthetic data to show how such measures as wavelet power spectrum, wavelet coherence and wavelet correlation fail to identify the region of causal effects. The causal effects are better introduced through the time–frequency domain. To that end, we apply the formula given in Eq. (6) on the simulated random error terms \(\varepsilon _{j,t} \sim N(0,\sigma _{j}^{2}),\; j=1,2\), analyzing them over the scales to obtain the characterizing coefficients. For the length of data used in this study (we generated 400-long pseudo series on each of the error terms), there are 18 characterizing coefficients and 18 by 400 matrix of such characterizing coefficients for the entire pseudo-dataset. Having analyzed the simulated data this way, we proceed by using the following VAR (1) model as the data generation process (DGP) to recursively obtain scale-dependent series coefficient-by-coefficient.

$$\begin{aligned} \left( {{\begin{array}{l} y_{s,1,t} \\ y_{s,2,t} \\ \end{array}}} \right) =\left( {{\begin{array}{ll} 0.45&{}\; a \\ b&{}\; 0.1 \\ \end{array}}}\right) \left( {{\begin{array}{l} y_{s,1,t-1} \\ y_{s,2,t-1} \\ \end{array}}} \right) +\left( {{\begin{array}{l} \varepsilon _{s,1,t} \\ \varepsilon _{s,2,t}\\ \end{array}}}\right) \end{aligned}$$
(16)

where \(\varepsilon _{j,t} \sim N(0,\sigma _{j}^{2}),\;j=1,2\), are the error terms possibly capturing other variables omitted from the model and \(t=1,2,\ldots ,T\). Two cases are studied. Firstly, we study the unidirectional causality running from \(y_{s,2,t} \) to \(y_{s,1,t} \) at scale \(s\). This case corresponds to setting \(b=0\) and \(a\ne 0\) indicating causality from \(y_{s,2,t} \) to \(y_{s,1,t} \). Secondly, we study the case of bidirectional causality, which corresponds to setting \(b\ne 0\) and \(a\ne 0\) concurrently, indicating causality from \(y_{s,2,t} \) to \(y_{s,1,t} \) and from \(y_{s,1,t} \) to \(y_{s,2,t} \).

In the final analysis, we employ formula in Eq. (6) to reconstruct the data. In the case of unidirectional causality, the reconstructed series \(y_{1,t}\) from \(y_{s,1,t}\) is caused at all scales while series \(y_{2,t}\) constructed from \(y_{s,2,t}\) is the one causing \(y_{1,t}\) at all scales over the specified time interval. Here, we set \(a=\pm 0.45\) for the length of periods when the system is subjected to causal effects and \(a=0\) for other periods. We also set \(\sigma _{j}^{2} =10^{-6},\; j=1,2\). Further, under the bidirectional causality, we maintain the parameter calibration as above while setting \(b=\pm 0.45\).

As will soon be clear, these negative causation coefficients (i.e., \(a=-0.45\) and \(b=-0.45)\) indicate the presence of anti-phase (negative) causal effects between the variables just as positive coefficients indicate the presence of in-phase (or positive) causal effects. In the time-domain or frequency domain analysis of causality, this directional impact information is generally unavailable, though very much desired. Thus, it is not possible to infer if two variables share a negative or positive causal relationship. Such information is also not available from the method based spectral matrix factorization. In the proposed approach, however, we obtain it seamlessly as a by-product.

We analyze two simulated datasets where we subject the data to causal effects using the DGP in Eq. (15). The time interval for the study is given by \(1\le T_{1} <T_{2}\le T\). We set \(T=350\) for the simulation period. For the start and end periods for the causal duration, we set \(T_{1}=150\) and \(T_{2}=250\) respectively. For the first simulated dataset, we introduce unidirectional causality by setting \(a=0.45\) and \(b=0\) while we set \(a=0.45\) and \(b=0.45\) to obtain bidirectional causality. For the second simulated dataset, we are interested in the directional causal effects. We thus set \(a=-0.45\) and \(b=-0.45\). In this case, we conduct anti-phase causal analysis to discover the directional causal effects. To obtain the significance of causal effects, we conduct Monte Carlo simulation using an ARMA process for null. Significance is indicated by the area in the space higher than the ARMA(1,1) null background. In this case, we use 3,000 re-drawings. The periods of causal effects running from \(y_{2}\) to \(y_{1}\) are precisely identified in these two cases. In Panel (a) of Fig. 2, we plot the simulated data between \(y_{1}\) and \(y_{2}\) and analyze the bidirectional causal effects between them in Panels (b) and (c). The bidirectional causal effects are found to be significant at 95 percent level between \(T_{1} =150\) and \(T_{2} =250\). In Panel (b) of Fig. 3, we do not find any significant causal effects between \(T_{1} =150\) and \(T_{2} =350\) confirming that causality does not run from \(y_{1} \) to \(y_{2}\) (i.e., \(b=0\)). On the other hand, the results in Panel (c) of Fig. 3 indicate significant causal effects from \(y_{2}\) to \(y_{1}\) (i.e., \(a\ne 0\)). Panel (c) of Fig. 3 in particular further confirms an instance of in-phase causal relationship (i.e., \(a>0\)) in the simulated data. On the other hand, the results in Fig. 4 reveal anti-phase causality by which is meant the negative relationship in causal effects (i.e., \(a<0\)) in the simulated data. As indicated above, these results are much broader than the results based on the traditional causality tests, with no capability to distinguish between the positive and the negative effects. They are also broader than the results obtainable from the approach advanced by Dhamala et al. (2008) for the same reason.

Fig. 2
figure 2

Synthetic data for bidirectional causal relation. Notes: The white (red) contour indicates a 5 % (10 %) significance level. The significance levels are based on 3,000 draws from Monte Carlo simulations estimated on an ARMA(1,1) null of no statistical significance. The green line is the cone-of-influence (COI) earmarking the areas affected by the edge effects or phase. The causal effects captured have been generated for the period between 150 and 250. The scale has been converted to period using the relation in Eq. (9): \(Ft=\lambda \cdot s\), where \(\lambda =4\pi /\left[ \omega _{o}+(2+\omega _{o}^{2})^{1/2}\right] \) for the Morlet wavelet function. Using \(\omega _{o} =6\) for optimal balance (Torrence and Compo 1998), we have \(Ft=1.033\cdot s\). a Simulated data, b Causality from \(y_{1,t}\, to\, y_{2,t}\), c Causality from \(y_{2,t}\, to\, y_{1,t}\). (Color figure online)

Fig. 3
figure 3

Synthetic data for unidirectional causal relation (in-phase). Notes: The white (red) contour indicates a 5 % (10 %) significance level. The significance levels are based on 3,000 draws from Monte Carlo simulations estimated on an ARMA(1,1) null of no statistical significance. The green line is the cone-of-influence (COI) earmarking the areas affected by the edge effects or phase. The causal effects captured have been generated for the period between 150 and 250. The scale has been converted to period using the relation in Eq. (9): \(Ft=\lambda \cdot s\), where \(\lambda =4\pi /\left[ \omega _o +(2+\omega _{o}^{2})^{1/2}\right] \) for the Morlet wavelet function. Using \(\omega _{o} =6\) for optimal balance (Torrence and Compo 1998), we have \(Ft=1.033\cdot s\). a Simulated data, b Causality from \(y_{1,t}\, to\, y_{2,t}\), c Causality from \(y_{2,t}\, to\, y_{1,t}\). (Color figure online)

Fig. 4
figure 4

Synthetic data for unidirectional causal relation (out-of-phase analysis). Notes: The white (red) contour indicates a 5 % (10 %) significance level. The significance levels are based on 3,000 draws from Monte Carlo simulations estimated on an ARMA(1,1) null of no statistical significance. The green line is the cone-of-influence (COI) earmarking the areas affected by the edge effects or phase. The causal effects captured have been generated for the period between 100 and 250. The scale has been converted to period using the relation in Eq. (9): \(Ft=\lambda \cdot s\), where \(\lambda =4\pi /\left[ \omega _{o} +(2+\omega _{o}^{2})^{1/2}\right] \) for the Morlet wavelet function. Using \(\omega _{o} =6\) for optimal balance (Torrence and Compo 1998), we have \(Ft=1.033\cdot s\). a Simulated data, b Causality from \(y_{1,t}\, to\, y_{2,t}\), c Causality from \(y_{2,t}\, to\, y_{1,t}\). (Color figure online)

5 Financial Stress and Economic Activity in the US: An Application

We now apply the proposed method on real data. We are interested in one of the new topics in macroeconomics, namely the relationship between financial stress and economic activity, and the goal is to identify the time-scale causal effects between the variables. Although it is generally believed that financial imbalances often lead to financial strains and severe financial crisis and consequently to recession (see, for instance, Borio and Lowe 2002; Borio and Drehmann 2009, and Bloom, 2009), it is the unwinding financial and economic crisis that prompted a volley of research work directed at understanding the connection between these two series (Björn, 2011). For the US economy, Davig and Hakkio (2009 and 2010) and Hatzius et al. (2010) call attention to the relationship that exists between financial stress and economic activity using a newly available measure of financial conditions. Davig and Hakkio (2010) find that the relationship has been subject to regime switching at various points in time and that this relationship is also episodic at some specific points in time. In particular, they classify the relationship into normal and distressed periods. While it is suggested that the financial stress impacts negatively on economic activity both in normal and distressed period, such a result is inferred and not established from the data. In other words, causality was not established between the two variables. In Ng (2011), the predictive power of the financial condition indices by Hatzius et al. (2010) and others is examined. He finds that the series has predictive ability and improves the forecasting performance considerably at the horizons of 2 to 4 quarters. Similarly, Grimaldi (2010) examines the performance of a financial stress index for the Euro Area and finds that the index can efficiently extract information from an otherwise noisy signal. She indicates that the index additionally provides richer information than simple measures of volatility. Holló et al. (2011) also conclude using a threshold bivariate VAR model that the impact of financial stress on economic activity in the Euro Area depends on the prevailing regime. Mallick and Sousa (2011) use two identifications in a Bayesian VAR (BVAR) and a sign-restriction VAR to examine the real effects of financial stress and find that unexpected variation in financial stress leads to significant variations in output.

With the newly constructed measures of financial stress across countries, studies are emerging that present the connections between financial stress and economic activity in these countries. For instance, Cardarelli et al. (2011) examine why some financial stress periods lead to a downswing in economic activity in 17 advanced economies over 30 years using an augmented indicator that includes more variables from the banking sector. Yet, no known study has examined whether the variation between financial stress and economic activity is modulated by short-run or long-run factors underlying the causal relationship. In this section, we employ causality in continuous wavelet transforms to examine how causal relations have evolved over time and frequency. Specifically, we study the flows of causal relation and examine how the status of the driver between the two variables has changed over time. Our objective is to capture the causal driver between financial stress and economic activity during those episodic periods and to show whether the driver’s role in this causality depends on the regime.

Following Davig and Hakkio (2010), we measure financial stress using the Kansas City Federal Reserve’s Financial Stress Index (KCFSI) and economic activity using the Chicago National Fed Activity Index (CNFAI). As noted by Davig and Hakkio (2010), KCFSI is based on eleven (11) variables each capturing some aspects of financial stress. The measure is derived from factor analysis. CNFAI is transformed into 3-month moving average again in line with Davig and Hakkio (2010). However, our data cover a broader span of period between January 1990 and December 2013, thus covering the period considered by Davig and Hakkio (2010). To be consistent with their result we also consider the sub-period covered in their study, that is, between January 1990 and January 2010. Figure 5 displays the plot for these series. The mean and the variance are 0.0022 and 1.0026 for the KCFSI and \(-\)0.1671 and 0.5718 for CNFAI respectively. This indicates that the positive values of the KCFSI imply financial distress and the positive values of CNFAI imply economic boom. Similarly, the negative values of the KCFSI imply financial ease and the negative values of CNFAI imply economic crunch. Indeed, on average, the U.S. economy has been in recession and marginally experienced financial distress over the study period given the mean values of the CNFAI and KCFSI.

Fig. 5
figure 5

Time series plots of KCFSI and CNFAI. a KCFSI, b CNFAI

Figure 6 presents the results of causality in continuous wavelet transforms. In Panels (a) and (b) of Fig. 6, we present the time-frequency plots of the CWT of causal effects from KCFSI to CNFAI in level curves as there are three dimensions involved. The colour code indicates the height of the level curves which runs from 0 to 1 and gives an indication of strength of the causal effects between the two variables. The vertical axis reports the frequency reported in days while the horizontal axis reports the time. We observe strong causal effects between 1990 and 1993 on the \(8{\sim }16\) day frequency and between 1990 and 1996 on the \(16{\sim }64\) day frequency. A much stronger causal effect however manifests between 2000 and 2013 on the \(8{\sim }64\) day frequency. This latter result points to the period of the unwinding global recession particularly between 2006 and 2010 when causal effect further widens out. However, in Panel (b), we do not observe any strong causal effect running from CNFAI to KCFSI. In Panel (c), we report the Rua (2013) measure of CWT correlation. Obvious from this graph is the fact that the periods of causal relations observed in Panel (a) correspond to the period of high negative correlation between the two variables.

Fig. 6
figure 6

Continuous wavelet transform plot of causality between KCFSI and CNFAI. Notes: The white (red) contour indicates a 5 % (10 %) significance level. The significance levels are based on 3,000 draws from Monte Carlo simulations estimated on an ARMA(1,1) null of no statistical significance. The green line is the cone-of-influence (COI) earmarking the areas affected by the edge effects or phase. The scale has been converted to period using the relation in Eq. (9): \(Ft=\lambda \cdot s\), where \(\lambda =4\pi /\left[ \omega _{o} +(2+\omega _{o}^{2})^{1/2}\right] \) for the Morlet wavelet function. Using \(\omega _{o}=6\) for optimal balance (Torrence and Compo 1998), we have \(Ft=1.033\cdot s\). a CWT causality from KCFSI to CNFAI, b CWT causality from CNFAI to KCFSI, c Rua’s (2013) wavelet correlation. (Color figure online)

To further attest to this finding, we report in Fig. 7 the in-phase (positive) causal effects in Panels (a) and (b) respectively for causal effects from KCFSI to CNFAI and from CNFAI to KCFSI, and the anti-phase (negative) causal effects in Panels (c) and (d) respectively for causal effects from KCFSI to CNFAI and from CNFAI to KCFSI. The period of positive causal effects found in Panel (a) of Fig. 7 tallies with the period of Russian bond default in1998. This period was identified as distressed in Davig and Hakkio (2010). Here, we find that this might not be correct as KCFSI is found to positively cause CNFAI during this period. Indeed, reviewing Chart 4 in their paper indicates that the two series move in the same direction during this period as confirmed in Panel (a). In Panel (b), the negative causal effects are widespread particularly over the business cycle range. Specifically, between 1990 and 1997, financial stress negatively caused economic activity. No negative causation took place from financial stress to economic activity until 2002. Between 2002 and 2013, negative causal effects have continued to be present.

Fig. 7
figure 7

In-phase and out-of-phase plots of causality between KCFSI and CNFAI Notes: The white (red) contour indicates a 5 % (10 %) significance level. The significance levels are based on 3,000 draws from Monte Carlo simulations estimated on an ARMA(1,1) null of no statistical significance. The green line is the cone-of-influence (COI) earmarking the areas affected by the edge effects or phase. The scale has been converted to period using the relation in Eq. (9): \(Ft=\lambda \cdot s\), where \(\lambda =4\pi /\left[ \omega _{o} +(2+\omega _{o}^{2})^{1/2}\right] \) for the Morlet wavelet function. Using \(\omega _{o} =6\) for optimal balance (Torrence and Compo 1998), we have \(Ft=1.033\cdot s\). a In-phase (positive) causal effects from KCFSI to CNFAI, b In-phase (positive) causal effects from CNFAI to KCFSI, c Out-of-phase (negative) causal effects from KCFSI to CNFAI, d Out-of-phase (negative) causal effects from CNFAI to KCFSI. (Color figure online)

6 Conclusion

The main objective of this paper is to propose a less computationally challenging nonetheless powerful alternative approach to implementing the continuous wavelet transform causality. Until recently, the bulk of studies on causal links has been carried out in time domain or in frequency domain. Known difficulty in inferring the causal effects over time and frequency at the same time is a major setback to using either of these approaches. The proposal to use spectral matrix factorization approach such as Wilson’s (1972) algorithm in order to obtain the minimum-phase transfer function is bedeviled by computational challenges. We propose an alternative approach that circumvents this problem by combining the information from the magnitude and the phase-difference of the Rua (2013) correlation measure to derive a suitable approach to testing causality in continuous wavelet transform that circumvents the computationally intensive approach based on spectral matrix factorization. The results based on the synthetic data convincingly show that our approach does a good job in identifying the causal islands in the time-frequency space. We also apply the approach on the relationship between US financial stress and economic activity and obtain interesting results. It is also possible to obtain the results on the direction of causal effects, a piece of useful information that may be interesting in itself but which has been previously missing from the literature.