A Time Series Analysis of Judicial Foreclosures in Spain

: There was an unprecedented wave of foreclosures and evictions in Spain after the 2008 global ﬁnancial crisis. The subsequent Great Recession had strong economic, social and environmental consequences. This paper explores the frequency of permanent shocks in foreclosure quarterly rates (deﬁned as the number of judicial foreclosures per 1000 inhabitants) for 50 Spanish provinces (NUTS 3 regions) during the period from 2001 (Q1) to 2019 (Q4) using time series analysis. We examine whether the foreclosure rate is a stationary series, exhibits a unit root or is stationary around a process subject to structural breaks. A clear ﬁnding from this analysis is that not all shocks have transitory effects on the foreclosure rate. The percentage of unit root rejections is around 40%, thus, providing the evidence of both stationarity around occasional shocks that have permanent effects, and of a unit root, where all shocks have a permanent effect on the foreclosure rate. We also test for unit roots allowing for the presence of one and two structural breaks. Most of the structural breaks are positive, and the majority are grouped from 2008 onwards, coinciding with the ﬁnancial crisis and the subsequent collapse of the Spanish housing bubble. We also ﬁnd a later decrease in foreclosures in some regions that can be related to the effectiveness of the Code of Good Practice for banks and ﬁnancial institutions approved in 2012. Nevertheless, the level of the foreclosure rate time series has not returned to the pre-2008 level in any case.


Introduction
The 2008 global financial crisis and the subsequent Great Recession was a massive shock for many Spanish households. Before the Great Recession, the unemployment rate was around 8% (a low value in the case of the Spanish economy) and economic optimism (along with a strong housing bubble) led many families to buy a new home; between 1996 and 2007, household debt in the form of mortgage loans rose from 66.1% to 167.9% of the GDP (Parreño Castellano et al. 2019). The boom in the construction sector was one of the main drivers of economic growth in that period, although the oversized volume of financial resources absorbed by this sector and mortgage loans reduced the credit to other sectors, casting doubts about the sustainability of that economic growth and its possible consequences on the environment. More productive activities or green industries were displaced by construction in the financial portfolios of the credit institutions, with important effects on future economic growth, environment and sustainability. For instance, Dagar et al. (2022) find that financial development significantly increases the environmental contamination because the finance systems of the OECD countries assign monetary assets to pollutant activities and do not encourage green industries.
However, after the global financial crisis, unemployment reached more than 25% in 2012 and 2013, three times the rate during the economic expansion. Moreover, the crisis meant the sudden end of the housing bubble, with many people then unemployed and caught in underwater mortgages. This situation was common following the crash of the housing market, when many homeowners saw their homes lose a considerable portion of their value.
Although the housing crisis had an international scope, headlined by housing market crashes across wealthy countries and the loss of many homes to foreclosure, the hardest hit was observed in the United States and Spain (Beswick et al. 2016). The number of defaults on the repayment of mortgage loans, and the number of foreclosures and evictions, rose significantly. In Spain, the unprecedented wave of foreclosures and evictions in the country (Parreño Castellano et al. 2019) generated a situation of strong social tension, becoming a central issue in the public debate. To tackle this situation, the government and parliament introduced several new rules, reforming the banking sector and creating new instruments to protect low-income mortgage debtors at risk of eviction. González-Val (2021) used panel data models to analyze the effects of these reforms regarding the protection of mortgage debtors, concluding that the Code of Good Practice for banks and financial institutions approved in 2012 significantly reduced the number of foreclosures, but that this effect was transitory, fading six years after the reform. Moreover, this effect was uneven across regions.
The aim of this paper is to dig into the regional differences in the evolution of judicial foreclosures across the Spanish regions and the response of the regional time series to the different shocks observed in the recent years (from the economic shocks in 2008 to the later policy measures implemented to reduce foreclosures and evictions). We use a time series analysis to provide empirical evidence of the frequency of persistent shocks in judicial foreclosure rates by region, defined as the quarterly number of judicial foreclosures per 1000 inhabitants. This methodology allows us to consider three possible scenarios. First, shocks may have transitory effects on foreclosures. In this case, the foreclosure rate would be mainly steady and, after a shock, temporary movements of the number of judicial foreclosures would be detected, but in the long run the foreclosure rate should return to its equilibrium level. This would indicate that the foreclosure rate is stationary. In the second situation, sporadic shocks may cause permanent changes in the average level of the foreclosure rate itself, while most shocks would cause only short-run effects on the foreclosure rate around the equilibrium level. In this second case, we should expect that the foreclosure rate would be stationary around a process that is subject to structural breaks. That is, after a shock, the series return to a level that can be different because some of the shocks may change the mean of the series and the equilibrium level. The third situation consists of all shocks having permanent effects on the level of judicial foreclosures per 1000 inhabitants. Therefore, the foreclosure rate would be expected to exhibit a unit root, since its fluctuations are not transitory.
In our empirical analysis, we first apply standard unit root methods to the foreclosure rates for 50 Spanish regions, from 2001 to 2019. When using augmented Dickey-Fuller (ADF) tests, the null hypothesis of a unit root in the foreclosure rate can be rejected for one third of the fifty regions. Thus, the unit root scenario seems to better describe the experience of most of the Spanish regions. In particular, for thirty-three of fifty regions, these results suggest that any sudden shock had permanent effects on the level of judicial foreclosures. For the remaining regions, there is a tendency to return to a stable value, and the fluctuations are transitory.
However, the ADF tests suffer from an important drawback, because it has been documented that the usual tests for a unit root may be biased towards the non-rejection of the null hypothesis of a unit root (Perron 1989). Stationary fluctuations with a mean that exhibits a one-time permanent change in level may previously have been wrongly identified as a unit root process (Perron 1990). To check this issue, we use Perron and Vogelsang's (1992) methodology for non-trending data to test for a unit root in foreclosure rate series while allowing for a structural break in the mean level, occurring at an unknown date. The structural break test is useful because it can identify timing and statistical significance of law effects even when the timing of effect is uncertain a priori (Piehl et al. 2003). These tests slightly increase the evidence against a unit root in judicial foreclosures, which, however, is still the case for thirty regions.
We extend the structural break scenario to allow for two breaks, using the Clemente et al. (1998) test, and, although most of the time series exhibit a significant second break, results are consistent with those obtained using the one-break test. Furthermore, as a robustness check, we also explore the existence of multiple structural changes in nontrending, stationary time series using the methodology developed by Bai andPerron (1998, 2003), finding that the double-break scenario is the most common one. Overall, our findings suggest that, for almost half of the regions, foreclosure rates may be characterized as being stationary around occasional shocks that have permanent effects, while in the other half of the regions, every shock had permanent effects. Additionally, there is some clustering of the break dates that we can link to the major events that happened in the period, including economic crises and policy reforms.
Previous research has analyzed foreclosures and the loans market in Spain, considering the role played by credit enforcement (Mora-Sanguinetti et al. 2017), the quality of the Spanish judicial system (Gómez-Pomar et al. 2022) and public policies (González-Val 2021). The complexity of dealing with the different factors influencing the level of foreclosures (economic, financial, legal and social factors) leads us to follow an agnostic view in this paper; our approach is to let the data speak for themselves; if the foreclosure rate time series is stationary, any shock may have transitory effects on the level of foreclosures, while a unit root implies that all shocks have permanent effects, no matter the particular cause of the shock. Furthermore, testing for structural breaks without imposing any a priori timing allows us to conclude whether there have been significant changes in the mean of the time series and the timing of these changes.
The remainder of this paper is organized as follows. Section 2 reviews the literature. Section 3 presents the data used. In Section 4, we describe the methodology and the main results. Section 5 discusses the main results in the light of the different legal reforms that took place during the period considered and Section 6 concludes.

Literature Review
A standard methodology in program evaluation is to use time series, and many studies used this methodology to analyze whether legal changes had permanent or transitory effects on the variables of interest. In this related literature, policy reforms and the introduction of new laws are considered major events that can cause structural breaks in variables related to legal issues. Figure 1 summarizes some of these studies. J. Risk Financial Manag. 2022, 15, x FOR PEER REVIEW 3 of 24 (Piehl et al. 2003). These tests slightly increase the evidence against a unit root in judicial foreclosures, which, however, is still the case for thirty regions. We extend the structural break scenario to allow for two breaks, using the Clemente et al. (1998) test, and, although most of the time series exhibit a significant second break, results are consistent with those obtained using the one-break test. Furthermore, as a robustness check, we also explore the existence of multiple structural changes in non-trending, stationary time series using the methodology developed by Bai andPerron (1998, 2003), finding that the double-break scenario is the most common one. Overall, our findings suggest that, for almost half of the regions, foreclosure rates may be characterized as being stationary around occasional shocks that have permanent effects, while in the other half of the regions, every shock had permanent effects. Additionally, there is some clustering of the break dates that we can link to the major events that happened in the period, including economic crises and policy reforms.
Previous research has analyzed foreclosures and the loans market in Spain, considering the role played by credit enforcement (Mora-Sanguinetti et al. 2017), the quality of the Spanish judicial system (Gómez-Pomar et al. 2022) and public policies (González-Val 2021). The complexity of dealing with the different factors influencing the level of foreclosures (economic, financial, legal and social factors) leads us to follow an agnostic view in this paper; our approach is to let the data speak for themselves; if the foreclosure rate time series is stationary, any shock may have transitory effects on the level of foreclosures, while a unit root implies that all shocks have permanent effects, no matter the particular cause of the shock. Furthermore, testing for structural breaks without imposing any a priori timing allows us to conclude whether there have been significant changes in the mean of the time series and the timing of these changes.
The remainder of this paper is organized as follows. Section 2 reviews the literature. Section 3 presents the data used. In Section 4, we describe the methodology and the main results. Section 5 discusses the main results in the light of the different legal reforms that took place during the period considered and Section 6 concludes.

Literature Review
A standard methodology in program evaluation is to use time series, and many studies used this methodology to analyze whether legal changes had permanent or transitory effects on the variables of interest. In this related literature, policy reforms and the introduction of new laws are considered major events that can cause structural breaks in variables related to legal issues. Figure 1 summarizes some of these studies.  (González-Val andMarcén 2012a, 2012b;Coelho and Garoupa 2006;Piehl et al. 2003;Kuo 2012;Nelson 2000;Papadopoulos et al. 2005).
Several papers analyzed the change in divorce rate after divorce law reforms for different countries using a unit root type strategy. González-Val and Marcén (2012a) explored the frequency of permanent shocks in divorce rates for 16 European countries during the period of 1930-2006, finding that not all shocks have transitory effects on the divorce rate. The authors related the permanent shocks in divorce rates to the divorce law reforms that took place in the 1970s. For the US, the same authors (González-Val and Marcén 2012b) examined the frequency and persistence of shocks in US divorce rates at the state level, concluding that positive permanent changes in divorce rates can be associated with the implementation of unilateral divorce reforms and that the negative permanent changes can be related to the law reforms concerning living arrangements in the aftermath of divorce. Finally, Coelho and Garoupa (2006) studied the Portuguese case, finding that the introduction of a modern divorce law in the 1970s had a significant effect on the divorce rate, but the changes of the 1990s that effectively implemented a generalized no-fault regime had no statistically significant impact.
A similar empirical strategy can be found in studies analyzing the impact of policy programs and law reforms in different areas of law. Piehl et al. (2003) studied the effects of the Boston Gun Project on homicides, concluding that there was a statistically significant break in mean associated with a substantial decrease in youth homicide in the summer of 1996, coinciding with when the Gun Project was implemented. Kuo (2012) evaluated the impact of the under-age drunk driving laws in California, finding statistically significant policy lags and transitions in a way that ignores such features could lead to estimates of policy effects that were substantially smaller. Nelson (2000) examined the impact of the Bankruptcy Reform Act of 1978 in the US, concluding that this law reform had a significant effect on consumer bankruptcies: joint petitions, bankruptcy petitions and per capita rates were estimated to be 36% higher, relative to the levels experienced in 1979. Finally, Papadopoulos et al. (2005) focused on the effect of Central Bank law reforms approved in the 1990s in many Central and Eastern European countries, containing basic provisions for Central Bank independence. Their empirical results led to the conclusion that the process of decontrol of domestic prices (or price liberalization) has a significant positive impact on inflation persistence in transition countries.
These are a few examples of studies dealing with the effects of policy reforms. However, the economic literature using time series analysis to study whether shocks have a permanent effect on the long-run level of macroeconomic and financial aggregates is wide, considering real gross national product (GNP), nominal GNP, real per capita GNP, industrial production, trade, employment, the unemployment rate, the GNP deflator, consumer prices, wages and real wages (Nelson and Plosser 1982;Zivot and Andrews 1992;Ben-David and Papell 1997). We also add to this literature by presenting evidence of the frequency of persistent shocks in the Spanish foreclosure rates.

Data
We consider quarterly data from the 50 Spanish provinces (NUTS 3 regions). The available judicial foreclosure data cover the period 2001 (Q1) to 2019 (Q4) (General Council of the Judiciary, Consejo General del Poder Judicial). Therefore, we have a times series of 76 temporal observations by province. The longitudinal data on judicial foreclosures cover the pre-and post-Great Recession periods, as long as the shock of the economic crisis and the global financial crisis in 2008; the sample period ends before the COVID-19 pandemic. This same data set is used by González-Val (2021), so our exposition here follows both the Spanish legal terms and definitions and González-Val's (2021) data description.
We use data from completed foreclosure procedures in the courts of first instance. The courts of first instance are the basic courts of civil jurisdiction assigned to judicial districts, and they have general jurisdiction in civil and commercial matters, regardless of the amount in dispute (although other courts may have special jurisdiction for some specific issues). 1 Chapter V of the Law of Civil Procedure 1/2000 (articles from 681 to 698) regulates the foreclosure process in Spain for mortgage loans. The execution of the foreclosure process is a civil procedure under Spanish law. The process is based on a debt enforcement of the mortgage deeds by filing a lawsuit. Article 681 regulates the process for demanding payment of a debt secured by a pledge or mortgage. The article states that "enforcing the payment of debts secured by pledge or mortgage may be executed directly over the property". The main requirement for the action is the existence of a public mortgage deed that has been signed at a notary's office and filed at the land registry. The deed must include specific requirements for the lender's rights to be executed over the mortgaged property, namely the price at which the mortgage property is valued (based on an official appraisal), which serves as a base price for the auction, and the debtor's domicile for the purpose of notices and requests.
To account for differences in the sizes of the provinces, our variable of interest is a relative measure of the number of foreclosures; we define the foreclosure rate by province as the quarterly number of judicial foreclosures per 1000 inhabitants. Population data are available at the regional level for two dates per year, in the first and the third quarters. Data for the other two quarters are filled in using linear interpolation. Figure 2 shows the temporal evolution of the foreclosure rate by province. A quick glance at the time series reveals the presence of at least one sudden change in the mean level of the foreclosure rates for all provinces, around the year 2008. Our sample begins in the precrisis period, and until 2008 all provinces show low values of the number of foreclosures. Nevertheless, from 2008 onwards, there is a strong increase in judicial foreclosures in all regions, although significant differences between regions can be observed (Parreño Castellano et al. 2019). As Méndez et al. (2015) point out, the increase in foreclosures showed a spatial pattern: coastal regions (namely Mediterranean regions) exhibit higher than average increases in foreclosures, while northern regions, along with some inland provinces, had lower than average increases in the number of foreclosures. The two most populated regions (Madrid and Barcelona) and their surrounding areas also recorded a higher than average rise in judicial foreclosures. Table 1 shows the descriptive statistics of the variable by region, confirming these regional patterns.
J. Risk Financial Manag. 2022, 15, x FOR PEER REVIEW 5 of 24 regulates the foreclosure process in Spain for mortgage loans. The execution of the foreclosure process is a civil procedure under Spanish law. The process is based on a debt enforcement of the mortgage deeds by filing a lawsuit. Article 681 regulates the process for demanding payment of a debt secured by a pledge or mortgage. The article states that "enforcing the payment of debts secured by pledge or mortgage may be executed directly over the property". The main requirement for the action is the existence of a public mortgage deed that has been signed at a notary's office and filed at the land registry. The deed must include specific requirements for the lender's rights to be executed over the mortgaged property, namely the price at which the mortgage property is valued (based on an official appraisal), which serves as a base price for the auction, and the debtor's domicile for the purpose of notices and requests.
To account for differences in the sizes of the provinces, our variable of interest is a relative measure of the number of foreclosures; we define the foreclosure rate by province as the quarterly number of judicial foreclosures per 1000 inhabitants. Population data are available at the regional level for two dates per year, in the first and the third quarters. Data for the other two quarters are filled in using linear interpolation. Figure 2 shows the temporal evolution of the foreclosure rate by province. A quick glance at the time series reveals the presence of at least one sudden change in the mean level of the foreclosure rates for all provinces, around the year 2008. Our sample begins in the pre-crisis period, and until 2008 all provinces show low values of the number of foreclosures. Nevertheless, from 2008 onwards, there is a strong increase in judicial foreclosures in all regions, although significant differences between regions can be observed (Parreño Castellano et al. 2019). As Méndez et al. (2015) point out, the increase in foreclosures showed a spatial pattern: coastal regions (namely Mediterranean regions) exhibit higher than average increases in foreclosures, while northern regions, along with some inland provinces, had lower than average increases in the number of foreclosures. The two most populated regions (Madrid and Barcelona) and their surrounding areas also recorded a higher than average rise in judicial foreclosures. Table 1 shows the descriptive statistics of the variable by region, confirming these regional patterns.

Methods and Results
The exposition of the unit root methods follows González-Val and Marcén (2012a, 2012b). We first test for unit roots without accounting for structural changes. Consider the following model: where FOR t is the foreclosure rate (i.e., the quarterly number of judicial foreclosures per 1000 inhabitants), α and ρ are parameters and ε t is the error term. When −1 < ρ < 1, the foreclosure rate will be a stationary time series and any shock will dissipate over time: the fluctuations will be transitory. Nevertheless, if ρ = 1, the foreclosure rate will be a non-stationary time series, and the stochastic process modelled by Equation (1) will be a random walk with drift, known as a unit root process (Banerjee et al. 1993;Hamilton 1994;Gujarathi 1995). In this latter case, any sudden shock has permanent effects on the long-run level of the foreclosure rate.
To test for the presence of unit roots (ρ = 1) we apply the augmented Dickey-Fuller (ADF) test Fuller 1979, 1981). The ADF test for non-trending data is carried out by running the following regression: where ∆FOR t = FOR t − FOR t−1 , γ = (ρ − 1), and k is the number of lags added to ensure that the residuals, ε t , are standard white noise. Following Ng and Perron (1995), we choose the optimal k using a 'general-to-specific procedure' based on the t-statistic. The null and alternative hypotheses are, respectively, H 0 : γ = 0, H A : γ < 0. If γ is found to be equal to 0, then the foreclosure rate series follows a random walk. On the other hand, if γ is found to be significantly smaller than 0, the foreclosure rate is stationary around α. Therefore, this test enables us to confirm whether the strong fluctuations observed in the foreclosure rate series in recent years are permanent or transitory, an issue with strong policy implications. Furthermore, this is also an indirect test of the effectiveness of the different legal reforms carried out during this period because a stationary foreclosure rate time series will imply that all the policy reforms have non-permanent effects. Table 2 reports a summary of the results of the individual province unit root tests. In column 2, we find that the null hypothesis of a unit root in the foreclosure rate is not rejected for most of the provinces in the sample. In particular, for twenty-nine of the fifty provinces, or 58%, a unit root is not rejected at the 10% level. Therefore, our results indicate that the unit root scenario seems to better describe the case of most Spanish provinces. Notes: In all cases, the null hypothesis is the existence of a unit root in the foreclosure rate. We choose the optimal number of lagged growth rates to be included in the regression to control for autocorrelation using a 'general-to-specific procedure' based on the t-statistic, see Ng and Perron (1995). The maximum lag length to begin this procedure is set at 11. The panel test statistics are the t * , the W t and the Z t -statistic in case of the Levin-Lin-Chu, Im-Pesaran-Shin, and Pesaran test, respectively.
However, a possible concern with these results is that the standard ADF tests can be biased (Perron 1989); it is possible that what we identified as a unit root process could be better modelled as a stationary process around highly permanent shocks. A visual inspection of Figure 2, which represents the temporal evolution of the foreclosure rate of all provinces, seems to indicate a permanent change in the mean level of the series just after the start of the global financial crisis in 2008 (Q1) and the subsequent Great Recession. This can be an issue, since it is possible that the unit root tests are not able to reject the unit root null hypothesis in the presence of a structural break in our foreclosure rate series. In order to avoid this kind of problem, we apply the unit root test suggested by Perron and Vogelsang (1992) that allows for one structural break.
We estimate additive outlier (AO) models, allowing for a sudden change in the mean (crash model). The AO model is appropriate when the change is assumed to take effect instantaneously, which seems to be the case for the foreclosure rate because the rise of foreclosures was sudden and fast. 2 This model is estimated by way of a two-step procedure. The first step removes the deterministic part of the series by estimating the regression: where DU t = 0 if t ≤ TB (the break date) and is 1 otherwise. The resulting residuals are then tested for the presence of a unit root by estimating: where η t is the estimated residual from Equation (3), TB is the break date and DTB t = 1 if t = TB + 1 and is 0 otherwise. Both equations are estimated by OLS for each break period TB = k + 2, . . . , T − 1, with T being the number of observations and k the truncation lag parameter. The null hypothesis of a unit root is rejected if the t-statistic on ρ is significantly different from zero. In this case, the foreclosure rate will be a stationary time series around a structural break. All but one shock (the break) would cause temporary movements of the foreclosure rate. By contrast, if the t-statistic on ρ is not significant, the foreclosure rate will be a non-stationary time series and any sudden shock will have permanent effects on the long-run level of the foreclosure rate.
The results of applying the AO-model to test for a unit root in foreclosure rates in the Spanish provinces under the null of unit root versus stationary around a possibly shifting mean under the alternative are also summarized in Table 2 (column 3). The results do not substantially vary. Both at the 5% and 10% level, the unit root null hypothesis cannot be rejected in favor of a stationary foreclosure rate with a one-time break for 60% of the provinces, or 30 out of 50 provinces. Table 3 displays the individual results by provinces. The null hypothesis of a unit root is not rejected for the regions with the largest populations: in fact, the unit root is not rejected for the ten most populous provinces (Madrid, Barcelona, Valencia, Sevilla, Alicante, Málaga, Murcia, Cádiz, Illes Balears and Las Palmas). The results show that the structural breaks are all positive and significant, which reflects the rise in the mean of the foreclosure rate among the Spanish provinces in the period considered, as shown in Figure 2. The timing of the breaks is, in all cases, immediately after the start of the global financial crisis (from 2008 (Q1) to 2012 (Q3)). Table 3. Unit root tests on foreclosure rates with one structural break.   Notes: One-break test of Perron and Vogelsang (1992), AO model. Structural break dummy variable coefficient δ: Significant at the *** 1% level; ** 5% level, * 10% level. (ρ − 1): H 0 : Unit root rejected at *** 1% level, ** 5% level, * 10% level.
These results suggest a single scenario for all provinces, with a permanent shock in the foreclosure rate of all the provinces right after the start of the financial crisis and the subsequent economic crisis. Nevertheless, our results provide evidence in favor of both unit root processes and stationary processes subject to a structural break. For stationary provinces (40%), most shocks may cause temporary movements of the foreclosure rate around the equilibrium level, but, eventually, shocks cause permanent changes in the equilibrium rate. For non-stationary provinces (60%), there is no tendency to return to a stable value, since all shocks have permanent effects on the level of foreclosures.
The previous analysis only captures the single most significant break in each foreclosure rate series, a break that we have linked to the financial crisis in 2008. However, our aim is also to analyze whether the legal reforms passed to respond to the rise in foreclosures and evictions had any effect on judicial foreclosures, so next we allow for a double change in the mean. We use the test developed by Clemente et al. (1998), who base their approach on Perron and Vogelsang (1992) but allow for two breaks. Formally, (3) and (4) change to: and where DU jt = 1 if t > TB j (j = 1, 2) and 0 otherwise. DTB jt is set equal to 1 if t = TB j + 1 and 0 otherwise, (j = 1, 2). TB 1 and TB 2 are the time periods when the mean is being modified. As with Clemente et al. (1998), we assume that TB j = λ j T (j = 1, 2), with 0 < λ j < 1, which implies that the test is not defined at the limits of the sample, and also that λ 2 > λ 1 , which eliminates those cases where breaks occur in consecutive periods.
To test for the unit root null hypothesis, Equation (5) is first estimated by OLS to remove the deterministic part of the variable, and then the test is carried out by searching for the minimal pseudo t-ratio for the ρ = 1 hypothesis in Equation (6) for all the combinations of break times. The null-hypothesis of a unit root is rejected if the t-statistic on ρ is significantly different from zero. In this case, the foreclosure rate will be a stationary time series around two structural breaks. Most shocks will cause temporary movements of the foreclosure rate, but two shocks (the breaks) cause permanent effects. However, if the t-statistic on ρ is not significant, the foreclosure rate will be a non-stationary time series and any sudden shock will have permanent effects on the long-run level of the foreclosure rate. Allowing for the possibility of two endogenous break points slightly increases the percentage of rejections of a unit root; column 4 in Table 2 shows that at the 5% and 10% levels the unit root is rejected for 23 provinces (46%), only 3 more provinces than in the one-break scenario (column 3). For 27 of the 50 provinces, the results suggest that any sudden shock has permanent effects. Table 4 reports the individual results by province. The first structural break is significant and positive in all cases; consistently with the results of the one-break test, again the timing coincides with the start of the financial crisis in 2008 (from 2008 (Q1) to 2012 (Q2)). Regarding the second break, it is significant in 80% of the cases (40 provinces out of 50) at the 5% level. Interestingly, the sign of the break changes across provinces; for 18 provinces the second break is positive, which points to a second rise in the mean of the foreclosure rate series, while for the other 22 provinces, we observe a negative second break. It should be noted that (1) only 44% of the provinces show a significant second break that is negative, and (2) the magnitude of the negative break is never enough to reverse the initial rise around the year 2008 (see the estimated values of δ 1 and δ 2 in Table 4). Therefore, this second negative second break meant a partial reverse of the initial rise in the mean of the series. To illustrate this point, Figure 3 plots the case of four representative provinces with a negative second break: the Balearic Islands, Madrid, Valencia and Zaragoza. The evolution of the time series is similar in the four cases; after an initial rise in the mean around the year 2008, there is a later negative break in the mean of the series, but the mean did not come back to the pre-2008 level in any case. Finally, one possible concern with the previous results is that there is no reason for restricting the analysis to one or two breaks. Therefore, using the methodology developed by Bai andPerron (1998, 2003), as a robustness check now we test for multiple structural changes. Following the sequential procedure of Bai and Perron, we first esti-   Finally, one possible concern with the previous results is that there is no reason for restricting the analysis to one or two breaks. Therefore, using the methodology developed by Bai andPerron (1998, 2003), as a robustness check now we test for multiple structural changes. Following the sequential procedure of Bai and Perron, we first estimate the linear regression with only a constant as regressor: where FOR t is the foreclosure rate, TB is the break date and DU t = 1 if t > TB and 0 otherwise. Again, the break dates are explicitly treated as unknown. The method of estimation considered is based on the least-squares principle. The sup-F statistic is obtained by maximizing the difference between the restricted (without DU t ) and unrestricted sums of squared residuals, over all potential break dates. When a break point is identified, the full sample is divided into two sub-samples at the break point, and subsequently the test is carried out on each of the sub-samples. This subdivision process continues until the test fails to reject the null hypothesis of no additional structural changes, or until the sub-samples become too small. To determine the final breaks, we utilize the repartition method described in Bai (1997), estimating breaks one at a time. We also allow for heterogeneity and autocorrelation in the residuals. The method used is Andrews (1991) automatic bandwidth with AR(1) approximation and the quadratic kernel. We impose a trimming of 15%, allowing up to five breaks (Bai andPerron 1998, 2003). Table 5 shows the significant break dates, at the 5% level, from the Bai and Perron tests for multiple structural changes. This table also reports the mean foreclosure rates before the first break and after each subsequent break. Even though we cannot strictly speak of a change in the mean caused by a structural break, since the assumptions of the Bai and Perron methodology are not satisfied for all provinces (the Bai and Perron method requires stationary regressions), we consider these results to be an illustration of the pattern of the foreclosure rates for nonstationary provinces. The results are consistent with the previous findings. A significant positive first break is detected for all provinces with timing from 2008 (Q1) to 2010 (Q4), similar to the timing shown in Table 3 for the one-break test, and the maximum number of breaks found is three, but only for four provinces, thus, supporting the choice of the double-break scenario for most of the cases. Nevertheless, a significant second break is only found for 23 provinces and, among these, 15 breaks are positive, increasing the mean of the series, and only 8 are negative. Thus, these findings suggest that stationary and nonstationary foreclosure rates have a similar pattern, although for the nonstationary foreclosure rate series, all shocks have permanent effects on the level of foreclosures and for those stationary around occasional breaks only these breaks cause permanent changes in the foreclosure rate.
For the sake of completeness, we also test for a unit root in a balanced panel that includes all provinces. Results are shown in Panel B in Table 2. We first use the test created by Levin et al. (2002). The null hypothesis that all series have a unit root, versus the alternative that all series are stationary, is tested using the same autoregressive parameter. We then run a less restrictive test developed by Im et al. (2003). This also allows us to test the null of a unit root in all series, versus the alternative that some of the series are stationary, with a potentially varying autoregressive parameter. Finally, we also use a generalization of the Pesaran CADF test (Pesaran 2007), which allows us to test for unit roots in heterogenous panels with cross-section dependence. Pesaran's CADF eliminates the cross-dependence by augmenting the standard DF (or ADF) regressions with the cross section averages of lagged levels, and with first-differences of the individual series. Like the test done by Im et al. (2003), Pesaran's CADF test is consistent under the alternative that only a fraction of the series is stationary. The conclusion obtained is the same using the three tests, as the null hypothesis of a unit root is rejected at the 1% level for the three test statistics. Thus, these tests provide evidence against a unit root for the panel of provinces, pointing to different patterns across units.  Notes: Columns 3 to 5 include the mean foreclosure rates following the break, with the date of the break reported in italics. Breaks are selected by the repartition method from the sequential procedure at the 5% level in all cases.

Discussion and Policy Implications
Previously, we have focused on testing whether the judicial foreclosure series are stationary; Figure 4 summarizes the main results. Nevertheless, since the previous analysis allowed us to identify the dates when structural breaks happened, we have useful information for exploring whether a structural break in a certain period can be related to a particular event. This analysis is interpretive, since, in order to determine whether policy reforms have had a permanent impact on the foreclosure rate, we simply compare the timing of the reforms with the break dates. Therefore, in this section we discuss potential explanations for the observed permanent changes in the judicial foreclosure time series. the possible explanations for the second break detected using the double structural break test.  Figure 5 shows the distribution of the timing of the second break for those regions having a significant second break (40 provinces out of 50, see Table 4). We distinguish between a positive (18 cases) and a negative (22 provinces) second break, and the timing is completely different. All the positive second break dates but one occur between 2010(Q2) and 2014 (Q2). These dates are not far from the start of the global financial crisis in 2008, so it could be considered a secondary impact of the economic crisis: a second rise in the mean of foreclosures, although smaller than the first break in most cases. Nevertheless, the timing of the second break when it is negative ranges from 2015(Q2) to 2017(Q4). Among all the possible factors that could explain the reduction in foreclosures in these regions, the most likely explanation is the approval of different laws during this period affecting mortgage loans, foreclosures and evictions. Both the breaks detected with the one-break test and the first break of the double structural break test were clearly related with the start of the Great Recession and the global financial crisis; all these breaks were positive and significant, capturing the shock of the economic crisis in the subsequent rise in foreclosures. Therefore, we will focus on the possible explanations for the second break detected using the double structural break test. Figure 5 shows the distribution of the timing of the second break for those regions having a significant second break (40 provinces out of 50, see Table 4). We distinguish between a positive (18 cases) and a negative (22 provinces) second break, and the timing is completely different. All the positive second break dates but one occur between 2010 (Q2) and 2014 (Q2). These dates are not far from the start of the global financial crisis in 2008, so it could be considered a secondary impact of the economic crisis: a second rise in the mean of foreclosures, although smaller than the first break in most cases. Nevertheless, the timing of the second break when it is negative ranges from 2015 (Q2) to 2017 (Q4). Among all the possible factors that could explain the reduction in foreclosures in these regions, the most likely explanation is the approval of different laws during this period affecting mortgage loans, foreclosures and evictions. Table 6 summarizes the laws approved in the sample period, concerning the mortgage market, judicial foreclosures and evictions. Most of them are Royal Decree-Laws, entering into force the next day after the approval. 3 Among them, only the Royal Decree-Laws 1/2015 (transformed into Law 25/2015) and 5/2017 were approved within the timing of the second break dates detected with the statistical tests. However, González-Val (2021) highlighted that, among these new rules to protect low-income mortgage debtors, the most important was the Royal Decree-Law 6/2012 because it introduced an effective mechanism to avoid foreclosures: a new Code of Good Practice for banks and financial institutions. Under this new regime, low-income debtors who meet certain requirements can only be evicted with difficulty and, in case of default, a bank must offer the debtor a restructuring of the debt, or the debtor can even, as a last resort, transfer the property over to the bank as an alternative to having the lender foreclose on it.
The Code was later modified by the Law 1/2013, Law 25/2015 and Royal Decree-Law 5/2017 in some aspects, such as extending the protection to guarantors or changing some of the requirements to define the risk of exclusion of the debtor. Basically, the mortgagors protected by the Royal Decree-Law 6/2012 are borrowers under a loan secured by a mortgage on their primary residence when the resulting mortgage payments exceed 50 percent of the net income received by all the members of the household, although there are many other economic and family requirements.  (Table 4). Only significant breaks are considered. Table 6 summarizes the laws approved in the sample period, concerning the mortgage market, judicial foreclosures and evictions. Most of them are Royal Decree-Laws, entering into force the next day after the approval. Among them, only the Royal Decree-Laws 1/2015 (transformed into Law 25/2015) and 5/2017 were approved within the timing of the second break dates detected with the statistical tests. However, González-Val (2021) highlighted that, among these new rules to protect low-income mortgage debtors, the most important was the Royal Decree-Law 6/2012 because it introduced an effective mechanism to avoid foreclosures: a new Code of Good Practice for banks and  (Table 4). Only significant breaks are considered. The Code establishes a sequential procedure with three steps to restructure the mortgage debt, see González-Val (2021) for details. First, if the borrower's difficulties are considered to be temporary, some of the terms in the loan agreement can be modified, allowing the bank to offer the debtor a five-year grace period for the repayment of capital, an extension of the repayment period to a total of 40 years from when the loan was granted, and/or a reduction in the applicable interest rate during the grace period. It is also allowed an opportunity to combine debts owed to the bank.
Second, if the application of the above measures is considered to be unfeasible, the mortgagor has the option to apply for the implementation of additional measures consisting of a reduction in the debt (the Code allows different ways to calculate the reduction), although in this case the bank is not obliged to accept this application. Finally, if the restructuring plan and additional measures are not feasible, in the third step the mortgagor may request payment in kind of the residence as a means of definitively discharging the debt, where the lender is obliged to accept the handover of the mortgaged property. Moreover, the debtor is allowed to stay in the residence as a tenant for two years, paying an annual rent below market value equal to 3% of the total amount of the debt at the time of the payment in kind, thus avoiding foreclosure; the debtor loses the property but at least settles the mortgage debt.
Accession to this Code is voluntary, but once an institution agreed to adhere to the Code, it is obliged to offer a borrower who is having difficulties with the payment of the borrower's mortgage debt the option to apply for the measures included in the Code. In a very short time almost all Spanish banks adhered to the Code; the first report from the Commission monitoring the Code of Good Practice in June 2012 indicated that, after the first three months of validity of the Code, 101 financial entities agreed to join the Code, including the main Spanish banks. The list of entities adhering to the Code is public and published periodically in the Official State Gazette. The number of such entities has remained quite stable over time, slightly decreasing to 89 in 2019. This decrease is mainly explained by the disappearance of some entities after the crisis through merger or acquisition.
González-Val (2021) found a significant negative effect of the Royal Decree-Law 6/2012 on judicial foreclosures that lasted at least until six years after the approval of the rule, considering a panel data of the Spanish provinces. However, here in our time series analysis, the timing of the Royal Decree-Law 6/2012 is far from the dates of the detected negative second break. Although some studies document an endogenous policy lag due to information acquisition time or adjustment costs (Kuo 2012), but is it possible that the main effect of the Code of Good Practice on the mean of the foreclosure series actually took place around four years after the approval of the Code?
To answer this question, we will use the statistics provided by the Commission monitoring the Code of Good Practice. These reports are based on the information provided by all financial entities to the central Bank of Spain; they are published half-yearly by the Spanish Ministry of Economy. The total number of applications received by financial entities from 2012 to the end of 2019 was 118,358; among these, only 58,542 (49%) were accepted and processed. The most common reasons for rejecting an application were the lack of documentation in the application and that the mortgage debtor did not meet the income threshold. Among the accepted applications, 50,313 (86%) were resolved by modifying the terms of the loan agreement, in fourteen (0%) cases the bank accepted a reduction in the debt. The bank acquired possession of the property securing the mortgage loan in payment of the loan 8215 (14%) times. Figure 6 shows the temporal evolution of the number of accepted applications by semester. The bulk of applications accepted is observed between 2014 and 2016, with a peak in the first half of 2016. Therefore, this could explain the timing of a negative second break, especially because in most cases the negative break was detected in 2016 (with a peak in the fourth quarter, see Figure 5). Therefore, we observe that the periods with more applications accepted, that is, when more mortgage debtors without resources make use of the Code, can be associated with permanent changes in the judicial foreclosure series, at least for almost half of the provinces (the 22 regions with a negative second break). took place around four years after the approval of the Code?
To answer this question, we will use the statistics provided by the Commission monitoring the Code of Good Practice. These reports are based on the information provided by all financial entities to the central Bank of Spain; they are published half-yearly by the Spanish Ministry of Economy. The total number of applications received by financial entities from 2012 to the end of 2019 was 118,358; among these, only 58,542 (49%) were accepted and processed. The most common reasons for rejecting an application were the lack of documentation in the application and that the mortgage debtor did not meet the income threshold. Among the accepted applications, 50,313 (86%) were resolved by modifying the terms of the loan agreement, in fourteen (0%) cases the bank accepted a reduction in the debt. The bank acquired possession of the property securing the mortgage loan in payment of the loan 8,215 (14%) times. Figure 6 shows the temporal evolution of the number of accepted applications by semester. The bulk of applications accepted is observed between 2014 and 2016, with a peak in the first half of 2016. Therefore, this could explain the timing of a negative second break, especially because in most cases the negative break was detected in 2016 (with a peak in the fourth quarter, see Figure 5). Therefore, we observe that the periods with more applications accepted, that is, when more mortgage debtors without resources make use of the Code, can be associated with permanent changes in the judicial foreclosure series, at least for almost half of the provinces (the 22 regions with a negative second break). However, this analysis has two limitations. First, we acknowledge that this explanation is interpretive, based on statistics, and we cannot strictly speak about a causal re- However, this analysis has two limitations. First, we acknowledge that this explanation is interpretive, based on statistics, and we cannot strictly speak about a causal relationship between judicial foreclosures and legal reforms using this methodology. Second, although the Royal Decree-Law 6/2012 establishing the Code was a national rule, we only observe a significant negative second break in 44% of the provinces, which means heterogeneity in the effectiveness of the Code across regions. Unfortunately, the data about the applications are not disaggregated by region, so we cannot check whether there are significant differences between regions in the number of applications received by financial institutions. Figure 7 shows the spatial distribution of the provinces with a negative and significant second structural break (the dark areas), and no clear geographical pattern can be observed, besides that most of them are north-eastern regions.
only observe a significant negative second break in 44% of the provinces, which means heterogeneity in the effectiveness of the Code across regions. Unfortunately, the data about the applications are not disaggregated by region, so we cannot check whether there are significant differences between regions in the number of applications received by financial institutions. Figure 7 shows the spatial distribution of the provinces with a negative and significant second structural break (the dark areas), and no clear geographical pattern can be observed, besides that most of them are north-eastern regions.

Conclusions
This paper studied the frequency of permanent shocks in Spanish judicial foreclosures by province, considering quarterly data from 2001 to 2019. A time series analysis was used. The main advantage of this is that it lets the data "speak for themselves" (Piehl et al. 2003;Kuo 2012;González-Val and Marcén 2012b), allowing us to test whether there have been permanent changes in the quarterly number of foreclosures per 1000 inhabitants and when those permanent changes took place, without imposing any a priori timing.
We observe that there is no single scenario to identify the behaviour of the judicial foreclosure series. For almost half of the provinces, there is evidence of stationarity around a process that may be subject to one or two structural breaks and of a unit root for the other half. In the first case, only a few occasional shocks have permanent effects, and in the second, all shocks have permanent effects on judicial foreclosures. Nevertheless, we should not expect that judicial foreclosures return to the pre-Great Recession level in any case, because even in the stationary cases we find a significant break raising the mean level of judicial foreclosures after 2008.
Our analysis also provides useful information for exploring whether the structural breaks can be related to a particular event. The breaks detected with the one-break test and the first break of the double structural break test were clearly related with the start of the Great Recession and the global financial crisis because all these breaks were positive and significant, thus, capturing a strong increase in foreclosures. Nevertheless, when two breaks are allowed, we find evidence of a significant negative change in the mean of the

Conclusions
This paper studied the frequency of permanent shocks in Spanish judicial foreclosures by province, considering quarterly data from 2001 to 2019. A time series analysis was used. The main advantage of this is that it lets the data "speak for themselves" (Piehl et al. 2003;Kuo 2012;González-Val and Marcén 2012b), allowing us to test whether there have been permanent changes in the quarterly number of foreclosures per 1000 inhabitants and when those permanent changes took place, without imposing any a priori timing.
We observe that there is no single scenario to identify the behaviour of the judicial foreclosure series. For almost half of the provinces, there is evidence of stationarity around a process that may be subject to one or two structural breaks and of a unit root for the other half. In the first case, only a few occasional shocks have permanent effects, and in the second, all shocks have permanent effects on judicial foreclosures. Nevertheless, we should not expect that judicial foreclosures return to the pre-Great Recession level in any case, because even in the stationary cases we find a significant break raising the mean level of judicial foreclosures after 2008.
Our analysis also provides useful information for exploring whether the structural breaks can be related to a particular event. The breaks detected with the one-break test and the first break of the double structural break test were clearly related with the start of the Great Recession and the global financial crisis because all these breaks were positive and significant, thus, capturing a strong increase in foreclosures. Nevertheless, when two breaks are allowed, we find evidence of a significant negative change in the mean of the foreclosures series in 22 out of the 50 regions, most of them located in the northeast of the country. Our explanation for the drop in the mean of foreclosures in these regions is the effectiveness of the Code of Good Practice introduced by the Royal Decree-Law 6/2012 in avoiding foreclosures: most of the negative second breaks coincide with a period of intense activity in the number of applications from mortgage debtors in difficulties received by the financial institutions adhering to the Code.
There are several caveats to consider, in relation to the results in this paper. First, mortgage laws are complex, and many requirements are requested to be considered a mortgage debtor without resources and be able to benefit from the specific regime regulated by the Royal Decree-Law 6/2012. The different mortgage law reforms made numerous changes that both encouraged and discouraged foreclosure filings. These new rules try to reduce foreclosures by increasing the protection of low income mortgage debtors but, at the same time, making foreclosures more difficult for financial institutions could reduce their willingness to loan. Banks could reduce the volume of mortgage loans to the debtors that the law is trying to protect and increase credit to the debtors that are not legally low income, whose homes could be foreclosed in case of default. The results reported here show only the net impact of these changes.
Second, legal changes alter economic incentives in many ways. For example, advertising by mortgage lawyers has increased in recent years, and several associations (the most prominent being the Association of those Affected by Mortgages-Plataforma de Afectados por la Hipoteca) that help mortgage debtors to avoid foreclosures and evictions have become very popular. This may also have affected the level and trend of foreclosures.
Third, the increase in the mean of the foreclosures rate in the period considered, captured by the structural breaks, was significant and permanent, even in those regions with a negative second break. Although we argue that the Code of Good Practice can help to explain the reduction in foreclosures in 2016, our analysis provides new evidence about regional differences in the effects of this legal reform, because the decrease in the mean of foreclosures is observed in less than half of the provinces. This suggests that other economic, financial, legal, and social factors played an important role in the change of the number of foreclosures. Therefore, these results raise new research questions: What regional characteristics can help to explain why the Code diminished foreclosures only in some regions? Additionally, could a club convergence analysis identify differentiated behaviors and group regions with a similar evolution of their number of judicial foreclosures? Both issues deserve further research.

Acknowledgments:
The author benefited from the helpful comments and suggestions from two anonymous referees. An earlier version of this paper was presented at the 7th International conference on Time Series and Forecasting (Gran Canaria 2021), at the 60th Congress of the European Regional Science Association (virtual conference 2021), at the 68th North America Meetings of the Regional Science Association International (virtual conference 2021), at the XLVI Reunión de Estudios Regionales (Madrid 2021) and at the 38th Annual American Real Estate Society Conference (Bonita Springs 2022), and all the comments made by participants are much appreciated. All remaining errors are the author's alone.

Conflicts of Interest:
The author declares no conflict of interest.

1
In Spain, almost all foreclosures are judicial, although the law allows for non-judicial foreclosures. A notary can execute a non-judicial foreclosure under some circumstances; among them, the terms of the loan agreement should include specifically that both sides (lender and borrower) agree to a non-judicial foreclosure, and the appraisal value of the property in case of sale at auction.
2 Results using innovational outlier (IO) models are similar. 3 A Royal Decree-Law is a legal rule having the force of a law approved by the government under very specific circumstances: There must be a situation of extraordinary necessity that requires certain measures that must be implemented urgently (and cannot be carried out by the normal parliamentary process, which may be slow). A Royal Decree-Law is temporary and must be ratified, rejected or converted into law by parliament within 30 days of its publication. For instance, the Royal Decree-Law 1/2015, approved on 27 February 2015 (see Table 6), was converted into Law 25/2015, approved by the Parliament on 28 July 2015.