Estimating Non-stationary Common Factors: Implications for Risk Sharing

In this paper, we analyze and compare the finite sample properties of alternative factor extraction procedures in the context of non-stationary Dynamic Factor Models (DFMs). On top of considering procedures already available in the literature, we extend the hybrid method based on the combination of principal components and Kalman filter and smoothing algorithms to non-stationary models. We show that if the idiosyncratic noises are stationary, procedures based on extracting the factors using the non-stationary original series work better than those based on differenced variables. We apply the methodology to the analysis of cross-border risk sharing by fitting non-stationary DFM to aggregate Gross Domestic Product and consumption of a set of 21 industrialized countries from the Organization for Economic Co-operation and Development (OECD). The goal is to check if international risk sharing is a short- or long-run issue.


Introduction
Dynamic Factor Models (DFMs) were first introduced in economics by Geweke (1977) and Sargent and Sims (1977) with the aim of extracting the underlying common factors in a system of time series. In macroeconomics, these common factors are useful for building indicators and to predict key variables of the economy, among many other applications. Recently, econometricians have to deal with data sets consisting of hundreds of series, making the use of large-dimensional DFMs very attractive in practice; see Breitung and Eickmeier (2006), Bai and Ng (2008), Stock and Watson (2011), Breitung and Choi (2013) and Bai and Wang (2016) for reviews of the existing literature.
It is well known that macroeconomic time series are frequently non-stationary and cointegrated. The connection between cointegration and common factors is analyzed by Stock and Watson (1988), Johansen (1991), Vahid and Engle (1993), Escribano and Peña (1994), Gonzalo and Granger (1995), Bai (2004), Bai and Ng (2004), Moon and Perron (2004), Banerjee et al. (2014Banerjee et al. ( , 2017, Barigozzi et al. (2016 and , among others. In the context of univariate time series, it is common to deal with non-stationarity by differencing. However, when dealing with multivariate systems, differencing should be considered with care; see Box and Tiao (1977). It is well known that, when differencing a cointegrated system, the long-run information, crucial to understand comovements between the variables, is lost; see Seong et al. (2013) who point out that differencing is an inefficient transformation to stationarity in the presence of cointegration. Canova (1998) qualifies the detrending issue as "delicate and controversial" and compares the properties of the cyclical components of a system of seven real macroeconomic series obtained using seven univariate and three multivariate techniques. He concludes that the properties of the extracted business cycles vary widely across detrending methods. Sims (2012) claims that "when cointegration may be present, simply getting rid of the non-stationarity by differencing individual series so that they are all stationary throws away vast amounts of information and may distort inference." As a consequence of this controversy, the number of works dealing with nonstationary and possibly cointegrated DFMs is increasing. In the context of nonstationary systems, Bai (2004) proposes factor extraction implementing principal components (PC) to data in levels and derives the rates of convergence and limiting distributions of the estimated common trends, loading weights and the common component when the idiosyncratic components are stationary; see Engel et al. (2015) for an application to exchange rates. However, Barigozzi et al. (2016 point out that stationarity of the idiosyncratic components would produce cointegration relations for the observed system that are not observed in the large sets of time series that are standard in the DFMs literature as, for example, those of Stock and Watson (2012) and Forni et al. (2009). One possible explanation could be that the idiosyncratic component in those datasets is likely to be non-stationary, and consequently, an estimation strategy robust to the assumption that some of the idiosyncratic components are non-stationary could be preferred.
Alternatively, PC can be implemented to first-differenced data with the estimated factors obtained either by integration of their estimated first differences as proposed by Bai and Ng (2004) or by projecting the original system onto the space spanned by the estimated loadings as proposed by Barigozzi et al. (2016). 1 Bai and Ng (2004) prove the consistency of PC factor estimates when they are obtained from first-differenced data using the "differencing and recumulating" method; see Greenway et al. (2018) who obtain recumulated factors in the context of exchange rates.
Finally, Bai and Ng (2004) carry out a Monte Carlo analysis to evaluate and compare the finite sample properties of implementing PC procedures to data in levels or to their first differences and show that the non-stationary common factors can be properly recovered by both approaches when the idiosyncratic components are stationary. However, when the idiosyncratic components are non-stationary, PC cannot be directly implemented to the original data and it is convenient to use the "differencing and recumulating" method. 2 PC-based approaches have a major limitation in that they are not exploiting in any way the dynamic nature of the factors, nor the serial and cross-sectional dependence. Consequently, they are not efficient. Instead of implementing PC procedures, factor extraction can be carried out using two-step Kalman Smoothing (2SKS) techniques based on combining PC factor extraction and a Kalman Smoother. The main advantage of the 2SKS comes from the flexibility of the Kalman filter to explicitly model the factor dynamics. In the stationary case, Doz et al. (2011Doz et al. ( , 2012 show that 2SKS outperforms PC in terms of the precision of the factor estimates and derive its asymptotic properties; see also Poncela and Ruiz (2016). 2SKS has been implemented to non-stationary systems by Seong et al. (2013) in a low-dimensional setting and in Quah and Sargent (1993) in a large but finite cross-sectional dimension case with orthogonal idiosyncratic components.
The contributions of this paper are twofold. First, we extend the analysis of Ng (2004, 2010) comparing the factors extracted using PC implemented to the original non-stationary system with those obtained by "differencing and recumulating." We consider a wide range of structures of the idiosyncratic noises, including heteroscedasticity and temporal and/or cross-sectional dependences. We also consider systems with two factors with the factors being either both non-stationary or one stationary and another non-stationary. With respect to the idiosyncratic components, we consider cases in which all of them are either stationary or non-stationary and cases in which some of them are stationary and others are not. Finally, we compare PC and 2SKS factor extraction procedures. 3 We analyze the performance of the 2SKS procedure when extracting factors using the first-differenced data and estimating the 1 In this paper, we focus on DFMs without deterministic trends. In this case, both approaches are equivalent.
2 Other authors dealing with non-stationary DFMs are Eickmeier (2009), who analyze the comovements and heterogeneity in the euro area by fitting a non-stationary DFM similar to Bai and Ng (2004), augmented with a structural factor setup from Forni and Reichlin (1998). Also, Bai and Ng (2004) extend the results of Ng (2004), andForni et al. (2014) who evaluate the role of news shocks in generating the business cycle. Finally, Choi (2017) extends the Generalized PC estimator (GPCE) to the case of unit roots in the common factors, deriving the asymptotic distribution of the common factors and factor loadings. He shows that the GPCE is more efficient than the traditional PC estimator. 3 In this paper, we focus on non-stationary DFMs based on time domain. For non-stationary DFMs based on frequency domain, see Eichler et al. (2011). original factors by recumulating. Furthermore, we propose a new 2SKS procedure which can be implemented to the original non-stationary system. 4 The second contribution of this paper is an empirical application in which we extract common factors from a non-stationary system of aggregate output and consumption variables of a set of 21 industrialized countries of the Organization for Economic Co-operation and Development (OECD). International risk sharing focuses on crossborder mechanisms to smooth consumption when a country is hit by an output shock. The goal is to check if Gross Domestic Product (GDP) fluctuations are directly passed to consumption or can be at least partially cross-border smoothed, allowing to check the resilience of domestic consumption when the national economies are hit by GDP shocks. The use of possible non-stationary DFMs allows to distinguish between longrun and short-run issues in consumption smoothing through international risk sharing. As it has been recognized since Lucas (1987), smoothing purely transitory fluctuations in consumption will result in very small welfare benefits. However, Artis and Hoffmann (2012) point out that if shocks are persistent, the benefits from better consumption insurance may be huge. Since this issue has been hardly addressed in the literature, it is still an open question which the degree of risk sharing at lower frequencies is. As far as we know, this is the first time that non-stationary DFMs are used in this context. 5 In fact, any method able to address this issue will be useful for policy making: not only the benefits from insuring permanent shocks are higher, but also the channels to do so are different; see, Artis and Hoffmann (2008).
The rest of this paper is structured as follows. Section 2 describes the DFM and the factor extraction procedures considered. Section 3 presents the results of Monte Carlo experiments. Section 4 contains the empirical application to measure risk sharing. Finally, Sect. 5 concludes.

Factor Extraction Algorithms
In this section, we introduce notation and describe the DFM considered in this paper. Furthermore, the PC and 2SKS factor extraction procedures are described both when implemented to original and first-differenced data.

Dynamic Factor Model
We consider the following static DFM where the unobserved common factors, F t , and the idiosyncratic noises, ε t ,follow potentially non-stationary VAR(1) processes: 4 In independent work,  also propose a generalization of Doz et al. (2011Doz et al. ( , 2012 to the non-stationary case. They show empirically that the 2SKS extraction is more efficient than integrating the PC estimator of the first differences of the factors. However, they do not consider the comparison with recumulating the 2SKS estimates. 5 From the point of view of financial flows, Byrne and Fiess (2016) use PANIC for capital inflows in emerging markets. These inflows are part of the capital markets for risk sharing according to the traditional channel decomposition of Asdrubali et al. (1996). However, they do not check the effects on consumption smoothing. (1) where Y t = (y 1t , . . . , y N t ) and ε t = (ε 1t , . . . , ε N t ) are N × 1 vectors of the variables observed at time t and idiosyncratic noises, respectively. The common factors, F t = (F 1t , . . . , F rt ) , and the factor disturbances, η t = (η 1t , . . . , η rt ) , are r × 1 vectors, with r (r < N ) being the number of common factors which is assumed to be known. The N × 1 vector of idiosyncratic disturbances, a t , is distributed independently from the factor disturbances, η t , for all leads and lags. Furthermore, η t and a t are assumed to be Gaussian white noises with positive definite covariance matrices η = diag(σ 2 η 1 , . . . , σ 2 η r ) and a , respectively. P = ( p 1 , . . . , p N ) is the N × r matrix of factor loadings, where, p i = ( p i1 , . . . , p ir ) is an r × 1 vector. Finally, = diag(φ 1 , . . . , φ r ) and = diag(γ 1 , . . . , γ N ) are r × r and N × N matrices containing the autoregressive parameters of the factors and idiosyncratic components, respectively, which can be equal to one; see, for example, Stock and Watson (1989) and  for static DFMs for non-stationary data.
Note that, according to economic theory, there is full agreement that some factors (related with, for example, technology shocks) may have permanent effects while others (such as monetary policy shocks) have only transitory ones. Furthermore, there are also arguments to assume non-stationary idiosyncratic components. Barigozzi et al. (2016 point out that stationarity of the idiosyncratic components would produce an amount of cointegration relations for the observed system that it is not consistent with that found in the systems that are standard in the DFMs literature as, for example, those of Stock and Watson (2002) and Forni et al. (2009). The idiosyncratic component in those datasets is likely to be non-stationary. The implausibility of a stationary idiosyncratic component is also confirmed empirically by Barigozzi et al. (2016) in a large macroeconomic system of quarterly series describing the US economy with about half of the estimated idiosyncratic components found to be non-stationary according to the test proposed by Bai and Ng (2004).
The DFM in Eqs.
(1)-(3) is not identified. To solve the identification problem and uniquely define the factors, a normalization is necessary. In the context of PC factor extraction, it is common to impose the restriction P P/N = I r and F F being diagonal, where F = (F 1 , . . . , F T ) is the r × T matrix of common factors; see, for example, Bai and Wang (2014) and Barigozzi et al. (2016). Bai and Ng (2013) consider alternative identification restrictions in the context of PC factor extraction.

PC Factor Extraction
The most popular factor extraction procedures in large datasets are based on PC. The distinctive feature of PC is that it allows a consistent factor extraction in large datasets without assuming any particular error distribution and specifications of the factors and idiosyncratic noises further than the correlation of the latter being weak and the variability of the common factors being not too small. 6 Furthermore, PC is computationally simple which explains its wide implementation among practitioners when dealing with very large systems of economic variables.
PC factor extraction separates the common component, P F t , from the idiosyncratic component, ε t , through cross-sectional averages of Y t in such a way that when N and T tend to infinity, the effect of the idiosyncratic component converges to zero remaining only the effects associated with the common factors. PC estimators of P and F t are obtained as the solution to the following least squares problem subject to the identification restrictions P P/N = I r and F F being diagonal, where The corresponding PC estimator of F using data in levels is given bŷ Alternatively, when the common factors are I (0), Bai and Ng (2002) consider the restriction F F /T = I r with P P being diagonal, such that the estimator of the matrix of common factors,F PC L , is by rows √ T times the eigenvectors corresponding to the r largest eigenvalues of the T × T matrix Y Y , with estimated factor loadings, P PC L = YF PC L /T . When the common factors are I (1), Bai (2004) proposes to use the restriction F F /T 2 = I r with P P being diagonal. In this case,F PC L is by rows T times the eigenvectors corresponding to the r largest eigenvalues of the T × T matrix Y Y andP PC L = YF PC L /T 2 . These latter restrictions are less costly when N > T , while the former are less costly when N < T .
In the context of stationary systems, if the common factors are pervasive and the serial and cross-sectional correlations of the idiosyncratic components are weak, Bai (2003) proves the consistency ofF PC L ,P PC L and the common component, deriving their asymptotic distributions when N and T tend simultaneously to infinity, allowing for heteroscedasticity in both the temporal and cross-sectional dimensions; see, also, Bai and Ng (2002) and Stock and Watson (2002). Bai (2004) extends these asymptotic results to PC factor extraction in the DFM in Eqs. (1)-(3) when F t is I (1) and ε t is I (0). When the idiosyncratic components are I (1), Bai and Ng (2008) show that PC factor extraction implemented to data in levels yields inconsistent estimates of the common factors.
Alternatively, instead of extracting the factors implementing PC to the original data, Bai and Ng (2004) propose differencing the data in a univariate fashion and extract the factors from the following differenced model where f t = F t , u t = η t , e t = ε t and v t = a t with = (1 − L) and L being the lag operator such that LY t = Y t−1 . The weights are estimated as √ N times the first r normalized eigenvectors of the N × N sample covariance matrix of Y t and denoted byP PC D . The corresponding estimated factors are given bŷ Once the factors are extracted from the first-differenced variables, the estimated factors can be obtained either by integration of their estimated first differences as proposed by Bai and Ng (2004) or by projecting the original system onto the space spanned by the estimated loadings as proposed by Barigozzi et al. (2016). The "differencing and recumulating" estimated factor is given bŷ Note that assuming Y 0 = 0, the estimated differenced factor at time t = 1 is given byf 1 = N −1P PC D Y 1 , and consequently, the estimated recumulated factor coincides with the projected factor which is given bŷ Bai and Ng (2004) and Barigozzi et al. (2016) show thatF PC D t andF B L L t , respectively, are consistent estimators for a rotation of F t up to a level shift regardless of whether the idiosyncratic component, ε t , is I (0) or I (1). Note that the factor estimators proposed by Bai and Ng (2004) and Barigozzi et al. (2016) are asymptotically equivalent with some finite sample differences when there are deterministic trends in the DFMs. Note that the elements inf t are orthogonal, but those inF PC D t are not. This fact makes difficult the interpretation of this latest estimator.
For the properties of the PC-extracted factor when implemented to the original nonstationary system, it is crucial knowing whether the idiosyncratic errors are stationary or not. Bai and Ng (2004) propose the PANIC procedure to determine the order of integration of both the common factors and idiosyncratic components. Its objective is to determine the number of non-stationary common factors, r 1 , and to test if the idiosyncratic noises are non-stationary. If there is only one factor, PANIC tests are carried out through simple unit root test. If there are multiple factors, Bai and Ng (2004) consider two tests to determine the number of independent stochastic trends underlying the r common factors. The first test filters the factors under the assumption that they have a finite VAR representation. The second corrects for serial correlation of arbitrary form. On the other hand, when testing the non-stationarity of the idiosyncratic noises, univariate unit root tests have lower power, and consequently, the following pooled test is proposed where s i is the p-value corresponding to the Dickey-Fuller test of the ith idiosyncratic residuals. Pooled tests could not be used in the original data because of strong crosscorrelation due to the common factors, but they can be used in the specific components since this strong cross-correlation has been removed after extracting the common factors. Bai and Ng (2010) analyze the finite sample properties of the pooled test.

Two-Step Kalman Smoother
The 2SKS procedure was proposed by Doz et al. (2011) for stationary DFMs. Therefore, 2SKS can be implemented to Y t . The 2SKS factor extraction procedure is based on combining PC and Kalman Smoother techniques. First, the common factors and factor loadings are estimated using PC obtainingP PC D andf t and the corresponding idiosyncratic and factor residuals, whereˆ is the ordinary least squares (OLS) estimator of the regression off t on f t−1 . These residuals are used to estimate the covariance matricesˆ After writing the DFM in Eqs. (6)-(8) in state-space form, with the system matrices substituted byP PC D ,ˆ ,ˆ ,ˆ η andˆ f , the Kalman smoother is run to obtain an updated estimation of the factors denoted bŷ f K S t . Finally, estimates of the common factors,F K SD t , are obtained by recumulating analogously to Eq. (10). Doz et al. (2011) prove the consistency off K S t when N and T are large considering assumptions slightly different to those in Bai and Ng (2002), Stock and Watson (2002) and Bai (2003) but with a similar role. The 2SKS works well in finite samples obtaining more accurate factor estimates of f t = F t even in the presence of correlation and heteroscedasticity in the idiosyncratic noises; see Doz et al. (2011). 7 Considering the possibility of non-stationary common factors, we propose to extend the 2SKS algorithm as follows 8 1. Obtain PC estimates of P and F t with data in levels given by expression (5).
Compute the idiosyncratic residualsε = Y −P PC LF PC L and the covariance matrix of the idiosyncratic residualsˆ = diag ˆ ε .
(a) If the null hypothesis of a unit root is rejected, obtain the OLS estimate of the autoregressive coefficient,φ j , the residualsû jt =F PC L jt −φ iF PC L jt−1 and the sample variance of the factor disturbance,σ 2 η j = T t=1 u 2 jt /T . The initial state of the factor is assumed to have zero mean and variance estimated bŷ If the null hypothesis is not rejected, thenφ j = 1 and the residuals are computed asû jt = F PC L jt . Calculate the variance of the factor residuals, . Assume a diffuse prior for the initial factor with mean zero and varianceσ 2 F j = κ, where κ is a large constant that empirically performs well (for instance, κ = 10 7 ); see Harvey and Phillips (1979), Burridge and Wallis (1985) and Harvey (1989). 9 F r ) and use them together withP PC L andˆ in the KS to obtain the estimated common factorsF K SL .

Finite Sample Performance
In this section, we carry out Monte Carlo experiments in order to study the performance of the factor extraction procedures described in the previous section.
The experiments are based on R = 500 replicas generated by the DFM in Eqs.
For each DGP considered, the common factors are estimated using the procedures described in Sect. 2 obtainingF PC D t andF K SD t , based on "differencing and recumulating," andF PC L t ,F G PC E t andF K SL t , based on data in levels. 11 Following Bai (2004), the performance of the factor extraction procedures is evaluated by computing the sample correlation between the true factor, F t , and a rotation of the estimated factors,δ j F ( j) t , estimated by the following regression Several conclusions are obtained from Fig. 1. First, all procedures based on differencing and recumulating are similar among them. The same can be said about the procedures based on extracting factors directly from the data in levels. Second, regardless of N and T , the correlations of the "differencing and recumulating" PC procedure can be rather low when the temporal dependence of the idiosyncratic component is negative. Furthermore, using the "differencing and recumulating" estimator implemented with the 2SKS procedure, named KSP in the graph, generates even smaller correlations, mainly when γ = − 0.8. Note that, when the serial dependence of the idiosyncratic components is such that γ < 0.5, the variance of the differenced idiosyncratic component, σ 2 e , is larger than the corresponding variance of the original component, σ 2 ε ; see, for example, Corona et al. (2017). Consequently, the performance of the procedures using data in first differences deteriorates in this case. However, if γ ≥ 0.5, then σ 2 e < σ 2 ε and, consequently, the procedures based on "differencing and recumulating" may have advantages. Third, if the idiosyncratic noises are white noise, the 2SKS procedures implemented to raw data generate correlations which are always close to 1. Note that the two-step procedure proposed in this paper does a remarkably good job. Only when the cross-sectional and temporal dimensions are very large, the procedures based on first differences estimate factors with correlations close to one. Fourth, if the dependence of the idiosyncratic noises is positive, differencing or extracting the factors using the original non-stationary system yields similar correlations. Only when N and T are relatively small, differencing performs worse. Finally, when the idiosyncratic errors are non-stationary, i.e., γ = 1, extracting the factors using differenced or original data yields similar moderate correlations. Only when N is very large, we observe the result established by the asymptotic theory with the procedures based on "differencing and recumulating" having correlations close to one while the non-consistent procedures based on original non-stationary data having smaller correlations. The Box-plots in Fig. 1 help to understand the role of the dynamic dependence of the idiosyncratic noises on the performance of the alternative factor extraction procedures considered. In order to evaluate the effect of the variance of the disturbance of the idiosyncratic noises, Fig. 2 shows the Box-plots of the correlations of the common factor estimates and the simulated ones for model M1 with γ = − 0.8 and the same dimensions considered above and σ 2 a = 0.1, 1 and 10. Note that if σ 2 a is small, then all procedures have correlations close to 1 regardless of the cross-sectional and temporal dimensions and whether they are based on first differences or original data. The deterioration of the procedures based on "differencing and recumulating" is already observed for σ 2 a = 1 with the exception of very large N and T . Finally, in Fig. 3, we study the role of the variance of the idiosyncratic noises when γ = 1. In this case, it is clearly better to take first differences to the original series. The performance of the procedures based on extracting factors from the original data is only reasonable when σ 2 a = 0.1. To evaluate the precision of the factor estimates and summarizing the results, we carry out a response surface analysis by regressing the sample correlation averages on the cross-sectional and temporal dimensions, N and T , and the temporal dependence and variance of the idiosyncratic noises, γ and σ 2 a , for model M1 with homoscedastic, heteroscedastic and cross-correlated idiosyncratic noises. In the case of heteroscedastic idiosyncratic errors, the value of σ 2 a considered as regressor is the expected value of the variances for each idiosyncratic noise. The regression parameter estimates together with the corresponding standard errors and adjusted R 2 are reported in Table 1. First, we can observe that the average correlation of the procedures based on "differencing and recumulating" is clearly smaller than that of the procedures implemented to original data. As above, we also observe that the correlations are similar among methods based on first differences and among methods based on original systems. Second, it is also clear that the correlations between the true factors and the rotated estimates obtained using procedures based on differenced data increase with γ, the temporal dependence of the idiosyncratic noise. This result could be expected given that, as explained above, when γ < 0.5, the variance of the differenced idiosyncratic component, σ 2 e , is larger than the corresponding original variance, σ 2 ε ,, and consequently, the recovery of the common factors is less precise. Furthermore, note that the increase in the correlations between true and rotated extracted factors is larger for KSL than for the PCL procedure, as expected given the flexibility of the Kalman filter to explicitly model the idiosyncratic dynamics. However, the correlations decrease with γ when the factor extraction procedures are implemented to original data. Third, increasing σ 2 a negatively affects factor extraction for all procedures. However, for the same reasons explained above, the effect of σ 2 a is less important if the factors are extracted using original non-stationary observations than when they are extracted using firstdifferenced data. Finally, Table 1 shows that the results are almost the same regardless of the particular specifications of the idiosyncratic components. It is remarkable that, for the particular specifications of the heteroscedasticity considered in this paper, the correlations between the true and rotated estimated factors obtained when the PCL and GPCE procedures are implemented are very similar. We consider the N = 50 and T = 100 with σ 2 a = 10 and γ = − 0.8. First row plots M2 model, second row M3 model and third row M4 model. First column indicates the homoscedasticity, second column heteroscedasticity and third column cross-sectionally correlated idiosyncratic errors Finally, we consider the three models with two factors. Figure 4 plots the Boxplots of the correlations across the Monte Carlo experiments between the true and rotated estimated common factors through the Monte Carlo experiments for models M2, M3 and M4 (by rows) with σ 2 a = 10 and γ = − 0.8. In each case, we consider homoscedastic, heteroscedastic and cross-correlated idiosyncratic errors (by columns). The cross-sectional and temporal dimensions are N = 50 and T = 100. First of all, as far as the two factors are non-stationary, models M2 and M3, we can observe the same patterns as those described for the case of one single factor. However, when one factor is a random walk and the second factor is stationary, model M4, none of the procedures estimate this factor adequately. The results are drastically deteriorated when extracting the stationary common factor. 12 Finally, Fig. 5 plots the Box-plots of the correlations across Monte Carlo replicates when the idiosyncratic F. Corona et al. with {F t }. We consider the N = 50 and T = 100 with σ 2 a = 1 and γ = 1. First row plots M2 model, second row M3 model and third row M4 model. First column indicates the homoscedasticity, second column heteroscedasticity and third column cross-sectionally correlated idiosyncratic errors noise is I (1) and σ 2 a = 1. As expected, we can observe that the common factors are better extracted when we use first-differenced data.
In the context of determination of the number of factors, Corona et al. (2017) conclude that if ε t is stationary, with autoregressive parameters smaller than 0.5 while F t is non-stationary, then overdifferencing the idiosyncratic components may introduce distortions on the determination of the number of factors given that the relation between the variances of the common and idiosyncratic components is modified with the variances of F t decreasing and the variances of e t increasing in relation to the variance of F t and ε t , respectively. Recall as well that some procedures do not yield consistent estimates when the idiosyncratic noises are I (1).

Empirical Analysis
International or cross-border risk sharing focuses on the smoothing of consumption when a country is hit by an output shock. In an ideal world of perfect risk sharing, consumption should be insured. However, in practice, risk sharing is far from being full or complete and a percentage of GDP shocks are passed into consumption and not smoothed.
In a time series context, risk sharing has been traditionally addressed in the literature as a short-run issue and, consequently, analyzed within the context of stationary models. Nevertheless, more recently, some authors question this view and bring in the long-run perspective to the problem, although the results are not conclusive. For instance, Becker and Hoffmann (2006) and Pierucci and Ventura (2010) analyze risk sharing within a cointegration context. Hoffmann (2008, 2012) argue that risk sharing has increased at lower frequencies and relate their results to the permanent income hypothesis. On the contrary, Leibrecht and Scharler (2008), using cointegration techniques and vector error correction models, found that while consumption risk sharing in the short run was around 30%, it only accounts for a 10% in the long run. Fuleky et al. (2015) deviate from the usual homogeneous economies assumption. They provide country-specific measures of risk sharing both in the short and the long run and conclude that countries performing poorly in the short run, relative to other countries, also tend to have poor performance over the long run. As regards factor models, Del Negro (2002) implement a stationary DFM to disentangle movements in US state output and consumption due to national, regional or state-specific factors. Very recently, for capital flows, Byrne and Fiess (2016) apply non-stationary factor models to analyze the common and idiosyncratic elements in emerging markets' capital inflows.
The variables in risk sharing are usually computed in deviations from the aggregate (see, among many others, the seminal paper by Asdrubali et al. 1996) even in the non-stationary framework (see, for instance, Becker and Hoffmann 2006;Artis and Hoffmann 2008, or Pierucci and Ventura 2010. The aim is to create the series of pure idiosyncratic or domestic shocks. Other than that, a common factor would pick up that consumption is generally 2/3 or more of GDP. These variables are usually known in the literature of risk sharing as idiosyncratic GDP and consumption, or GDP and consumption shocks. In order to avoid confusions with the idiosyncratic errors in the DFM literature, we will use the terms GDP and consumption shocks, respectively.
The economic interpretation of the common factor analysis in our model should be as follows. If there is full risk sharing, consumption and output shocks cannot share a common factor since these two variables should be orthogonal in an ideal case of complete risk sharing where, under certain assumptions, domestic consumption should be a constant fraction of the aggregate world output. Hence, lack of complete full risk sharing should be detected through commonalities between output and consumption shocks. If we can find non-stationary common factors among them, we could conclude that there is no risk sharing in the long run.
Our sample covers the following 21 industrialized OECD countries: Australia , which provides harmonized statistics on all of the variables required to perform the analysis. Real GDP and consumption corrected from power purchasing parity are converted into per capita variables. We build aggregate GDP and C for the set of countries included in the analysis following the weighting procedure described in Beyer et al. (2001), where the aggregation is performed directly on growth rates (first difference of logs) but using time-varying weights of countries that are given by their relative share in real GDP, in levels. The aggregate GDP and consumption growth rates are integrated to get the log of the aggregate variables. To define the idiosyncratic variables or gaps in log levels, we subtract the log of the aggregate from the log level of a specific country. The resulting gap could be interpret as the log of the percentage of a particular country GDP (consumption) over the aggregate variable (see Giannone and Reichlin 2006, for the same interpretation).
Unit root tests are performed for the GDP and consumption gaps for all countries and, overall, we can consider that the series are I (1). In order to determine the number of common factors, we implement the procedure proposed by Onatski (2010) and choose r = 5 regardless whether it is implemented to data in levels or first differences; see Corona et al. (2017) for a comparison on alternative procedures to determine the number of common factors in non-stationary DFMs.
Since we do not know if the idiosyncratic errors are stationary or not, we differentiate the data and extract 5 common factors using PCD. These 5 common factors explain 60% of the total variability in the model with data in first differences. Then, we recumulate the extracted common factors and the specific components. We use PANIC to check if the idiosyncratic errors are non-stationary. We performed individual tests for each idiosyncratic error and the pooled test proposed by Bai and Ng (2004) where the pooled statistic of the log of the p-values (s i ) of the individual tests follows a standard normal distribution.
Both the individual tests over the idiosyncratic components as well as the pooled test (the S statistic was 0.19) indicate the idiosyncratic components are non-stationary. In this case, we have to choose any of the methods to extract the common factors that work with the data in first differences, since if the errors are non-stationary, the procedures that work with the data in levels do not yield to consistent estimates. This was reflected in our simulations by the low correlations between the generated common factors and the estimated ones.
The rationale for finding that the idiosyncratic errors are non-stationary should be as follows. A large part of the commonality has been removed when generating the data as the variables that enter into the model are already in deviations from the aggregate. This aggregate might proxy world comovements. Nevertheless, there are still strong correlations in the data that we remove through the common factors. If what it is left is non-stationary, as it might seem the case, it means that there are persistent movements that are generated internally and not shared among countries or due to interactions with third countries, as it might happen with the USA and Mexico. Another way of looking at this result is as follows: if after removing r 1 non-stationary common factors, what is left is stationary, it means that we should find 2N − r 1 cointegrating relations among the data. This is not the case, and therefore, we conclude that in our model after removing r common factors (r 1 being non-stationary), what is left is non-stationary as well.
We proceed using PCD to recover the common factors and the factor loadings. As mentioned before, we applied the "differencing and recumulating" method suggested by Bai and Ng (2004), although any method that works with the data in first differences could be used as well. We test how many of the common factors are non-stationary. The extracted sample factors in first differences are orthogonal as this condition is imposed for identification purposes; however, the recumulated common factors do not need to be orthogonal. Therefore, we test how many of the common factors are nonstationary using the variant of the test for common trends of Stock and Watson (1988) proposed by Bai and Ng (2004). Basically, the test consists of deciding how many of the eigenvalues of the first-order autoregressive matrix after correcting for serial correlation in the residuals are close enough to 1. The estimated eigenvalues are 0.66, 0.83, 0.90, 0.91 and 1.02. We cannot reject the null hypothesis of 5 common trends, even though the fifth eigenvalue is only 0.66. Since T is not so large, we can conclude that there are 5 common factors in the data and, at least, 4 of them are non-stationary factors.
The next step is to decide if the factor loadings are different from zero and if we find loadings different from zero associated with GDP and consumption for the same country. Since the factor loading matrix is the same for the model in first differences than for the model in levels, and in the model in levels the idiosyncratic errors are I(1), we perform inference about the factor loadings using the factor model in first differences (the asymptotic distribution of the loadings is given in Bai 2003).
We analyze the factor loadings of the first common factor (see Fig. 6) related to GDP. The factor loadings could be considered different from zero for all countries but Australia, Canada, Denmark, UK and Switzerland. It gives positive weights to the Anglo-Saxon countries (USA, CAN, GBR, NZL and AUS) although it can be only considered different from zero for USA and New Zealand while the weights have the opposite sign for the rest of European countries (other than the UK) and Japan. Within the last set, the highest, in absolute value, are given to Greece, Portugal and Spain followed by Japan. We can interpret it as a wealth factor.
Curious enough, Greece, Portugal and Spain (jointly with Ireland and Italy that also have significant factor loadings of the same sign) constitute the so called PIIGS group, peripheral European countries where risk sharing has collapsed during the last recession and subsequent sovereign debt crisis. Kalemki-Ozcan et al. (2014) point out that the governments of these countries did not save during the expansionary phases of the business cycle and were not able to borrow on the international markets during the crisis due to the high levels of outstanding public debt. Ireland is also included in this set although its case is slightly different, with government deficits related to banking failures; see Kalemki-Ozcan et al. (2014). This might be the reason why Ireland is included in this group instead of within the Anglo-Saxon countries. Japan has experienced a long-lasting recession and sluggish output growth since the early 1990s. We plot the corresponding 95% confidence intervals forP (middle and bottom panels). The estimations are obtained using PCD The factor loadings associated with consumption shocks seem to follow very closely those of output shocks, indicating lack of risk sharing. This interpretation should be in accordance with Becker and Hoffmann (2006) and Pierucci and Ventura (2010).
The second common factor gives the highest positive weight to New Zealand. On the negative side appears Japan. The next 2 common factors are devoted to separate Greece from other countries. Basically, the third common factor separates Greece from Portugal and the fourth one to separates Greece from Ireland and Norway. The fifth common factor loads on several countries and has a difficult interpretation.
There are 21 × 5 = 105 loadings associated with each country for GDP and the same quantity associated with consumption. We find that when a loading is significant for GDP for one country, it is usually significant and of the same sign for consumption for the same country, indicating lack of risk sharing. Only in 27 out of the 105 possible cases, factor loadings were significant for one of the variables (GDP or consumption) and not for the other (which could be an indication of risk sharing). The fact that most of the common factors are non-stationary indicates that it is harder to find risk sharing in the long run than in the short run.

Conclusions
In this paper, we contribute to the literature on non-stationary DFMs in two different directions. First, we examine the finite sample performance of alternative factor extraction procedures when estimating non-stationary common factors in the context of large DFMs. We consider the case where the common factors are cointegrated with the observed series (and, therefore, the idiosyncratic errors are stationary) and the case where they are not (and, then, the idiosyncratic errors are non-stationary). Second, we fit a non-stationary DFM to analyze the existence of risk sharing among OECD industrialized economies.
With respect to the finite sample performance of factor extraction procedures, we first extend the results in Bai (2004), Bai and Ng (2010) on the behavior of PC when implemented to original non-stationary observations or to their fist differences by considering a larger range of situations about the properties of the underlying factors and/or about the idiosyncratic noises. As expected, we show that, when the idiosyncratic errors are non-stationary, PC based on estimating the common factors using non-stationary time series in levels do not perform well and that the procedures based on first differences should be used; see Bai and Ng (2008).
Furthermore, we extend the hybrid method by Doz et al. (2011) based on combining PC and Kalman smoothing, applying the technique to original non-stationary observations. We show that the finite sample properties of the hybrid method are very similar to those of the corresponding PC procedure both when they are applied to non-stationary levels and to their first differences. When the idiosyncratic errors are stationary, the methods based on levels have a clear advantage while if the errors are non-stationary, the approaches based on estimating the common factors using the levels do not perform well and the procedures based on first differences should be used.
Finally, the empirical application shows that for a non-stationary system of 21 OECD industrialized economies, at least four common factors are non-stationary, such that consumption and GDP share common trends. Furthermore, we apply PANIC to the estimated idiosyncratic errors, concluding that this component is non-stationary. Hence, these facts suggest the lack of full risk sharing in the short but specially in the long run.
From a policy point of view, there is a need of measures to increase the resilience of the different economies to output shocks. Of course, these measures can be different depending on whether we focus on long-run or short-run consumption smoothing.
The nature of shocks is usually linked in most economic theories with different types of shocks: permanent shocks are usually related to the supply side while transitory or business cycle shocks are usually linked to the demand side. Policy measures, if automatic stabilizers do not work out, should be of different nature: structural in case of permanent shocks and discretionary in the case of transitory shocks. If, however, we should rely on automatic stabilizers, those should also work through different channels depending on the nature of shocks. Becker and Hoffmann (2006) and Artis and Hoffmann (2008) point out that insurance against permanent shocks requires exante diversification which is generally only possible through state-contingent assets such as equities, whereas transitory variation in income can also be smoothed ex-post through borrowing and lending, for instance, through loans.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.