1 Introduction

The purpose of this paper is a contribution to the literature of specification testing in spatial econometric models, focusing on systems of models. We consider a spatial autoregressive model in which a multivariate random variable is explained by spatially weighted lags of itself. Doing this, we allow for more than one spatial matrix and for cross-sectional heterogeneity of the error variances.

A classical reference for the question about the presence of global spatial dependence in a given data set is Moran’s I (Moran 1950). This statistic is often used mainly in a descriptive way, but is also used for testing spatial dependence in linear and non-linear panel models (Kelejian and Prucha 2001). Li et al. (2007) provide an alternative measure to Moran’s I. Other diagnostic tests for spatial dependence are the LM-tests by Anselin (1996) and the regression-based tests by Born and Breitung (2011). Su and Qu (2017) propose specification tests for SAR models.

However, neither of the mentioned tests consider the case of several time points. This is different for Baltagi et al. (2003) who propose LM-tests for spatial dependence and for Millo (2017) who proposes a randomization test in a factor-augmented panel. Kelejian and Piras (2016) propose a J-test procedure for testing a null model against non-nested alternatives for a fixed effects spatial panel data framework.

The model that we consider is slightly different from those considered in the approaches from the last paragraph. We focus on a repeated cross-sectional model, i.e. we have a SAR(m)-model for a fixed time point and stack these models for different time points. The model parameters can be estimated in a straightforward way by a two-step approach. This way, heterogeneity in the error variances can be incorporated easily.

Another related branch consists of testing procedures for selecting the best spatial weighting matrix from a set of potential candidates (Herrera et al. 2019; Kelejian and Piras 2011; LeSage and Pace 2014, e.g.). While our test can also be used for such model selection issues, the focus of specification testing is broader, since it tests the correctness of a model and its accompanying assumptions. We illustrate this in our application by first identifying spatial matrices modeling the spatial dependence of stock returns. We then use these spatial matrices to define different models, which we finally test with our model specification test.

It is precisely the connection between spatial dependence and stock returns that has received particular interest in the economics and finance literature in recent years. Asgharian et al. (2013), for instance, investigate in which way stock market co-movements are determined by countries’ economic and geographical relations. Tam (2014) analyzes equity market linkages in East Asia, Blasques et al. (2016) extend the spatial Durbin model by a time-varying spatial dependence parameter, Selan and Kalatzis (2017) analyze peer effects in Brazil.

A general observation is that the use of spatial and network statistical models is becoming more popular for modelling common stocks (both returns and volatility) rather than only stock markets of different countries. The role of geographical distance for modelling stock markets cross-correlation is quite debated, so the concept of "distance" is discussed and broadened using general definitions in the literature (cf. Fernández-Avilés et al. 2012; Fülle and Otto 2023; Mattera and Otto 2023; Zhou et al. 2020.)

More relevant for our work is Arnold et al. (2013) who consider a system of spatial autoregressive (SAR) models for stock returns in order to capture local dependencies and dependencies within industrial branches. Wied (2013) considers structural breaks in these models and Schmitt et al. (2016) combine the approach with local normalization techniques. Gong and Weng (2016) use the model for value at risk forecasts in the Chinese stock market. Catania and Billé (2017) generalize the SAR model with autoregressive and heteroscedastic disturbances by including methods from score-driven models. Various empirical analyses in the aforementioned papers show that the SAR model is generally suitable for Value-at-Risk (VaR) forecasts and outperforms, e.g., the one-factor model.

The model in the present paper is a generalization of the model from Arnold et al. (2013) since we allow for an arbitrary fixed number of spatial matrices. We propose two methods on how to check the model fit, Note the fact that the model fits the data, implies that the spatial dependence structure incorporated in the model fits the data. Thus, we can interpret a specification test as a test for spatial dependence.

The basic idea stems from the model assumption that spatial weighting matrices capture all spatial dependence and that the remaining error terms are spatially uncorrelated. Therefore, we consider the model residuals to have the characteristic that if the covariance matrix of the residuals is basically diagonal, i.e. its off-diagonal elements are close to zero, the tests do not reject the null hypothesis of a correctly specified model. We derive the asymptotic distribution of our test statistics and show in simulations that the tests have reasonable power properties against sparse error term covariance matrices. In the simulations, we also account for conditional heteroscedasticity, a feature that is considered to be important if spatial models are used for VaR predictions (see, e.g., Zhang et al. 2018). In an empirical application on stock data from the Euro Stoxx 50, we test the model fit for different spatial weighting matrices and analyze in which sense the tests’ results are related to the quality of VaR forecasts. We consider the time spans around the global financial crisis in 2008 and the COVID-19 crisis in 2020.

This paper is organized as follows: Sect. 2 describes the classical spatial autoregressive model, discusses its assumptions and efficient estimation procedures and provides two model specification tests. Section 3 presents an extensive Monte Carlo simulation study and Sect. 4 covers our empirical application. Finally, Sect. 5 concludes. The Supplementary Material contains all proofs of our theoretical results, as well as the results of the extensive MC study.

2 A cross sectional correlation based specification test for a system of SAR(m) models

In this section, we initially introduce a system of SAR(m) models of order m with \(m\in I \!\! N\) and discuss its assumptions and efficient parameter estimation procedures. We then present two model specification tests, with the latter showing better power properties as demonstrated in Sect. 3.

2.1 SAR(m): assumptions and parameter estimations

We consider observations \(y_{ti}\) for individuals \(i=1,\ldots ,n\) and time periods \(t=1,\ldots ,T\). For each t, the \(y_{ti}\) can be modeled by a spatially autoregressive model of order \(m\in I \!\! N\), SAR(m), i.e.

$$\begin{aligned} \pmb {y}_t=\sum \limits _{i=1}^m\rho _i W_i \ \pmb {y}_t+\pmb {\varepsilon }_t \end{aligned}$$
(1)

where \(\pmb {y}'_t=(y_{t1},\ldots ,y_{tn})\) and \(\pmb {\varepsilon }'_t=(\pmb {\varepsilon }_{t1},\ldots ,\pmb {\varepsilon }_{tn})\). The parameters \(\rho _i\) with \(i=1,\ldots ,m\) are the scalar spatial autoregressive coefficients and \(W_i\) for \(i=1,\ldots ,m\) the pre-specified \(n\times n\) spatial weighting matrices that do not vary over time. An overview of commonly used spatial matrices is given in Piras et al. (2012). By rearranging, we obtain a simplified version of model (1), i.e. 

$$\begin{aligned} \pmb {y}_t=(I_n-\sum \limits _{i=1}^m\rho _i W_I)^{-1}\pmb {\varepsilon }_t. \end{aligned}$$
(2)

The observations in the cross-sectional dimension i are assumed to be fixed. We impose the following model assumptions:

Assumption 1

  1. 1.

    The sequence \(\{\pmb {\varepsilon }_t\}_{t \in I \!\! N}\) has zero mean, is stationary and ergodic.

  2. 2.

    For \(i \in \{1,\ldots ,m\}\), \(r=1,\ldots ,n\), \(s = 1,\ldots ,n\), \(W_{i,rs}\ge 0\), \(W_{i,rr}=0\).

  3. 3.

    For \(i \in \{1,\ldots ,m\}\) and \(r=1,\ldots ,n\), \(\sum _{s=1}^n W_{i,rs}=1\).

  4. 4.

    The parameter space \({\mathcal {S}}_{\pmb {\rho }}\) is defined as \({\mathcal {S}}_{\pmb {\rho }}=\{\pmb {\rho }\in {\mathbb {R}}^m \,:\, ||\pmb {\rho }||_1<1\}\) where \(||\cdot ||_1\) defines the \(L^1\)-norm, i.e. \(||\pmb {\rho }||_1=\sum \limits _{i=1}^m |\rho _i|\).

  5. 5.

    The spatial parameter vector \(\pmb {\rho }\) is uniquely identified.

  6. 6.

    Define \(\Sigma {\mathop {=}\limits ^{d}} \textsf{Cov}\left( \pmb {\varepsilon }_t\right) \). For \(t \in \mathbb {Z}\), \(diag(\Sigma )=\left( \sigma _1^2,\ldots ,\sigma _n^2\right) \in \mathbb {R}^n\).

  7. 7.

    Each element of the vector \(\left( \frac{1}{\sqrt{T}} \sum \limits _{t=1}^T \pmb {\varepsilon }_t\pmb {\varepsilon }_t'\right) _{i< j}\) meets the assumption of a central limit theorem and the corresponding long-term covariances

    $$\begin{aligned} \sum \limits _{s,t\in I \!\! N} \textsf{ Cov} \ [\pmb {\varepsilon }_{it}\pmb {\varepsilon }_{jt},\pmb {\varepsilon }_{ks}\pmb {\varepsilon }_{ls}] \end{aligned}$$

    are finite for every \(i<j\) and \(k<l\), where we interpret \(\left( \cdot \right) _{i< j}\) as the stacked vector of the upper triangular matrix.

The zero mean and stationarity condition in Assumption 1.1. are plausible especially in the context of daily stock returns (see Aue et al. 2009). If this assumption is violated, trend adjustment, centering or, to be more general, considering appropriate residuals, could ensure that it is (asymptotically) met. To exclude self-neighbors, the diagonal elements of \(W_i\) with \(i=1,\ldots ,m\) are conventionally set equal to zero (Assumption 1.2.). Additionally, Assumption 1.2. claims that all elements are non-negative (which is natural), as distances are measured. Assumption 1.3. ensures that the matrices are bounded and standardized. Assumption 1.4. restricts the parameter space to the sum of the absolute values of the elements of \(\pmb {\rho }\in \mathbb {R}^m\) smaller than 1. While the assumption could slightly be generalized (cf. Piras et al. 2012), we follow the notation of Arnold et al. (2013) as it guarantees that the matrix \((I_n-\sum _{i=1}^m\rho _iW_i)\) is non-singular.Footnote 1 Assumption 1.5. yields a high-level identification assumption which is specified in the Supplementary Material in Assumption 3.1. It rules out certain combinations of spatial weighting matrices, e.g., these matrices must be pairwisely distinct. Assumption 1.6. allows for heteroscedastic error variances and Assumption 1.7. is a standard asymptotic condition that allows for deriving non-degenerate asymptotic distributions of the estimators and test statistics.

We consider the two step GMM procedure of Arnold et al. (2013) in order to obtain efficient estimates for the parameters \(\rho _i\) with \(i=1,\ldots ,m\) and \(\sigma _l^2\) with \(l=1,\ldots ,n\).

This consists of the following two steps:

First, we estimate the spatial parameters \(\rho _i\), \(i=1,\ldots ,m\) using the method of moments. Due to its construction, this step does not depend on the parameters of variance \(\sigma ^2_l\) with \(l=1,..,n\). Second, for given spatial estimates, the estimation of variance parameters is obtained by computing the mean of the estimated \({\hat{\varepsilon }}_{it}^2\) with \(i=1,\ldots ,n\). Under some regularity assumptions, the GMM estimator \(\hat{\pmb {\rho }}\) is consistent and asymptotically normal (cf. Theorem 2.2). While this is worked out in Arnold et al. (2013) for the special case of \(m=3\), a detailed derivation for the GMM estimator in the general case is presented in the Supplementary Material 2.2, i.e. \(m\in I \!\! N\) is finite and fixed.

2.2 A two step GMM estimation procedure for a system of SAR(m) models

In the following, we assume that Assumption 1 is fulfilled. The covariance matrix of \({\pmb {u}}_t=(I_n-\sum \limits _{i=1}^m\rho _i W_I)^{-1}\pmb {\varepsilon }_t\) is given by

$$\begin{aligned} \textsf{Cov}[\pmb {u}_t] = \left( I_n-\sum \limits _{i=1}^m\rho _i W_i\right) ^{-1}\Sigma \left( I_n-\sum \limits _{i=1}^m\rho _i W_i^\prime \right) ^{-1} =: V. \end{aligned}$$

For the estimation, a two step procedure is considered: First, we estimate the correlation parameters by the method of moments which does not depend on the parameters of variance. Secondly, we estimate the variance parameters.

The moment estimator for the correlation parameters uses the following m moment conditions:

$$\begin{aligned} {\textsf{E}}\left[ \pmb {\varepsilon }_t' W_i \pmb {\varepsilon }_t \right] = \textsf{tr}(W_i \Sigma ) = 0\qquad \text { for }\qquad i=1,\ldots ,m. \end{aligned}$$
(3)

Clearly, the variance parameters \(\sigma _i^2\) for \(i=1,\ldots ,m\) do not enter the moment conditions. Replacing \(\pmb {\varepsilon }_t\) by

$$\begin{aligned} \pmb {\varepsilon }_t = \left( I_n-\sum \limits _{i=1}^m\rho _i W_i\right) \pmb {u}_t \end{aligned}$$

and averaging over t gives the theoretical system of equations

$$\begin{aligned} \Gamma \pmb {\lambda }+ \pmb {\gamma }= 0, \end{aligned}$$

where \(\pmb {\lambda }=\pmb {\lambda }(\pmb {\rho })\) is a functional vector of \(\pmb {\rho }=(\rho _1,\ldots \rho _m)\) of dimension

\(M={m\atopwithdelims ()1}\) \(+\) \( {m+2-1}\atopwithdelims ()2\), \(\cdot \atopwithdelims ()\cdot \) denoting the binomial coefficient, such that

$$\begin{aligned} \lambda _i&=\rho _i \qquad&\text { for }\qquad i=1,\ldots ,m \end{aligned}$$
(4)
$$\begin{aligned} \lambda _{m+i}&=\rho ^2_i \qquad&\text { for }\qquad i=1,\ldots ,m \end{aligned}$$
(5)
$$\begin{aligned} \lambda _{2m+\#\{ij\,|\, i<j, i<l, j\le k\}}&=\rho _l\rho _k \qquad&\text { for }\qquad l,k=1,\ldots ,m, \end{aligned}$$
(6)

where \(\#\{ij\,|\, i<j, i<l, j\le k\}\) represents the number of integer pairs ij such that the conditions \(i<j, i<l\) and \(j\le k\) are fulfilled for \(l,k=1,\ldots ,m\). The elements of \(\Gamma \in \mathbb {R}^{m\times M}\) and \(\gamma \in \mathbb {R}^m\) are defined by for \(i,j=1,\ldots ,m\),

$$\begin{aligned} \Gamma _{i,j}= & {} {\textsf{E}}\left[ -\frac{1}{T}\sum _{t=1}^T \pmb {u}_t'\left( W_i + W_i'\right) W_j \pmb {u}_t\right] , \end{aligned}$$
(7)
$$\begin{aligned} \Gamma _{i,m+j}= & {} {\textsf{E}}\left[ \frac{1}{T}\sum _{t=1}^T \pmb {u}_t' W_j' W_i W_j \pmb {u}_t\right] , \end{aligned}$$
(8)
$$\begin{aligned} \Gamma _{i,2m+\#\{ij\,|\, i<j, i<l, j\le k\}}= & {} {\textsf{E}}\left[ \frac{1}{T}\sum _{t=1}^T \pmb {u}_t' W_l' \left( W_i + W_i'\right) W_k \pmb {u}_t\right] ,\nonumber \\ \gamma _i= & {} {\textsf{E}}\left[ \frac{1}{T}\sum _{t=1}^T \pmb {u}_t' W_i \pmb {u}_t\right] . \end{aligned}$$
(9)

Let G and \(\pmb {g}\) be the empirical counterparts of \(\Gamma \) and \(\pmb {\gamma }\), i.e. the expectation operator is left out. The moment estimator for \(\pmb {\rho }=(\rho _1,\ldots ,\rho _m)'\) is defined as

$$\begin{aligned} \hat{\pmb {\rho }} = ({\hat{\rho }}_1,\ldots , {\hat{\rho }}_m)'=\arg \min _{\pmb {\rho } \in S} || G\pmb {\lambda }+ \pmb {g}|| \end{aligned}$$

where \(||\cdot ||\) represents the euclidean norm.

Remark 2.1

For \(k, l \in \{1,\ldots ,m\}\), the entries of \({\textsf{E}}[G]=\Gamma \) given in (7)–(9) can be calculated as

$$\begin{aligned} \begin{aligned}&\Gamma _{k,l} = \textsf{tr}\left( \left( W_k + W_k'\right) W_l V\right) , \\&\quad \Gamma _{k,m+l} = \textsf{tr}\left( W_l' W_k W_l V\right) ,\\&\quad \Gamma _{i,2m+\#\{ij\,|\, i<j, i<l, j\le k\}} = \textsf{tr}\left( W_l' \left( W_i + W_i'\right) W_k V\right) . \end{aligned} \end{aligned}$$

Since the theoretical term \(\Gamma \pmb {\lambda }+\pmb {\gamma }\) is equal to zero for the true parameter values, the moment estimator for \(\hat{\pmb \rho }\) minimizes the corresponding empirical system \(G\pmb {\lambda }+ \pmb {g}\). Arnold et al. (2013) prove consistency and asymptotic normality of the moment estimator (cf. Theorem 2.2) for \(T\rightarrow \infty \), for which an additional assumption is needed.

Assumption 2

  1. 1.

    The true parameter \(\pmb {\rho }\in S\) is the unique solution of the theoretical system of equations, i.e.

    $$\begin{aligned} \Gamma \pmb {\lambda }+\pmb {\gamma }= 0 \Leftrightarrow \hat{\pmb {\rho }} = \pmb {\rho }. \end{aligned}$$
  2. 2.

    The matrix \({\textsf{E}}\left( \frac{\partial (G\pmb {\lambda }+ \pmb {g})}{\partial \hat{\pmb {\rho }}}(\pmb {y}_t,\pmb {\rho })\right) =: \pmb {d} = \Gamma \pmb {\lambda }^{(1)}\) exists, is finite and has full rank with \(\pmb {\lambda }^{(1)}\) a \((M\times m)\) dimensional matrix defined as

    $$\begin{aligned}&\pmb {\lambda }^{(1)}(l,l)=1,&\pmb {\lambda }^{(1)}(2m+\#\{ij\,|\, i<j, i<l, j\le k\},l)=\rho _k&\qquad \\&\pmb {\lambda }^{(1)}(m+l,l)=2\rho _l,&\qquad \pmb {\lambda }^{(1)}(2m+\#\{ij\,|\, i<j, i<l, j\le k\},k)=\rho _l \end{aligned}$$

    for all \(l,k=1,\ldots ,m\).

  3. 3.

    For

    $$\begin{aligned} f(\pmb {u}_t,\pmb {\rho }) = \begin{pmatrix} \pmb {\varepsilon }_t' W_1 \pmb {\varepsilon }_t \\ \vdots \\ \pmb {\varepsilon }_t' W_m\pmb {\varepsilon }_t \end{pmatrix}, \end{aligned}$$

    it holds that, for \(j \rightarrow \infty \), \({\textsf{E}}[f(\pmb {u}_{t},\pmb {\rho })\, |\, f(\pmb {u}_{t-j},\pmb {\rho }),f(\pmb {u}_{t-j-1},\pmb {\rho }),\ldots ]\) converges in mean square to zero and that, for

    $$\begin{aligned} \pmb {v}_j&= \textsf{ E} \ [f(\pmb {u}_t,\pmb {\rho })\,|f(\pmb {u}_{t-j},\pmb {\rho }),f(\pmb {u}_{t-j-1},\pmb {\rho }),\ldots )\\&\quad - \textsf{ E} \ [f(\pmb {u}_t,\pmb {\rho })\,|f(\pmb {u}_{t-j-1},\pmb {\rho }),f(\pmb {u}_{t-j-2},\pmb {\rho }),\ldots ] \end{aligned}$$

    the infinite sum \(\sum _{t=-\infty }^{\infty } {\textsf{E}}[(\pmb {v}_j\pmb {v}_j)^{\frac{1}{2}} ]\) is finite.

Under the Assumptions 1 and 2 the GMM estimator \(\hat{\pmb {\rho }}\) is consistent and asymptotic normal as the following theorem shows:

Theorem 2.2

Let Assumptions 1 and 2 hold. Then, for \(S_W = \sum _{t=-\infty }^{\infty } {\textsf{E}}[f(\pmb {u}_t,\pmb {\rho })f(\pmb {u}_t,\pmb {\rho })' ]\) and \(T\rightarrow \infty \) it holds:

  1. 1.

    \(\hat{\pmb {\rho }} {\mathop {\rightarrow }\limits ^{p}} \ \pmb {\rho }\)

  2. 2.

    \(\sqrt{T} (\hat{\pmb {\rho }} - \pmb {\rho }) {\mathop {\rightarrow }\limits ^{d}}\ N(0, \pmb {d}^{-1} S_W (\pmb {d}^{-1})')\).

The proof of this theorem is similar to the proof of Theorem 2.1 in Arnold et al. (2013).

2.3 The specification test

Our proposed test is a variation of the classical Portmaneau test, i.e. we check if the covariance matrix of the idiosyncratic error resembles a diagonal matrix. Under the null hypothesis, the off-diagonal elements do not deviate too far from zero. Let \({\hat{H}}\in \mathbb {R}^{n\times n}\) denote the empirical covariance matrix of the residuals times the square root of the time horizon T, i.e. \({\hat{H}}=\sqrt{T}{\hat{\textsf{ Cov} \ }}[\hat{\pmb {\varepsilon }_t}\,]\) and \({\hat{H}}_{ij}\) its elements with \(i,j\in \{1,2,\ldots ,n\}\). Let \(\sigma ^2_{ij}\) denote the (ij)-th element of the theoretical counterpart \(\Sigma \), i.e. the error covariance matrix. Since \({\hat{H}}\) and \(\Sigma \) are symmetric, it is sufficient to consider only the elements of the upper triangle of the matrix \(\Sigma \). Hence, the null hypothesis is given by

$$\begin{aligned} H_0:\sigma _{ij}^2=0 \ \text { for all } \ i<j\quad \text { vs. }\quad H_1:\exists \, i,j \text { with }i<j : \sigma _{ij}^2\ne 0. \end{aligned}$$
(10)

We opt to use \(\chi ^2\)-type tests for this testing problem. Instead of considering each element or the maximum of the absolute value of all off-diagonals, we take the sum of each element squared into account. Thus, the test statistic is given by

$$\begin{aligned} S=\sum \limits _{i<j, i,j=1,\ldots ,n}({\hat{H}}_{ij})^2. \end{aligned}$$
(11)

The aim of the following theorem is to decompose the limit in distribution of the empirical covariance matrix times \(\sqrt{T}\) into three matrices, which allow to determine the limit in distribution of the sum of the elements of the upper triangular matrix. Here and in the following \(\underset{T\rightarrow \infty }{\text {dlim}}\) denotes limit in distribution and \({\mathop {=}\limits ^{d}}\) equality in distribution.

Theorem 2.3

Under the null hypothesis \(H_0: \sigma ^2_{ij}=0\) for all \(i<j\) and the assumptions of Theorem 2.2, the following holds \(\text { for }\) \(1\le i,j\le n\)

$$\begin{aligned} \underset{T\rightarrow \infty }{\text {dlim}}\sqrt{T}\ {\hat{\textsf{ Cov} \ }}[{\hat{\pmb {\varepsilon }}}_t\,]\ {{\mathop {=}\limits ^{}}}\ A+B+B^{'}\in \mathbb {R}^{n\times n}\ \end{aligned}$$
(12)

\(\text {with }A_{ii}\ {{\mathop {=}\limits ^{}}}\ \underset{T\rightarrow \infty }{\text {lim}}\sqrt{T}\sum \limits _{t=1}^T\sigma _{it}^2=\infty \text { and } A_{ij}{{\mathop {\sim }\limits ^{}}} N\left( 0,\lim \limits _{T\rightarrow \infty } \textsf{ Var} \ [\frac{1}{\sqrt{T}}\sum _{t=1}^T \pmb {\varepsilon }_{it}\pmb {\varepsilon }_{jt}] \right) ,\) where

\(Cov[A_{ij},A_{kl}] = 0 \) for \(i \ne j\) and \(k \ne l\) with \((i,j) \ne (k,l)\). We also define

$$\begin{aligned}&B\ {{\mathop {=}\limits ^{d}}}\ \left( \sum _{i=1}^m X_iW_i\right) \left( I_n-\sum _{i=1}^m\rho _iW_i\right) ^{-1}\Sigma , \text { where }\\&\quad \pmb {X}{{\mathop {=}\limits ^{d}}}(X_1,\dots , X_m)\sim N(0,\pmb {d}^{-1}S_W(\pmb {d}^{-1})^{'})\in \mathbb {R}^{1\times m},\ S_W{{\mathop {=}\limits ^{d}}}\sum _{t=-\infty }^{\infty } {\textsf{E}}[f(\pmb {u}_t,\pmb {\rho })f(\pmb {u}_t,\pmb {\rho })' ]\\&\quad \text {with }f(\pmb {u}_t,\pmb {\rho }) {{\mathop {=}\limits ^{d}}} \left( \pmb {\varepsilon }_t' W_1 \pmb {\varepsilon }_t, \cdots , \pmb {\varepsilon }_t' W_m\pmb {\varepsilon }_t \right) ' \text { and } \pmb {d} \text { defined in Assumption~2}. \end{aligned}$$

Three remarks about Theorem 2.3 are in order. First, the leading elements of matrix A diverge to infinity. However, the tests consider only the off-diagonal elements (\(i\ne j, i,j=1,\ldots ,n\)) which are finite by Assumption 1.7. This in turn ensures that the test is well defined. Secondly, since \(\left( I_n-\sum _{i=1}^m\rho _iW_i\right) \) is strictly diagonally dominant, the inverse exists. Thirdly, we note that the matrices B and its transposed appear in the limit. This is due to the fact of estimating \(\pmb {\rho }\) instead of using the unknown population quantity. The analysis of such a residual effect (see Demetrescu and Wied 2019) is somewhat complicated, since the additional terms need different standardizing factors in the proof.Footnote 2 However, all terms in the limiting distribution are based on the same error terms. Thus, the convergence is jointly and the limiting distribution in (12) is multivariate normal. If we additionally assume serial independence in the error vector, the variance of the elements in the limiting matrix A simplifies to a product shown in the following remark.

Remark 2.4

Suppose the assumptions of Theorem 2.3 hold. If \(\{\pmb {\varepsilon }_t\}_{t\in \{1,\ldots ,T\}}\) is serially independent, then

$$\begin{aligned} A_{ij} \sim N(0,\sigma _i^2\sigma _j^2)\ \text { for }\ i\ne j. \end{aligned}$$
(13)

In accordance with our test statistic S (11), we can reformulate the test in vectorial notation, i.e. 

$$\begin{aligned} S={\hat{\pmb {\alpha }}}'{\hat{\pmb {\alpha }}}, \end{aligned}$$
(14)

where \({\hat{\pmb {\alpha }}}\) represents the vector of the upper triangle of the empirical covariance matrix of the residuals times \(\sqrt{T}\), i.e. \({\hat{H}}\). Since the empirical covariance matrix consists of \(n^2\) elements, the upper triangular matrix vector consists of \(n(n-1)/2\) elements and has the following form:

$$\begin{aligned}&{{\hat{\pmb {\alpha }}}}\ {\mathop {=}\limits ^{d}}\ \underset{T\rightarrow \infty }{\text {dlim}}\left( \sqrt{T}{\hat{\textsf{ Cov} \ }}[{\hat{\pmb {\varepsilon }}}_t\,]\right) _{i<j,\ i,j=1,\ldots ,n}\\&\quad {\mathop {=}\limits ^{}}\ \underset{T\rightarrow \infty }{\text {dlim}}\left( \frac{1}{\sqrt{T}}\sum {{\hat{\pmb {\varepsilon }}}_t}{{\hat{\pmb {\varepsilon }}}_t}^{'}\right) _{i<j,\ i,j=1,\ldots ,n}\ {\mathop {=}\limits ^{}}\ \underset{T\rightarrow \infty }{\text {dlim}}\frac{1}{\sqrt{T}}\sum \limits _{t=1}^T {{\hat{\pmb {\varepsilon }}}_t^*} \in {\mathbb {R}}^\frac{n(n-1)}{2}\\&\quad \text { with } {\hat{\pmb {\varepsilon }}}_t^*{\mathop {=}\limits ^{d}}\left( {\hat{\varepsilon }}_{1t}{\hat{\varepsilon }}_{2t},\ldots ,{\hat{\varepsilon }}_{1t} {\hat{\varepsilon }}_{nt},{\hat{\varepsilon }}_{2t}{\hat{\varepsilon }}_{3t},\ldots ,{\hat{\varepsilon }}_{2t} {\hat{\varepsilon }}_{nt},\ldots ,{\hat{\varepsilon }}_{(n-1)t}{\hat{\varepsilon }}_{nt}\right) '. \end{aligned}$$

By means of Slutzky’s theorem we define the theoretical counterpart

$$\begin{aligned}&{\pmb {\alpha }}\ {\mathop {=}\limits ^{d}}\ \left( A\right) _{i<j,\ i,j=1,\ldots ,n}\\&\quad {\mathop {=}\limits ^{}}\ \underset{T\rightarrow \infty }{\text {dlim}}\left( \frac{1}{\sqrt{T}}\sum {\pmb {\varepsilon }_t}{\pmb {\varepsilon }_t}^{'}\right) _{i<j,\ i,j=1,\ldots ,n}\ {\mathop {=}\limits ^{}}\ \underset{T\rightarrow \infty }{\text {dlim}}\frac{1}{\sqrt{T}}\sum \limits _{t=1}^T { {\pmb {\varepsilon }}_t^*} \in {\mathbb {R}}^\frac{n(n-1)}{2}\\&\quad \text { with } { {\pmb {\varepsilon }}_t^*}{\mathop {=}\limits ^{d}}\left( {\varepsilon _{1t}}{\varepsilon _{2t}},\ldots ,{\varepsilon _{1t}}{\varepsilon _{nt}}, {\varepsilon _{2t}}{\varepsilon _{3t}},\ldots ,{\varepsilon _{2t}}{\varepsilon _{nt}},\ldots , {\varepsilon _{(n-1)t}}{\varepsilon _{nt}}\right) ' \end{aligned}$$

which stacks the upper triangular matrix of the covariance matrix of the errors times \(\sqrt{T}\) in a vector. Analogously, \(\pmb {\delta }\) defines the vector of the stacked upper triangular matrix of B and \(\pmb {\delta }^*\) of \(B'\), respectively, i.e. for \(Z_W=\underset{T\rightarrow \infty }{\text {dlim}}\sum \limits _{g=1}^m\sqrt{T}(\rho _g-{\hat{\rho }}_g)W_G\) we define

$$\begin{aligned}&\pmb {\delta }{\mathop {=}\limits ^{d}}\left( B\right) _{i<j, i,j=1,\ldots ,n}\ = \left( Z_W(I_n-\sum \limits _{g=1}^m\rho _gW_G)^{-1}\Sigma \right) _{i<j,\ i,j=1,\ldots ,n}\in {\mathbb {R}}^\frac{n(n-1)}{2},\\&\quad \pmb {\delta }^{*} {\mathop {=}\limits ^{d}} \left( B'\right) _{i<j, i,j=1,\ldots ,n} = \left( \Sigma ^{'}(I_n-\sum \limits _{g=1}^m\rho _gW_G^{'})^{-1}Z_W^{'}\right) _{i<j,\ i,j=1,\ldots ,n}\in {\mathbb {R}}^\frac{n(n-1)}{2}. \end{aligned}$$

The vectors \(\pmb {\delta }\) and \(\pmb {\delta }^*\) are well defined, since B is not necessarily symmetric.

Lemma 2.5

\(\pmb {\delta }\) represents the stacked vector of the upper triangle and \(\pmb {\delta }^{*}\) of the lower triangle of the matrix \(Z_W(I_n-\sum \limits _{g=1}^m\rho _gW_G)^{-1}\Sigma \), i.e. for \(i,j\in \{1,\ldots ,n\}\)

$$\begin{aligned} \pmb {\delta }^{*}\ =\ \left( Z_W(I_n-\sum \limits _{g=1}^m\rho _gW_G)^{-1}\Sigma \right) _{i>j,\ i,j=1,\ldots ,n}\in {\mathbb {R}}^\frac{n(n-1)}{2}. \end{aligned}$$
(15)

The next lemma provides the limit distribution of our test statistic S (14).

Lemma 2.6

Suppose the assumptions of Theorem 2.3 hold. Then the test statistic S (11) is asymptotically distributed as

$$\begin{aligned} S =\ {\hat{\pmb {\alpha }}}'{\hat{\pmb {\alpha }}} \xrightarrow [T\rightarrow \infty ]{\text {d}}(\pmb {\alpha }+\pmb {\delta }+\pmb {\delta }^*)'(\pmb {\alpha }+\pmb {\delta }+\pmb {\delta }^*), \end{aligned}$$

where the covariance matrix for \(\pmb {\alpha }\) is given by

$$\begin{aligned} \textsf{ Cov} \ [\pmb {\alpha }]&= \left( \begin{array}{c c c} \lim \limits _{T\rightarrow \infty } \textsf{ Var} \ [\frac{1}{\sqrt{T}}\sum _{t=1}^T \pmb {\varepsilon }_{1t}\pmb {\varepsilon }_{2t} ]&{}\cdots &{} 0\\ \vdots &{} \ddots &{}\vdots \\ 0&{}\cdots &{}\lim \limits _{T\rightarrow \infty } \textsf{ Var} \ [\frac{1}{\sqrt{T}}\sum _{t=1}^T\pmb {\varepsilon }_{(n-1)t}\pmb {\varepsilon }_{nt} ] \end{array}\right) . \end{aligned}$$

To obtain the corresponding critical values, first, the model parameters are estimated for all models considered in the empirical application below. Second, a bootstrap procedure is employed to generate the critical values by drawing from the estimated model. Tables 6 and 7 show the corresponding critical values for all models considered in the empirical application below. As shown in Sect. 3, our proposed test takes care of size demands and has good power properties. The next subsection presents a modification of the proposed specification test with a simpler limit distribution.

2.4 Simplified tests

In Theorem 2.3 we have shown that the elements of the limiting distribution follow a multivariate normal distribution. Thus, if we standardize the test statistic S (14) by its covariance matrix, we get a new test statistic \(S^*_\chi \) which is \(\chi ^2\)-distributed, i.e.

$$\begin{aligned} S^*_\chi \ =\ {\hat{\pmb {\alpha }}}'(\textsf{ Cov} \ [\pmb {\alpha }+\pmb {\delta }+\pmb {\delta }^*])^{-1}{\hat{\pmb {\alpha }}} \sim \chi ^2_\frac{n(n-1)}{2}. \end{aligned}$$
(16)

The quantiles of this limit distributions can be easily obtained, but the implementation of test statistic is more complicated than that of (11). The following discussion shows how the implementation can be simplified.

The terms \(\pmb {\delta }\) and \(\pmb {\delta }^*\) can be regarded as additional noise which comes from the estimation procedure. This additional noise can be extracted by decomposing the covariance matrix given in (16) into two parts. Thus, we have

$$\begin{aligned} \textsf{ Cov} \ [\pmb {\alpha }+\pmb {\delta }+\pmb {\delta }^*]\ =\ \textsf{ Cov} \ [\pmb {\alpha }]+\Psi \end{aligned}$$
(17)

with \(\Psi \ =\ \textsf{ Cov} \ [\pmb {\delta }+\pmb {\delta }^*]+\textsf{ Cov} \ [\pmb {\alpha },\pmb {\delta }+\pmb {\delta }^*]+\textsf{ Cov} \ [\pmb {\alpha },\pmb {\delta }+\pmb {\delta }^*]'\). The first part \(\textsf{ Cov} \ [\pmb {\alpha }]\) covers the underlying variance structure while the second part \(\Psi \) can be considered as a noise term.Footnote 3

If either \(||(\textsf{ Cov} \ [\pmb {\alpha }])^{-1}\Psi ||<1\) or \(||\Psi (\textsf{ Cov} \ [\pmb {\alpha }])^{-1}||<1\) holds,Footnote 4 the inverse of the covariance matrix (17) can be estimated by means of a Taylor series approximation and a telescoping sum.Footnote 5 This yields

$$\begin{aligned} (\textsf{ Cov} \ [\pmb {\alpha }+\pmb {\delta }+\pmb {\delta }^*])^{-1}&=\ (\textsf{ Cov} \ [\pmb {\alpha }])^{-1}-(\textsf{ Cov} \ [\pmb {\alpha }])^{-1}\Psi (\textsf{ Cov} \ [\pmb {\alpha }])^{-1}\\&\quad +(\textsf{ Cov} \ [\pmb {\alpha }])^{-1}\Psi (\textsf{ Cov} \ [\pmb {\alpha }])^{-1}\Psi (\textsf{ Cov} \ [\pmb {\alpha }])^{-1}-\ldots \\&\quad \le \ (\textsf{ Cov} \ [\pmb {\alpha }])^{-1}. \end{aligned}$$

Thus, \((\textsf{ Cov} \ [{\pmb {\alpha }}])^{-1}\) is an upper bound for the inverse of the covariance matrix (17). Hence, for

$$\begin{aligned} S_\chi \ =\ \lim \limits _{T\rightarrow \infty }\frac{1}{T} \sum \limits _{t=1}^T {\hat{\pmb {\varepsilon }}}_t^{*'}(\textsf{ Cov} \ [\pmb {\alpha }])^{-1}\sum \limits _{t=1}^T {{\hat{\pmb {\varepsilon }}}_t^*}, \end{aligned}$$
(18)

we have the algebraic relation \(S_\chi \ge S^*_\chi \sim \chi ^2_{\frac{n(n-1)}{2}}\). Therefore, using the test statistic \(S_\chi \) with the quantiles of the \(\chi ^2_{\frac{n(n-1)}{2}}\) leads to a liberal test. This test might be preferred in applications if it appears to be too time-consuming to generate critical values by simulations. In order to study the behavior of S and \(S_\chi \) in finite samples, we perform an extensive Monte Carlo simulation study which can be found in the next section.

3 Monte Carlo simulation

3.1 Serial independence

The Monte Carlo (MC) simulation study consists of three main simulations, and in all simulations we assume a SAR(m) for \(m=3,4\). The results of our extensive MC simulation study are provided in the Supplementary Material. While the first two simulations assume serial independence, the third simulation examines the behavior of the test in the case of GARCH(1,1) driven errors. To examine size and power properties of the test S (2.3), we draw \(B=300\) times from the asymptotic limit distribution given in Lemma (2.6). The overall number of MC repetitions is equal to 701.

First setting: The first simulation depicts a SAR(3) model, i.e. 

$$\begin{aligned} \pmb {y}_t=\rho _1 W_1 \pmb {y}_t + \rho _2 W_2 \pmb {y}_t + \rho _3 W_3 \pmb {y}_t + \pmb {\varepsilon }_t,\ \end{aligned}$$
(19)

where \(\pmb {y}_t, \pmb {\varepsilon }_t\in \mathbb {R}^n\) for \(t=1,\ldots ,T\) and \((W_1)_{ij}=\frac{1}{n-1}\) for all \(i\ne j\) and \((W_1)_{ii}=0\). The spatial matrices \(W_2\) and \(W_3\) are defined as

$$\begin{aligned}{} & {} (W_2)_{ij}{\mathop {=}\limits ^{d}}{\left\{ \begin{array}{ll} 1,\text { if } j\text { even and } i\ne j \\ 1,\text { if } j-1=i\\ 0, \text { otherwise} \end{array}\right. } \\{} & {} (W_3)_{ij}{\mathop {=}\limits ^{d}}{\left\{ \begin{array}{ll} 1/(n/2 - 1), \text { if } i,j\le \frac{n}{2} \text { or } i,j>\frac{n}{2}\\ 0, \text { otherwise,} \end{array}\right. } \end{aligned}$$

where additionally the matrix \(W_2\) is row standardized by its row sum \(\sum _j (W_2)_{ij}\) for \(i=1,\ldots ,n\). In terms of interpretation, the matrix \(W_1\) can be regarded as a weighting matrix, where each firm has the same weight. Thus, the matrix \(W_1\) captures a general effect, e.g. global crisis, market performance in the past etc.Footnote 6 Another interpretation in terms of networks might be that there is a fully connected network, i.e. that all stocks are related to each other in the same manner. The spatial matrix \(W_2\) is an example of an asymmetric weighting matrix.This might be interesting from an economic point of view, if there is evidence that a particular (large) country has much influence on another (smaller) country, but that there is less dependence in the other direction.

In economic analyses, \(W_3\) functions as a pivotal dichotomous matrix, segmenting the market into distinct sectors. This dichotomy underscores the contrast between entities who benefit from specific interventions, e.g. tax reforms, aid disbursements, or market shifts, and those who remain unaffected or neutral to these changes. This dichotomous framework is particularly apt for policy evaluation, as it offers a nuanced insight into the differential impacts and subsequent redistributive consequences of policies or market dynamics.

The vector of observation \(\pmb {y}_t\) is generated by a multivariate normal error vector \(\pmb {\varepsilon }_t\) with zero mean and covariance matrix \(\Sigma =\sigma ^2 I_n\), where \(I_n\) represents the n-dimensional identity matrix and the model representation in (19). The parameter of spatial dependence is given by \(\pmb {\rho }=(0.45,0.3,0.15)\) and the homoscedastic variance equals \(\sigma ^2=2\).

To calculate the power of our tests, we do not simulate the errors from a multivariate normal with a diagonal covariance matrix. Instead, we use the following misspecification: If we consider a market with n participants, then there are \(n(n-1)/2\) possible pairs that represent the off-diagonal elements of the covariance matrix. After a simple transformation these off-diagonal elements can be considered as participants that are correlated with each other. The parameter \(\zeta \) describes the portion of pairs,Footnote 7 the parameter \(\kappa ^2\) describes their correlation. E.g. if we consider a market that consists of \(n=20\) actors, then there are \(n(n-1)/2=190\) different pairs. If \(\zeta =0.1\) and \(\kappa =0.2\), we assume that there are 19 pairs that have a correlation coefficient that is equal to 0.04. No further assumptions are made about the structure of correlation. However, the correlation structure is completely random,Footnote 8 i.e. we predetermine only generally the proportion of correlated pairs and their correlation and not the correlation of specific pairs. Results are presented in Table 1 in the Supplementary Material.

Results for S: Collectively, the test holds the size level. In small samples, i.e. whenever the ratio of T over n is small (\(T\le 100\), \(n\le 50\)) and the dependence structure in the error term is more or less negligible (cf. \(\kappa =\zeta =0.05\)) the power of the test is low. However, if there are sufficient observations (i.e. \(\frac{T}{n}>10\)) and if the dependence structure in the data set is not negligible (\(\kappa ,\zeta \ge 0.1\)), the test provides good power properties even in small samples. All in all we observe an increasing power whenever the dependence structure (\(\kappa \) or \(\zeta \)) or the number of observations (n or T) increase.

Results for \(S_{\chi }\): Similar results are obtained for the second test \(S_\chi \) (11) which can be found in Table 2.Footnote 9 In small samples, \(S_\chi \) performs worse than S in terms of size and power. This is due to the fact that we are using the empirical approximation for the inverse covariance matrix that is employed in \(S_\chi \), which is biased in small samples. Consequently, as T tends to infinity the size of the test \(S_\chi \) converges to the desired nominal level of \(5\%\) and the power increases as the level of misspecification rises. However, additional simulations show that the tests’ power decreases in the case of too large \(\zeta \), i.e. a highly non-sparse covariance matrix. Here, the population moment conditions of the GMM estimate (cf. equation (3) given in the Supplementary Material) are severely violated so that the model is misspecified and the behavior of the model estimators \({{\hat{\rho }}}\) is unclear (Fleming 2004).

To summarize, both tests show good size and power properties whenever the ratio T over n is greater than 10. Based on the simple limiting distribution of \(S_\chi ^*\), the test \(S_\chi \) is also very easy to implement since the test statistic \(S_\chi \) requires only the empirical covariance matrix of the residuals.

Second setting: For the second MC simulation we consider a SAR(4) model

$$\begin{aligned} \pmb {y}_t=\rho _1 W_1 \pmb {y}_t + \rho _2 W_2 \pmb {y}_t + \rho _3 W_3 \pmb {y}_t + \rho _4 W_4 \pmb {y}_t + \pmb {\varepsilon }_t,\ t=1,\ldots ,T, \end{aligned}$$

where \(W_1\) is a group interaction matrix of the first two-thirds (the off-diagonal elements of the first two-third upper sub-matrix are set to \(1/(\frac{2}{3}n-1)\) and all other elements to zero), \(W_2\) is a group interaction matrix of the last third (cf. \(W_1\)), \(W_3\) a binary contiguity matrix of the third-order neighbors assuming the observations \(1,\ldots ,n\) are arranged in a circular pattern, e.g., 2 is a third-order neighbor of \(n-1, n, 1\) and 3, 4, 5, andFootnote 10

$$\begin{aligned} (W_4)_{ij}{\mathop {=}\limits ^{d}}{\left\{ \begin{array}{ll} \frac{1}{2\cdot \left\lfloor {n-1}\right\rfloor },\text { if } i \text { is even and } j \text { odd or vice versa}\\ 0, \text { otherwise.} \end{array}\right. } \end{aligned}$$

The vector of autoregressive parameters \(\rho \) is given by \(\pmb {\rho }=(-0.2\ 0.05\ 0.1\ 0.5)\). Moreover, we presuppose heteroscedastic normal error terms, i.e. \(\sigma _i\sim N(0,1)\) for \(i=1,\ldots ,n\). In order to analyze the power in case of misspecification, we choose \(\zeta \) and \(\kappa \) likewise to the first MC simulation. To determine the size and power we draw \(B=300\) times from the asymptotic limit distribution given in Lemma (2.6). The overall number of MC repetitions is equal to 701. The results of the tests can be found in Table 3.

Results for S and \(S_\chi \): Even if the results of the second analysis are not entirely comparable with those from the first simulation,Footnote 11 it is clearly observable that the tests S and \(S_\chi \) hold the size level. The power increases if either the correlation structure (\(\kappa \) or \(\zeta \)) or the number of observation increases (n or T). Thus, the results presented in the second, more complex study are in line with those given in the first simulation.

The next section shows that the test holds size and power demands even if the error terms follow a GARCH process.

3.2 GARCH(1,1)

One of many problems researchers and practitioners face when analyzing financial data is its volatile structure. Volatility of financial data has been extensively studied in the last twenty years. An important aspect of the analysis is volatility clustering, where conditional heteroskedasticity, which leads to an increase in the probability of rare events, can be modeled with GARCH errors. Since the SAR(m) model is a powerful instrument in modeling financial dataFootnote 12, the third Monte Carlo simulation for our proposed test statistic (14) assumes that the errors of the data generating process (DGP) are driven by a GARCH(1,1) model, i.e. for \(t=1,\ldots ,T\) and \(i=1,\ldots n\)

$$\begin{aligned} y_{it}&=\sigma _{it} (I_n-\rho _1W_1-\rho _2W_2-\rho _3W_3)^{-1}\epsilon _{it},\\ {\sigma }_{it}^2&=0.33 +0.33 {\sigma }_{i(t-1)}^2+0.075 y_{i(t-1)}^2,\\ \epsilon _{it}&{\mathop {\sim }\limits ^{i.i.d}} N(0,1). \end{aligned}$$

To receive comparable results, the spatial matrices \(W_1, W_2, W_3\) are the same as those of the first MC simulation of Sect. 3. The size and power results are presented in Table 4. At first, it should be noted that the number of observation of a GARCH adjusted data set needs to be significantly higher than a data set with no GARCH adjustment, i.e. \(T>1000\), since for the case of a GARCH adjustment an initial estimate needs to be conducted and a primarily high error of estimation violates the stationarity assumption. However, with a sufficiently large set of observations, the test S (14) also performs well with reference to size and power.

4 Empirical analysis

In the empirical application, we analyze the spatial dependencies of the daily stock returns of the Euro Stoxx 50 members for the period from April 2003 to December 2009 and from January 2018 to December 2020, using the composition of January 2010 and January 2018.Footnote 13 The stock prices are adjusted and transferred to log returns.

To model the spatial relations, we consider four spatial matrices \(W_G\), \(W_C\), \(W_B\) and \(W_I\), which are designed to capture the dependencies in different ways. The matrix \(W_G\) represents general dependenciesFootnote 14 while the matrices \(W_C\) and \(W_B\) depict local and industry-specific dependencies, respectively.Footnote 15 Finally, the matrix \(W_I\) captures the spatial interaction effect of countries and industries, i.e. we affiliate two stocks that belong to the same country and industry. Note that due to construction, none of the spatial matrices \(W_G\), \(W_C\), \(W_B\) and \(W_I\) are symmetric.

In our analysis, we examine 15 different SAR models, i.e. we consider SAR models, where the number and composition of spatial matrices varies between the models. In the simplest case, only one spatial matrix constitutes our SAR model, e.g., \(\pmb {y}_t=\rho _GW_G+\pmb {\varepsilon }_t\); in the most complex case, all four spatial matrices are included, i.e., \(\pmb {y}_t=\rho _GW_G \pmb {y}_t+\rho _CW_C \pmb {y}_t+\rho _BW_B \pmb {y}_t+\rho _IW_I \pmb {y}_t+\pmb {\varepsilon }_t\). Thus, for \(m\in \{1,2,3,4\}\) the general model for the log stock returns on day \(t=1,\ldots ,T\) is given by

$$\begin{aligned} \pmb {y}_t=\sum \limits _{i=1}^m\rho _iW_i \pmb {y}_t+\pmb {\varepsilon }_t \text { with } W_I\in \{W_G,W_C,W_B,W_I\} \end{aligned}$$
(20)

where \(\pmb {y}_t\) is the vector of log stock returns on day t and \(\rho _i\) the corresponding spatial parameter. In this model, we can interpret the terms \(W_i \pmb {y}_t\) as specific factors, in which external information (about countries and industries) is included. The term \(W_G \pmb {y}_t\) represents the market factor. Our empirical analysis is motivated by two key questions: First, how well can the different SAR models explain the movement of stocks and which spatial matrices do we need for a sufficiently good model? Secondly, can we use the model specification test applied to the 15 different models to ascertain which spatial matrix provides the greatest explanatory power?

To answer these questions, we consider a rolling window of the length of one quarter \((T=63)\), i.e., we check whether our model specification test rejects the null hypothesis that the log returns can be modeled by an SAR(m) model for \(m\in \{1,2,3,4\}\). Furthermore, we use the observation period of the rolling window to calculate one-day Value-at-Risk (VaR) forecasts for each model to see if the in-sample performances of the models (as measured by our new test) correspond to the out-of-sample performances. This means that we check if there is a dependence between high proportions of incorrect VaR forecasts and low p-values of the tests. If this dependence exists, our new specification test might be interpreted as a backtest in the spirit of Ziggel et al. (2014) among others. All analyses are performed on a significance level of \(5\%\). The number of draws from the limit distribution is set to \(B=300\). The results for the time periods from 2003 to 2009 and 2018 to 2020 are depicted in Figs. 1 and 2, respectively.

Figure 1 shows the results of our suggested model specification test applied to the 15 models from (20) in a rolling window for the period from April 2003 to December 2009 of the Euro Stoxx 50. In order to apply the model specification test we initially calculate the spatial parameters of the underlying model using a two step GMM estimation procedure (cf. Sect. 2.2) and then apply our model specification test. The blue line in the subplots of Fig. 1 describes the ratio of the test statistic and its 95%-quantile. Thus, if the value is greater than 1, there is no statistical evidence to reject the null hypothesis. A value smaller than 1, however, provides evidence against the underlying model.

Fig. 1
figure 1

Rolling Window for \(T=63\) from 2003 to 2009. Rolling window parameter estimation of size \(T=63\) in a data set of size 1861 and dimension \(n=50\). 15 different models are considered. The first figure describes the SAR(1) model incorporating only a single general dependence structure (\(W_G\)). The last figure depicts the results of the SAR(4) model incorporating the spatial matrices \(W_G, W_C, W_B, W_I\). The number of draws from the limit distribution is set to \(B=300\). The blue line depicts the ratio of the \(95\%\)-quantile of the limit distribution given in Lemma (2.6) over the test statistic S from (11). A value below 1 indicates that the assumed model is not correct. The orange line is the accumulated spatial dependence parameter in the \(L^1-\)norm. The number in each subplot represents the proportion of VaR forecast violations

Fig. 2
figure 2

Rolling Window for \(T=63\) from 2018 to 2020. Rolling window parameter estimation of size \(T=63\) in a data set of size 653 and dimension \(n=50\). 15 different models are considered. The first figure describes the SAR(1) model incorporating only a single general dependence structure (\(W_G\)). The last figure depicts the results of the SAR(4) model incorporating the spatial matrices \(W_G, W_C, W_B, W_I\). The number of draws from the limit distribution is set to \(B=300\). The blue line depicts the ratio of the \(95\%\)-quantile of the limit distribution given in Lemma (2.6) over the test statistic S from (11). A value below 1 indicates that the assumed model is not correct. The orange line is the accumulated spatial dependence parameter in the \(L^1-\)norm. The number in each subplot represents the proportion of VaR forecast violations

In addition, we generate VaR forecasts with standard normally distributed errors for the minimum-variance portfolio based on the underlying model on a rolling window of size \(T=63\). The proportion of incorrect VaR forecasts is represented by the number in each subplot. In Figure  1, a total of four core observations can be made:

First, it seems that more complex models with at least two spatial matrices describe the data better. On the one hand, the period in which the null hypothesis of a correct model assumption cannot be rejected is longer compared to models incorporating only one spatial matrix and on the other hand, false VaR predictions are close to the significance level \(\alpha =5\%\). Secondly, Fig. 1 illustrates that in periods of economic crisis the spatial model (20) is less applicable, since in all models the ratio (blue line) is on a significantly lower level. Particularly, this can be observed in the period of the financial crisis beginning in summer 2007. This is also consistent that in times of bear markets the correlation among market participants increases significantly. Thus, the resulting extensive dependency structure cannot be well captured by a simple SAR(m) model. Accordingly, the results of our test provide evidence that the effects of the dot-com bubble crisis around 2000 last until summer 2004, since the test rejects the application of model (20). In the two following years (2004–2006), however, subplot 6 of Fig. 1 depicts evidence to apply the model, since the blue line is often greater than 1. In the remaining observation period the test indicates that a spatial model is inappropriate, which overlaps with the period of the financial crisis. Thirdly, however, applying the model specification test to the 15 different models also clearly demonstrates that the spatial matrix \(W_G\), which describes a general influence, provides the strongest explanatory power. Country and industry specific effects seem to have a minor impact (\(W_C\) and \(W_B\)) when considering the ratio and the number of VaR forecast violations (0.1804 for subplot 2 and 0.2372 for subplot 3, respectively). Fourthly, the interaction effect of industry and country affiliation seems to play a minor role in the Euro Stoxx 50 modeling, as both the ratios and the VaR forecast violations of subplots 11 and 15 are similar (0.0546 and 0.0579, respectively). Taking the ratio of VaR forecast violations, the time period in which the null hypothesis cannot be rejected and parsimony in the number of variables as goodness of fit criteria, the SAR(2) incorporating general and industry-specific dependencies, i.e. \(\pmb {y}_t=p_GW_G+p_BW_B+\pmb {\varepsilon }_t\) (cf. subplot 6 of Fig. 1), seems to be the most appropriate.

Figure 2 shows the results of the second application of our proposed model specification test for the period of 2018–2020, where our proceeding is identical to that from the first empirical application: First, we compute the spatial model parameters using a two-step GMM approach. Then, in a second step, we calculate the test statistics of our model specification test. The results of the second application seem to corroborate the findings of the first application: Even if the 15 considered SAR models are rejected by our model specification test in the period 2018–2020, it is striking that models which incorporate at least two spatial matrices model the Euro Stoxx 50 better. This can be seen from the fact that in models with at least two appropriate spatial matrices (\(W_G\) should be incorporated) both the ratio of the test statistic and its quantile is larger and VaR forecast violations correspond approximately to the significance level of \(\alpha =5\%\). Furthermore, the beginning of the COVID-19 pandemic in March 2020 is also clearly visible in every subplot of Fig. 2, as the ratio (blue line) decreases significantly. In summary, in terms of parsimony with regard to the number of variables included in a model, the ratio of the test statistic and the quantile and the proportion of VaR forecast violations the SAR(2) model incorporating general and industry-specific effects (cf. subplot 6 in Fig. 2) seems to be the most suitable modeling the Euro Stoxx 50 in the periods considered.

5 Conclusion

In this paper, we propose two novel specification tests for systems of spatial autoregressive models, which are based on the idea of measuring the magnitude of regression residuals. The proposed tests show good size and power properties in finite samples for both initial data and GARCH adjusted data. An empirical analysis of the Euro Stoxx 50 between 2003 to 2009 and 2018 to 2020 gives evidence that a SAR model which models general and industry-specific dependencies is in general appropriate, in particular in bull markets. However, in bear markets a simple spatial model captures the extensive structure of relations and market dependencies to a lesser extent. Accordingly, our proposed testing procedure provides statistical evidence that the model fit is worse in the time after the dot-com bubble, the time around the Lehman Brothers bankruptcy and the time of the COVID-19 pandemic.

In future research, it might be interesting to extend the idea of the tests to other type of spatial dependence models and to compare the fit to stock data with our specific model. Also, a more detailed analysis about the ability of our tests to assess VaR forecast performances or an extension to \(\Delta \)-hypothesis such as considered in Kutzker et al. (2021) might be interesting.