Acessibilidade / Reportar erro

Forecasting Brazilian output and its turning points in the presence of breaks: a comparison of linear and nonlinear models

Abstracts

This paper compares the forecasting performance of linear and nonlinear models under the presence of structural breaks for the Brazilian real GDP growth. The Markov switching models proposed by Hamilton (1989) and its generalized version by Lam (1990) are applied to quarterly GDP from 1975:1 to 2000:2 allowing for breaks at the Collor Plans. The probabilities of recessions are used to analyze the Brazilian business cycle. The in-sample and out-of-sample forecasting ability of growth rates of GDP of each model is compared with linear specifications and with a non-parametric rule. We find that the nonlinear models display a better forecasting performance than linear models. The specifications with the presence of structural breaks are important in obtaining a representation of the Brazilian business cycle and their inclusion improves considerably the models forecasting performance within and out-of-sample.

forecast; business cycle; nonlinearities; structural breaks; Markov switching


Este artigo compara as habilidades preditivas de modelos lineares e não-lineares, com quebras estruturais, nas previsões da taxa de crescimento do PIB real do Brasil. Os modelos com mudanças de regime markovianas, propostos por Hamilton (1989) e generalizados por Lam (1990), são estimados para dados trimestrais de 1975:1 a 2000:2. Os modelos são estimados permitindo quebras estruturais durante os planos Collor. As probabilidades de recessão dos modelos são utilizadas para analisar o ciclo de negócios brasileiro. A capacidade de previsão da taxa de crescimento do PIB fora e dentro da amostra desses modelos é comparada com modelos lineares e com uma regra não-parametrizada. Os resultados indicam que os modelos não-lineares são os que apresentam o melhor desempenho preditivo quando comparados com modelos lineares. A inclusão de quebras estruturais é importante para a representação do ciclo de negócios no Brasil, além de levar a um desempenho de previsão consideravelmente melhor do que os modelos sem intervenção, dentro e fora de amostra.

previsão; ciclo de negócios; não-lineares; quebra estrutural; mudança markoviana


Forecasting Brazilian output and its turning points in the presence of breaks: a comparison of linear and nonlinear models

Brisne J. V. CéspedesI; Marcelle ChauvetII; Elcyon C. R. LimaIII

IDirectorate of Rio de Janeiro, Institute of Applied Economic Research (IPEA). Email: brisne@ipea.gov.br

IIDepartment of Economics, University of California. Riverside, CA 92521-0247; phone: (951) 827-5037; fax: (951) 827-5685. Email: chauvet@ucr.edu

IIIDirectorate of Rio de Janeiro, Institute of Applied Economic Research (IPEA) and University of the State of Rio de Janeiro (UERJ). Institute of Applied Economic Research (IPEA), Av. Pres. Antônio Carlos, 51, 15° andar, Rio de Janeiro, RJ. CEP 20020-010, Brazil; phone: (21) 804-8143; fax: (21) 2220-9883, http://www.ipea.gov.br. Email: elcyon@ipea.gov.br

JEL Classification: C32, E32

ABSTRACT

This paper compares the forecasting performance of linear and nonlinear models under the presence of structural breaks for the Brazilian real GDP growth. The Markov switching models proposed by Hamilton (1989) and its generalized version by Lam (1990) are applied to quarterly GDP from 1975:1 to 2000:2 allowing for breaks at the Collor Plans. The probabilities of recessions are used to analyze the Brazilian business cycle. The in-sample and out-of-sample forecasting ability of growth rates of GDP of each model is compared with linear specifications and with a non-parametric rule. We find that the nonlinear models display a better forecasting performance than linear models. The specifications with the presence of structural breaks are important in obtaining a representation of the Brazilian business cycle and their inclusion improves considerably the models forecasting performance within and out-of-sample.

Key words: forecast, business cycle, nonlinearities, structural breaks, Markov switching

RESUMO

Este artigo compara as habilidades preditivas de modelos lineares e não-lineares, com quebras estruturais, nas previsões da taxa de crescimento do PIB real do Brasil. Os modelos com mudanças de regime markovianas, propostos por Hamilton (1989) e generalizados por Lam (1990), são estimados para dados trimestrais de 1975:1 a 2000:2. Os modelos são estimados permitindo quebras estruturais durante os planos Collor. As probabilidades de recessão dos modelos são utilizadas para analisar o ciclo de negócios brasileiro. A capacidade de previsão da taxa de crescimento do PIB fora e dentro da amostra desses modelos é comparada com modelos lineares e com uma regra não-parametrizada. Os resultados indicam que os modelos não-lineares são os que apresentam o melhor desempenho preditivo quando comparados com modelos lineares. A inclusão de quebras estruturais é importante para a representação do ciclo de negócios no Brasil, além de levar a um desempenho de previsão consideravelmente melhor do que os modelos sem intervenção, dentro e fora de amostra.

Palavras-chave: previsão, ciclo de negócios, não-lineares, quebra estrutural, mudança markoviana

INTRODUCTION

The increasing global economic integration and intense volatility in emerging market economies in recent years have re-emphasized the importance of forecasting fundamentals in developing countries, and in particular, gauging the potential of future economic recessions. Recently, the currency crisis in Argentina has raised strong interest in the potential economic vulnerability of neighboring countries, especially of its main trading partner, Brazil.

Nevertheless, the task of forecasting emerging market economies has proven to be a special difficult one, given the great instability in these economies. In particular, models that do not take into account changes in the dynamics of these economies in form of structural breaks may perform poorly out-of-sample. This paper examines the performance of several models in forecasting Brazilian output when structural breaks are explicitly taken into account. First, we examine whether nonlinear time series models produce short run and long run forecasts that improve upon linear models. Second, we compare whether there are gains in endogenously modeling structural breaks to produce out-of-sample forecasts. We conduct an examination of various forecast horizons at one through eight-quarter ahead for the rate of growth of real Brazilian GDP. The predictions are based on recursively estimating the models using data revised solely through the date of each forecast.

Linear models have been widely applied in earlier forecasting literature. However, these models have been used to generate forecasts of the growth rate of output rather than forecasts of nonlinear events such as a turning point, that is, the beginning or end of an economic recession. Generally the filters used to extract turning point forecasts from a linear model require the use of ex-post data. This paper uses two classes of Markov switching models, which directly provide current turning point forecasts in addition to predictions of GDP growth.

Recently, a number of studies has examined the forecasting performance of nonlinear and linear models, including Weigand and Gershenfeld (1994), Hess and Iwata (1997), Stock and Watson (1998), and Camacho and Perez-Quiros (2000), among others. These authors detect nonlinearities in several macroeconomic time series with conflicting results with respect to the models' forecasting performance. As Camacho and Perez-Quiros (2000) conclude for the U.S. economy, we find that nonlinear switching specifications that take into account structural breaks in the Brazilian economy yield better forecasts than linear models of GDP growth, especially at longer horizons. In addition, nonlinear models replicate more accurately Brazilian business cycle features.

We compare our results with a non-parametric rule to determine turning points developed by Bry-Boschan (BB 1971). We find that the several estimated Markov switching models with breaks yield closer turning points to each other and to the ones obtained from BB routine than the models without intervention. In fact, models without intervention yield several extra recessions, indicating that the introduction of intervention improves somewhat the models' forecasting performance.

The remainder of this paper is organized as follows. The forecasting models are presented in section 1. The algorithm used to estimate the Markov switching models and their differences are described in the Appendix. Section 2 examines the major structural break in the Brazilian economy due to Collor stabilization Plan implemented in 1990-1992. The results are presented and discussed in section 3, and conclusions are summarized in the last section.

1. THE MODELS AND THE ESTIMATION METHODS

1.1 Hamilton's Markov Switching Model (MS)

Hamilton (1989) models the log of GDP, yt, as divided into a trend, nt, and a gaussian cyclical component, zt:

yt = nt + zt (1) nt = nt-1 + a0(1-St) + a1 St (2) f(L)(1-L)zt = et (3)

where et ~ iid N(0, s2), et is independent on nt+k"k, and St is a latent first-order Markov chain. The drift switches between two states: it takes the value of a0 when the economy is in an expansion (st = 0) and a1 when the economy is in a recession (st = 1). The changes in regimes are ruled by the transition probabilities pij = prob[st = j| st-1 = i] where .

In this model, both nt and zt display unit roots and the roots of f(L) = 0 lie outside the unity circle. Hence, the cyclical component follows a zero mean ARIMA(r, 1, 0) process:

zt - zt-1 = f1(zt-1 - zt-2)+ f2(zt-2 - zt-3) + ... + fr(zt-r - zt-r-1) + et (4)

Taking the first difference of (1) we get:

Dyt = mst + f1(zt-1 - zt-2)+ f2(zt-2 - zt-3) + ... + fr(zt-r - zt-r-1) + et (5)

where D = 1-L. and mst = a0(1-St) + a1St.

1.2 Lam's Markov Switching Model (MSG)

Lam (1990) suggests a modification of Hamilton's model that has important implications for the characterization of output trend and cycle. In particular, Lam decomposes the log of GDP into a trend nt and a cyclical component zt, where only the trend displays a unit root:

yt = nt + zt (6) nt = nt-1 + a0(1-St) + a1St (7)

That is, the autoregressive process zt is now given by:

f(L)zt = et (8)

where et ~ iid N(0, s2). Taking the first difference of (6) we get:

Dyt = mst + zt -zt-1 (9)

where mst = a0(1-St) + a1St . This model allows for both temporary and permanent shocks - the roots of f(L)=0 are outside the unity circle, which implies that zt can be interpreted as the transitory deviations of yt from its long run trend nt. Therefore, this model can capture both short run pulse breaks and long run level breaks in the trend of Brazilian GDP. On the other hand, since in Hamilton's model both the cyclical component and the trend present unit roots, all shocks to output are permanent.

Both models require different nonlinear filters to be estimated. A detailed description of Hamilton and Lam filter can be found in Hamilton (1989) and in Lam (1990), respectively. The filter used to estimate Lam's model involves substantial more computation than Hamilton's algorithm for two reasons. First, in the calculation of the error the states for each observation include all the history of the Markov process, which is treated as an additional variable. Second, the initial value of the autoregressive component is treated as an additional free parameter to be estimated. The Appendix presents a brief description of both filters.

2. STRUCTURAL BREAKS AND INTERVENTION

Markov switching models have been extensively used to represent cyclical changes or structural breaks in the economy. Hamilton (1989) applied this model to the quarterly change in the log of U.S. real GNP from 1952:2 to 1984:4, assuming that the cyclical component follows an AR(4) process. The estimated Markov states obtained were closely associated with the U.S. expansions and recessions as dated by the NBER.

More recently, McConnell and Perez-Quiros (2000) have found evidence of a structural break in the volatility of U.S. GDP growth towards stabilization in the first quarter of 1984. They show that one implication of the break is that the smoothed probabilities miss the 1990 U.S. recession when more recent data are used. There are different ways to handle the problem of structural breaks. McConnell and Perez-Quiros suggest augmenting Hamilton's model by allowing the residual variance to switch between two regimes, and letting the mean growth rate vary depending on the state of the variance.11 This amounts in estimating four mean growth rates: low growth under high and low volatility states, and high growth under high and low volatility states. The resulting estimated smoothed probabilities of the augmented model capture the 1990-1991 recession. Notice that Hamilton's model decomposes the log of GDP into the sum of a trend and a cycle, each of which presents unit roots processes that are not identifiable from each other. Thus, in the presence of a structural break, both terms capture jointly the business cycle component and the volatility break. McConnell and Perez-Quiros' model identifies breaks in the variance from breaks in the mean by allowing each to follow different and dependent Markov processes. Thus, while the Markov chain for the variance captures the break in 1984, the Markov states for the mean capture the business cycle component for the full sample.22 The smoothed probabilities obtained from a model with switching variance and constant mean captures the break in 1984, while a model with switching mean and constant variance captures the business cycle phases up to the breakpoint only (see McConnell and Perez-Quiros, 2000).

Lima and Domingues (2000) model the change in the log of Brazilian GDP as a hidden Markov chain with an AR(4) component. Alternatively, Chauvet (2002a and 2002b) model the change in the log of Brazilian and U.S. GDP, respectively, as a hidden Markov chain with no autoregressive component. This specification captures business cycle features of these economies regardless of the presence of structural breaks in the mean or variance of output. Several authors such as McConnell and Perez-Quiros (2000), Harding and Pagan (2001) or Albert and Chib (1993), among others, have found that the GDP growth in the U.S. and other countries is better modeled as a low autoregressive process. In particular, Albert and Chib use Bayesian methods to estimate Hamilton's model and find that the best specification for changes in GDP is an AR(0) process, as the autoregressive coefficients are not statistically significant. This finding is perhaps due to the presence of structural breaks in the stochastic process of GDP.

The Brazilian economy also displays several structural breaks. In particular, the series of stabilization plans and changes in policy regime in the last two decades resulted in several breaks in the Brazilian GDP, especially in the early 1990s due to the Collor Plan. Figure 1 shows the Brazilian GDP33 The data on real Brazilian GDP were seasonally adjusted using the X-12 method. The series was obtained from IPEA database and is reported in Table 15. around the period of implementation of the Collor Stabilization Plan. As it can be observed, the economy faced a period of large swings for 5 quarters. Upon introduction of the Plan in the second quarter of 1990, GDP decreased at a quarterly average rate of -6.7%. In the third quarter GDP experienced an abrupt increase of 6.8%, only to fall again in the two following quarters by 1.4% and 4.9%, respectively. In the second quarter of 1992 the economy again underwent a large growth rate of 7.1%.


These large pulse-breaks in the Brazilian economy cause estimation problems for standard Markov switching models, and the optimization routines frequently converges to a local maximum.44 The estimation procedure was as follows: first, the MS model was estimated considering an AR(0). Second, the MLE parameters from this model were used to initialize the estimation of the MS-AR(1). Next, the MLE parameters of the MS-AR(1) were used to initialize the MS-AR(2) and so on. The MLE parameters of the MS models were then used to initialize the MSG model. If the number of autoregressive terms is not enough, or if they do not display a unit root, then the models and probabilities capture solely the pulse breaks due to the Collor Plan. For example, when the MS specification with AR(1) or AR(2) components (MS-AR(1) or MS-AR(2)) and the MSG specification with different autoregressive components (from MSG-AR(1) to MSG-AR(5)) are applied to real Brazilian GDP growth, the filtered and smoothed probabilities of recessions (state 1) increase only around observations between 1990:I to 1991:II (Collor I and Collor II Plans), as illustrated in Figures 3 and 4 ( for MS-AR(2) and MSG-AR(3), respectively). That is, without intervention both models capture solely the abrupt pulse breaks experienced by the Brazilian economy during the Collor Plans instead of cyclical economic expansions and contractions.



We estimate, several autoregressive specifications of MS and MSG models without intervention. The models are estimated allowing both mean and variance to switch regimes. However, the specifications allowing only the mean to switch between states do not converge. Overall, the estimates from Lam's model are more stable as the number of lags whereas Hamilton's model present instability with respect to the parameters as the number of lags increase.55 For both models, the likelihood function increases as the probability of recessions converges to a very small value, capturing the break related to the Collor Plans instead of expansions and recessions in the Brazilian output.

Using the likelihood ratio test we find that the best specifications without intervention are an AR(4) process for the MS model (MS-AR(4)) and an AR(2) process for the MSG model (MSG-AR(2)). We have also tested the out-of-sample forecasting performance of several Markov switching models with autoregressive components, comparing them with linear models and with the MS-AR(0) model. The MS-AR(4) gives the best short-run forecasts (1 to 2 steps ahead). The linear AR(3) model does better than the other models for longer forecasts.

Models With Intervention

We introduce interventions in the models for two reasons. First, the Collor Plan has engendered strong real effects in the economy, which influence the specification of the MS and MSG models. In particular, when the models are estimated without intervention there is a tendency for the filtered probabilities to concentrate around this period.66 This is the case for the MS-AR(1) and MS-AR(2) models and all estimated MSG specifications. Second, without explicitly modeling the breaks, the MSG model does not capture the Brazilian business cycle. As it will be shown, interventions yield estimated probabilities that characterize recessions and expansions rather than solely the Collor Plan, and increase the forecasting ability of the MS and MSG models.

We estimate the models under several alternative interventions in the 1990:1-1991:2 period in order to overcome the problem of structural breaks, such as specifications in which the drift parameters are allowed to take different values during Collor I and II stabilization plans. We also estimate the model treating the observations of Collor I and II plans as outliers. We report the results for only the two interventions that were successful in characterizing the Brazilian business cycle.77 The results for the other interventions are available from the authors upon request. The first intervention is modeled as the sum of an additional parameter di during the Collor Plan (Intervention Type 1):

mst = m0(1-St) + m1St + dI for i = 1990:1, , 1991:2 mst = m0(1-St) + m1St otherwise

The second intervention considers the period of the Collor Plans (90.1 to 91.2) as outliers (Intervention Type 2). One advantage of this method is that the intervention capturing the break is not restricted to be present only in the trend component.

3. RESULTS

There is no convergence problem for the models with intervention types 1 and 2 and the regime switching parameters are significant at all levels. Compared with the alternative specifications, these interventions are the ones that yield the most reasonable results. The results for the best models are discussed below.

3.1 Results for Selected Models

Based on the likelihood ratio test, Theil-U statistic, and the filtered probabilities, the models that present the best fit to the Brazilian business cycle are the MS-AR(2) and MSG-AR(2) with interventions of type 1 and 2. Table 1 shows the results for the MS and MSG models with intervention of type 1, while Table 2 reports the results with intervention type 2. Since the results are similar for both interventions, we choose to report the ones for intervention type 2.

The estimated parameters from both models are very similar and the sample identifies two significant states for the Brazilian economy. Table 3 shows a summary of these results. The MS-AR(2) model estimates that the economy grows at a negative average rate of around 1.4% per quarter (-5.6% a year) during recessions (state 1) and an average rate of 1.6% per quarter (6.4% a year) during expansions (state 0). For the MSG-AR(2) model the economy grows at an average negative rate of around 1.5% per quarter (-6% a year) during recessions and at a rate of 1.7% per quarter (6.8% a year) during expansions. In general, recessions in Brazil last a short time, averaging between 2 and 3 quarters for both models, while expansions last twice as long. In particular, the MS model estimates that periods of positive growth last on average between 6 and 7 quarters (p00=0.85), while for the MSG model the duration of expansions is around 4 or 5 quarters (p00=0.77). Therefore, these models predict that the length of the Brazilian business cycle is between 2 and 3 years. This short duration of the Brazilian business cycle is a consequence of the economic instability and turbulence due to the hyperinflationary process in the 1980s and the implementation of several stabilization plans in the last two decades. These results are very similar to those obtained for Brazil in Chauvet (2002a) and Mejia-Reyes (1999). In addition, Mejia-Reyes finds that several other Latin American countries present these same business cycle features.

The filtered and smoothed probabilities for the selected models are plotted in Figures 5 to 8. The shaded areas correspond to periods of recessions in Brazil, which were dated according to the following criteria:






Definition 1: A business cycle peak is said to occur in month t+1 if the economy was in an expansion in month t and:

a) Rule 1: P(St+1 = 1) > 0.5 or

b) Rule 2: P(St+1 = 1) > 0.5 for i = 1 and 2.

Definition 2: A business cycle trough is said to occur in month t+1 if the economy was in a recession in month t and:

a) Rule 1: P(St+1 = 1) < 0.5 or

b) Rule 2: P(St+1 = 1) < 0.5 for i = 1 and 2.

Several results stand out from the probability inferences. First, the filtered and smoothed probabilities are very similar, which points out to the stability of the recursive one-step-ahead estimation (filtered probabilities) compared to the estimation using the whole sample (smoothed probabilities). Second, the probabilities from the MS and the MSG models are also very similar, capturing the same features and phases of the Brazilian business cycles.

Using rule 1 to date business cycles described above, the Brazilian economy experienced ten downturns between 1980 and 2000. However, some of these contractions were very short-lived, lasting only one quarter (e.g.: the low growth phase in 1984 and the expansion in 1998). If we consider recessions as periods of negative growth with a minimum duration of 6 months (rule 2), the downturns in 1982-83, 1983-84 would be considered as one longer recession rather than a double dip. This is also the case for the downturns in 1997-1998. Under rule 2 for dating business cycle phases, the Brazilian economy experienced eight recessions in the last two decades according to model MS-AR(2) and nine recessions according to MSG-AR(2) (Table 6). These results are corroborated by the findings in Mejia-Reyes (1999)88 The results are consistent with the ones obtained by this author up to the last year of its estimation for Brazil (1995). and Chauvet (2002a).

We compare our results with a non-parametric rule developed by Bry and Boschan's (BB 1971). The BB procedure can be applied to a single seasonally adjusted monthly time series. It entails the extraction of points identified as local maxima/minima satisfying the following criteria: a) extreme values are identified and discarded; b) the minimum phase duration is 5 months; c) the minimum cycle duration is 15 months; d) if flat or double turning points are found in the period, the last turning point is selected.

We have followed Monch and Uhlig (2005)'s modification of the original BB routine99 Originally, the BB routine consists of: 1) elimination of extreme values; 2) determination of cycles in 12-month moving average with identification of points higher or lower than 5 months on either side; and selection of highest multiple peaks to warranty alternation of turns; 3) determination of corresponding turns in a Spencer curve with identification of points higher or lower than 5 months of selected turns in the 12-term moving average; forcing minimum cycle duration of 15 months by eliminating lower peaks and higer troughs of shorter cycles; 4) determination of turning point in a short-term moving average depending on months of cyclical dominance; with identification of highest or lowest value within 5 months of the selected turn in the Spencer curve; 5) determination of turning points in the original series: identification of the highest or lowest value within 4 months, or the months of cyclical dominance, whichever is larger, of the selected turn in the short-term moving average; elimination of turning points within six months of beginning and end of series; elimination of troughs/peaks at both ends of series that are lower/ higher than values closer to the end; elimination of cycles whose duration is less than 15 months; elimination of phases whose duration is less than 5 months; 6) The final turning points are then found. with a criterion for amplitude/phase length such that it eliminates business cycle expansions that are short and flat, and some of the restrictive symmetries imposed across recession and expansion phases.1010 Other modifications followed by these authors include determination of cycles with moving average of 9 months instead to avoid cycles too long, and setting the months of cycle dominance to 3 for determining turning points in the non-smoothed series. We use Uhlig’s Matlab toolkit aviable in the site http://www.wiwi.hu-berlin.de/wplo/.

We apply BB algorithm to the monthly GDP series from Table 16.1111 We use a monthly GDP series present in Table 16 for dating with Bry-Bochan procedure. Details on the construction of the data are available from the authors upon request. The recession dates obtained from the smoothed probabilities of the Markov switching models applied to quarterly GDP and from BB routine are reported in Tables 5 and 6.

3.2 Comparison Between the MS and MSG Models

The MSG-AR(3) model nests the models selected as presenting the best fit to the Brazilian business cycle, the MS-AR(2) and the MSG-AR(2). The likelihood ratio used to test the MSG-AR(2) model against the MSG-AR(3) model has a standard asymptotic distribution, c2(1), and can be easily calculated using the likelihood values presented in Table 2. Given the likelihood ratio value of 2.584, we cannot reject that the MSG-AR(2) model fits the data better than the MSG-AR(3) model. If we can reject the MS-AR(2) model compared to the MSG-AR(3) model than by transition we could conclude that the MSG-AR(2) model fits the data better than the MS-AR(2) model. However, the likelihood ratio of this last test does not have a standard distribution and we report below Monte Carlo simulations used to implement the test.

We have generated 1000 trials simulating the MS-AR(2) model under intervention type 2 - each with the same number of observations as our sample size. For each trial both models (MS-AR(2) and MSG-AR(3)) were estimated and the likelihood ratio statistic was computed. Figure 2 below shows the histogram of the likelihood ratio statistic obtained for these 1000 trials. The null hypothesis of the test is the MS-AR(2) estimated under intervention type 2, and the alternative hypothesis is the MSG-AR(3) specification.


In the Monte Carlo simulations the likelihood ratio statistic computed at each trial is less or equal to 11.94 for 95% of the trials, whereas the estimated likelihood ratio computed using the likelihood values of Table 2 is equal to 16.53. The results indicate that the null is rejected at a level of significance smaller than 5%.1212 Note that the MSG-AR(3) model has two more parameters than the MS-AR(2) model. If we were to apply the standard critical value it would have been equal to 5.99 (c2(2)) instead of 11.94. Therefore, we can conclude that the MSG-AR(3) model fits the data better.

We also test the MS-AR(0) model against the MSG-AR(3) model. The likelihood ratio statistic of the test has a standard asymptotic distribution, c2(4), and can be computed using the likelihood values presented in Table 2. The estimated likelihood ratio statistic is equal to 22.082. Therefore, the MS-AR(0) specification is rejected at a level of significance smaller than 1%.

3.3 Average Out-of-Sample Forecasting Performance

This section compares the out-of-sample forecasting performance of several Markov switching models with autoregressive components with linear models and the MS-AR(0) model. Two linear models for changes in GDP were estimated for comparison with the Markov switching models: an AR(3) and an ARMA(1,1) model.1313 The identification of the ARMA model was implemented using AIC and SBC criteria. In addition, given that structural breaks generally lead to serial correlation in the residuals, Durbin-Watson test was used to test whether the residuals of the selected model are white noise. The identification was implemented considering or not dummies for the period between 1990.1 a 1991.2. All models were estimated from 1976:2 up to 1992:1, and then recursively re-estimated for each subsequent quarter from 1992:2 until the last quarter of the sample, 2000:2 to generate the out-of-sample forecasts. Appendix B shows how these forecasts were calculated.

Results

We use as a statistic to compare any two models the mean squared forecast error (MSE) of one of the models divided by the MSE of the other model. We also report standard errors for these relative MSEs.1414 The standard errors were calculated using the Gauss routine made available by Mark W. Watson in his web site http://www.wws.princeton.edu/~mwatson/ The standard errors are heteroskedastic and autocorrelated consistent (HAC) robust and were estimated using a Bartlett kernel with the number of lags, for each step-ahead, equal to the number of computed forecast errors.1515 See West (1996) for an asymptotic justification for the procedure adopted to calculate the standard errors for recursively estimated models.

Table 7 shows the root mean squared forecast error (RMSE) of the linear AR(3) model and the relative MSE (to the AR(3) model) of several Markov switching models, with interventions type 1 and 2, for forecasts from 1 to 8 quarters ahead. The model with the smallest relative MSE, for forecasts from 2 to 7 quarters ahead and for both types of intervention is the MS-AR(2). Almost all the relative MSEs of the MS-AR(2) model are smaller than one with the exception of the 8-quarter-ahead forecast. Nevertheless, they are significantly smaller than one only for intervention type 2 and for forecasts from 4 to 6 quarters ahead. The ARMA(1,1) model beats the AR(3) model for forecasts from 1 to 2 steps-ahead. The "No Change" model, where the forecast of GDP growth is constant end equal to zero, has the worst forecasting ability for all steps-ahead

Table 8 compares the same models with the ARMA(1,1) model. It shows that the relative MSEs of the MS-AR(2) model are smaller than one for forecasts from 3 steps-ahead and on. Nevertheless, they are significantly smaller than one for forecasts 4 and 6 steps-ahead and for intervention type 2. The AR(3) model forecasts significantly better than the ARMA(1,1) only 4 quarters ahead and for both types of intervention.

Table 9 reports the MSE of the models relative to the MSE of the MS-AR(0) model. It shows that the MS-AR(2) model has a relative MSE significantly smaller than one for almost all steps-ahead and for both types of intervention. The same is true for the AR(3) and ARMA(1,1) models for short run forecasts, 1 to 2 quarters ahead.

Linear Versus Nonlinear Models

For one-quarter-ahead forecast, the ARMA (1,1) model presents the lowest relative MSE. On the other hand, the Markov switching models present the best forecasting performance for 2-quarter-ahead and on. In particular, the MS-AR(2) is the best in forecasting 2 to 7 quarter-ahead. Thus, for forecasts of the annual growth of real GDP, the MS-AR(2) model is the one with the most accurate prediction in this out-of-sample forecasting test.

Intervention Versus Non-intervention

Tables 10 and 11 show the relative out-of-sample performance of several Markov switching models, for both types of intervention, compared to their counterparts without intervention. Table 10 shows the results for Hamilton's models (MS-AR(0), MS-AR(2) and MS-AR(4)) and Table 11 for Lam's models (MSG-AR(1), MSG-AR(2) and MSG-AR(3)). Most of the relative MSEs are smaller than one indicating that the interventions have improved the models' forecasting ability. The MSG the MS-AR(2) models exhibit the smallest relative MSE overall. This is not surprising given that the probability of recession from these models without intervention concentrate around the period of the Collor plans. Nevertheless, because the standard errors are relatively high for most models, the relative MSEs are in general not significantly smaller than one. However, the greatest advantage of introducing interventions is that they characterize the Brazilian business cycle without loss of forecasting ability.

These findings corroborate the evidence obtained by several authors in that modeling nonlinearities underlying GDP growth improves its forecasting performance. This is particularly true for the case of Markov switching models that take into account abrupt changes and asymmetries of business cycle phases.

Recent Forecast Performance

As an illustration of the recent performance in forecasting GDP growth, a second out-of-sample test was performed. The models were estimated from 1976:2 up to 2000:2, and then the parameters were used to predict the annual rate of growth of GDP from 2000:3 to 2001:4. Table 14 reports the out-of-sample forecasts of the annual rate of growth of real GDP for 2000:3-2001:4. As it can be observed, the MS-AR(2) and the AR(3) models in this period yield the closest forecast of changes in GDP compared to the alternative models. The best overall model, for intervention type 2, is the MS-AR(2).

3.4 Out-of-Sample Turning Point Forecasting Performance

This section compares the out-of-sample turning point forecasts of several Markov-switching models. The out-of-sample forecast is obtained by recursively re-estimating the model parameters - with the exception of the parameters that enters the numerical optimization routine which were estimated with data from the beginning of the sample until the second semester of 2000 - and computing sequentially the one and two quarter-ahead forecasts of the recession probabilities, from the last quarter of 1994 until the end of the sample. The peaks are then dated following the criteria in definition 1 - rule 2, which take into account a minimum phase duration of two quarters, as described in section 3.1. That is, at each sample point starting in the first quarter of 1995 the model signals the beginning of a recession (a peak) if the probabilities of recession are equal or greater than 50% for both one and two-step ahead forecasts, that is, Et[P(St+1=1)] > 0.5 and Et [P(St+2=1)] > 0.5).

We compare our results with the peak dating obtained by the Bry and Boschan's algorithm (BB) from monthly GDP, as explained in section 3.1. We compare the methods in two ways: 1) when the model probabilities do not signal a peak, using the procedure in step 1, but the BB algorithm does; 2) when the model probabilities detect a peak but the BB algorithm does not. The results are summarized in Tables 12 and 13. Notice that the Markov switching models are being evaluated out-of-sample, whereas the BB routing uses the full sample, relying on ex-post data. However, the results can serve as a base for comparison of forecast performances of different models.

From 1994 until the end of the sample, BB signals a total of 4 recessions. Table 12 compares BB results to those of the Markov switching models. With the exception of the MS-AR(4), without intervention, none of the models captures any recession signalized by BB. On the other hand, the MS-AR(4) model identifies 22 extra peaks that the other models and the BB algorithm don't. Thus, models without intervention tend to differ from BB, and MS models with intervention, in that they signal several extra recessions. However, models with intervention tend to not signal recessions.

Table 4 contains the unconditional probabilities of states 1 and 2. It can be verified there that models without intervention have a considerably higher and unrealistic unconditional probability of recession, generating a large forecast bias towards wrongly signaling peaks. The results presented in Tables 12 do not allow us to come to a definite conclusion when comparing the forecasting ability of the different models. So we decided to construct another measure of forecast accuracy, reported in Table 13, computing deviations of probability of recession forecasts. The deviations are based on the definition of peaks described in definition 1- rule 2 of section 3.1. The new statistic is constructed as follows:

If a peak is not detected by the model probabilities at period t but it is by BB, then the deviation is equal to , where p(t+j) is the j-step-ahead probability of recession forecast at period t. Otherwise, if the peak is detected the deviation is equal to zero.

If a peak is detected in the model probabilities at period t and it is not by BB, then the deviation is equal to , where p(t+j) is the j-step-ahead probability of recession forecast at period t. Otherwise, if the peak is not detected the deviation is equal to zero.

Table 13 shows that models without intervention have larger deviations from BB and from other models due to the detection of extra peaks. However, due to the abnormally large unconditional probability of recession, they have smaller deviations at recessions signalized by the BB algorithm. Adding up all deviations, models with intervention yield better forecasts of the future state of the economy than models without intervention. Thus, the introduction of interventions seems to improve somewhat model's forecasting performance.

The model with the closest result to BB routine is the MSG-AR(2) with intervention. This model is also the one that best fits the data in-sample, as reported in section 3.2.

CONCLUSIONS

This paper fits Hamilton and Lam's models to quarterly Brazilian GDP series for the period from 1975:1 to 2000:2, allowing for breaks at the Collor Plans. We find that the Hamilton's Markov switching model and Lam's model both following an AR(2) process (MS-AR(2) and MSG-AR(2)) present the best fit to the Brazilian business cycle under the two different types of interventions considered.

The sample identifies two significant states for the Brazilian economy, representing recession and expansion phases. For both models, the economy grows at a negative rate of around 1.4-1.5% per quarter during recessions in state 1, and at a rate of 1.6-1.7% per quarter during expansions. In general, recessions in Brazil last a short time, averaging between 2 and 3 quarters for both models. Expansions last twice as long. In particular, the Markov switching models estimate that periods of expansion in Brazil last on average between 4 and 7 quarters.

We compare the out-of-sample performance of several Markov switching models to linear models such as ARMA(1,1) and AR(3) models. The models were recursively re-estimated from 1992:1 until the last quarter of the sample to generate out-of-sample forecasts. Overall, the MS-AR(2) model displays the best forecasting performance especially at longer horizons, with the smallest relative MSE for two to seven quarters ahead. This finding corroborates the evidence obtained by several authors that modeling nonlinearities underlying changes in GDP growth improves forecasting performance. This is particularly true for the case of Markov switching models that take into account asymmetries of business cycle phases.

We also compare the out-of-sample performance of several Markov switching models estimated under two types of intervention with their counterparts without intervention. The results indicate that the interventions improve considerably the models' forecasting ability. Overall, the MSG models and the MS-AR(2) model yield the smallest relative MSE. The greatest advantage of introducing interventions is that they better characterize the Brazilian business cycle without loss of forecasting ability.

We compare our results with the peak dates obtained applying Bry and Boschan's algorithm to monthly GDP. The models with intervention yield closer turning points to each other and to the ones from BB routine than the models without intervention. In fact, the models without intervention tend to signal many extra recessions, and display a significantly higher unconditional probability of recession. Thus, the introduction of interventions improves somewhat the models' forecasting performance.

Finally, as an illustration of the recent performance in forecasting GDP growth, the models were estimated from 1976:2 up to 2000:2, and then used to predict the annual rate of growth of GDP from 2000:3 to 2001:4. Once again, we find that the best overall model was the MS-AR(2) model with intervention type 2.

(Recebido em fevereiro de 2004. Aceito para publicação em setembro de 2005).

APPENDIX A

Hamilton's Filter

Hamilton's nonlinear filter uses as input the ergodic and transition probabilities:

Prob(St-2 = h, St-1 = i | It-1). (10)

From these joint conditional probabilities, the density of Dyt conditional on St-1, St, and It-1 is:

(11)

The joint probability density of states and observations is then calculated by multiplying each element of (10) by the corresponding element of (11):

(12)

The probability density of Dyt given It-1 is:

(13)

The joint probability density of states is calculated by dividing each element of (12) by the corresponding element of (13):

Prob(St-1 = i, St = j | It)= f(Dyt, St-1 = i, St = j | It-1) / f(Dyt | It-1) (14)

Finally, summing over the states in (14), we obtain the filtered probabilities of recessions and expansions:

(15)

The first-order assumption of the Markov chain implies that all relevant information for predicting future states is included in the current state. Thus, Dyt depends only on the current and r most recent values of st, on r lags of Dyt, and on a vector of parameters q:

p(Dyt |st, st-1, , Dyt-1, Dyt-2, ;q) = p(Dyt | st, st-1, , st-r, Dyt-1, Dyt-2, , Dyt-r; q).

Lam's Filter

The first step of the algorithm is initialized with the distribution of the states in this period conditional on information in the previous periods. From this, the distribution of the states is generated, for the following period, using the Markov process. Thus, the first step calculates:

1st Step:

(16)

and

(17)

where

= x is the sum of the past states up to period t.

2nd Step:

The second step, which uses the result from the first step as input, computes the joint distribution of the current observation and of the states:

(18)

and

(19)

3rd Step:

In the third step, the joint distribution obtained above is used to compute the likelihood of the observation conditional to its past:

(20)

4th Step:

In the fourth step, the algorithm uses the result from the second and third steps to calculate the distribution of the states conditional on the current information:

(21)

Through these four steps the algorithm generates the conditional likelihood value to each observation (3rd step) and the distribution of the states (from the 4th step), which is then used to initialize again the algorithm for the following observation. The algorithm is repeated for all observations, and the conditional likelihood function is obtained from the sum of its value for each observation:

(22)

Since the second step requires data from r previous periods, the algorithm is initialized in the observation r+1. For the first step, the probabilities below are required, which are obtained from their non-conditional counterparts.

(23)

The filter used to estimate Lam's model involves substantial more computation than Hamilton's algorithm for two reasons. First, in the calculation of the error, the states for each observation include all the history of the Markov process, which is treated as an additional variable. Second, the initial value of the autoregressive component is treated as an additional free parameter to be estimated. These two components are represented in the third and second terms of equation (24), respectively. When a0 and a1 are independent from t, the computation of the error E is:

(24)

When dummies are introduced in Lam's model, the parameters a0 e a1 depend on t and the error is then calculated as:

(25)

APPENDIX B

One-step-ahead Predictions

As an illustration of the procedure, the predicted one-step ahead mean for the MS AR(2) at the first forecast date T+1 = 1992:2 is given by:

where

are the estimated drifts for each state. The estimated probabilities are obtained from the filtered probabilities and from the transition matrix. For example, the one-step-ahead predicted probability of a recession is given by:

where P(St = i) for i = 0,1 are the ergodic probabilities. At time T+2 = 1992:3, a new observation of Dyt is considered, and the models are re-estimated to obtain the parameters and filtered probability. This procedure is repeated for each subsequent observation up to T = 2000:3 in order to obtain the recursive one-step-ahead forecasts of the filtered probability and the forecasts the Brazilian GDP growth.

Two-step-ahead Predictions

A similar procedure is used to obtain two-step-ahead prediction of the mean and filtered probabilities of a recession at the first forecast date, which are now given by:

Three- steps- ahead and on Predictions

where P is the transition probability matrix with elements pij = pr[st = j| st-1 = i], i denotes the ith column and j the jth row. Each column of P sums to one, so that 12' P = 12', where 12 is a column vector of ones. For h-step ahead there are 2h possible cases for the probabilities, which are computed directly from Hamilton's filter.

  • Albert, J.; Chib, S. Bayesian analysis via Gibbs sampling of autoregressive time series subject to Markov mean and variance shifts. Journal of Business and Economic Statistics, v. 11, p. 1-15, 1993.
  • Chauvet, M. The Brazilian business and growth cycle. Revista Brasileira de Economia, v. 56, n. 1, 2002a.
  • _______. Is the recession over yet?. CREFC Economic Letter, 2002-01, March 20, 2002b.
  • Camacho, M.; Perez-Quiros, G. This is what the US leading indicators lead. European Central Bank, Working Paper 27, 2000.
  • Hamilton, J. D. A new approach to the economic time analysis of nonstationary time-series and the business cycle. Econometrica, v. 57, n. 2, p. 347-384, 1989.
  • Harding, D.; Pagan, A. Knowing the cycle. Journal of Monetary Economics, forthcoming 2001.
  • Hess, G.; Iwata, S. Measuring and comparing business-cycle features. Journal of Business and Economic Statistics, v. 15, p. 432-444, 1997.
  • Lam, P. S. The Hamilton model with a general autoregressive component. Journal of Monetary Economics, v. 26, p. 409-432, 1990.
  • Lima, E. C. R.; Domingues, G. B. Crescimento, recessBoletim Conjuntural, Rio de Janeiro: IPEA, v. 51, p. 49-52, 2000.
  • McConnell, M.; Perez, G. Output fluctuations in the United States: what has changed since the early 1980s?. American Economic Review, v. 90, n. 5, p. 464-76, 2000.
  • Mejia-Reyes, P. Classical business cycles in Latin America: turning points, asymmetries and international synchronization. The University of Manchester, 1999. Mimeografado.
  • Monch, E.; Uhlig, H. Towards a monthly business cycle chronology for the Euro Area. SFB 649 Discussion Paper 2005-023, 2005.
  • Stock, J. H.; Watson, M. W. A comparison of linear and nonlinear univariate models for forecasting macroeconomic time series. NBER Working Paper Series 6607, 1998.
  • Weigand, A. S.; Gershenfeld, N. A. Time series prediction: forecasting the future and understanding the past. Reading, Massachusetts:Addison-Wesley for the Santa Fe Institute, 1994.
  • West, K. D. Asymptotic inference about predictive ability. Econometrica, v. 64, p. 1067-1084, 1996.
  • 1
    This amounts in estimating four mean growth rates: low growth under high and low volatility states, and high growth under high and low volatility states.
  • 2
    The smoothed probabilities obtained from a model with switching variance and constant mean captures the break in 1984, while a model with switching mean and constant variance captures the business cycle phases up to the breakpoint only (see McConnell and Perez-Quiros, 2000).
  • 3
    The data on real Brazilian GDP were seasonally adjusted using the X-12 method. The series was obtained from IPEA database and is reported in
  • 4
    The estimation procedure was as follows: first, the MS model was estimated considering an AR(0). Second, the MLE parameters from this model were used to initialize the estimation of the MS-AR(1). Next, the MLE parameters of the MS-AR(1) were used to initialize the MS-AR(2) and so on. The MLE parameters of the MS models were then used to initialize the MSG model.
  • 5
    For both models, the likelihood function increases as the probability of recessions converges to a very small value, capturing the break related to the Collor Plans instead of expansions and recessions in the Brazilian output.
  • 6
    This is the case for the MS-AR(1) and MS-AR(2) models and all estimated MSG specifications.
  • 7
    The results for the other interventions are available from the authors upon request.
  • 8
    The results are consistent with the ones obtained by this author up to the last year of its estimation for Brazil (1995).
  • 9
    Originally, the BB routine consists of: 1) elimination of extreme values; 2) determination of cycles in 12-month moving average with identification of points higher or lower than 5 months on either side; and selection of highest multiple peaks to warranty alternation of turns; 3) determination of corresponding turns in a Spencer curve with identification of points higher or lower than 5 months of selected turns in the 12-term moving average; forcing minimum cycle duration of 15 months by eliminating lower peaks and higer troughs of shorter cycles; 4) determination of turning point in a short-term moving average depending on months of cyclical dominance; with identification of highest or lowest value within 5 months of the selected turn in the Spencer curve; 5) determination of turning points in the original series: identification of the highest or lowest value within 4 months, or the months of cyclical dominance, whichever is larger, of the selected turn in the short-term moving average; elimination of turning points within six months of beginning and end of series; elimination of troughs/peaks at both ends of series that are lower/ higher than values closer to the end; elimination of cycles whose duration is less than 15 months; elimination of phases whose duration is less than 5 months; 6) The final turning points are then found.
  • 10
    Other modifications followed by these authors include determination of cycles with moving average of 9 months instead to avoid cycles too long, and setting the months of cycle dominance to 3 for determining turning points in the non-smoothed series. We use Uhlig’s Matlab toolkit aviable in the site
  • 11
    We use a monthly GDP series present in
    Table 16 for dating with Bry-Bochan procedure. Details on the construction of the data are available from the authors upon request.
  • 12
    Note that the MSG-AR(3) model has two more parameters than the MS-AR(2) model. If we were to apply the standard critical value it would have been equal to 5.99 (c2(2)) instead of 11.94.
  • 13
    The identification of the ARMA model was implemented using AIC and SBC criteria. In addition, given that structural breaks generally lead to serial correlation in the residuals, Durbin-Watson test was used to test whether the residuals of the selected model are white noise. The identification was implemented considering or not dummies for the period between 1990.1 a 1991.2.
  • 14
    The standard errors were calculated using the Gauss routine made available by Mark W. Watson in his web site
  • 15
    See West (1996) for an asymptotic justification for the procedure adopted to calculate the standard errors for recursively estimated models.
  • Publication Dates

    • Publication in this collection
      31 Aug 2006
    • Date of issue
      Mar 2006

    History

    • Received
      Feb 2004
    • Accepted
      Sept 2005
    Departamento de Economia; Faculdade de Economia, Administração, Contabilidade e Atuária da Universidade de São Paulo (FEA-USP) Av. Prof. Luciano Gualberto, 908 - FEA 01 - Cid. Universitária, CEP: 05508-010 - São Paulo/SP - Brasil, Tel.: (55 11) 3091-5803/5947 - São Paulo - SP - Brazil
    E-mail: estudoseconomicos@usp.br