business cycles analysis and related software applications

32
EUROPEAN COMMISSION Business cycles analysis and related software applications 2003 EDITION

Upload: others

Post on 12-Dec-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

E U R O P E A NC O M M I S S I O N

Business cyclesanalysis and relatedsoftware applications

20

03

ED

ITIO

N

Page 2: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

A great deal of additional information on the European Union is available on the Internet.It can be accessed through the Europa server (http://europa.eu.int).

Luxembourg: Office for Official Publications of the European Communities, 2003

ISBN 92-894-5341-9ISSN 1725-4825

© European Communities, 2003

Europe Direct is a service to help you find answers to your questions about the European Union

New freephone number:

00 800 6 7 8 9 10 11

Page 3: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

TABLE OF CONTENTS

1. Introduction.......................................................................................................... 4

2. Alternative assessments of the economic fluctuations......................................... 5

2.1. The classical approach................................................................................. 5

2.2. The growth cycle view................................................................................. 7

2.3. Other views of business cycle...................................................................... 8

2.4. Some conclusions ........................................................................................ 8

3. Statistical methods and tools availability............................................................. 9

3.1. Tools availability ......................................................................................... 9

4. Filtering techniques for trend extraction.............................................................. 10

4.1. The Hodrick and Prescott filter.................................................................... 11

4.1.1. Description........................................................................................ 11

4.1.2. Tools ................................................................................................. 12

4.2. The Baxter and king filter............................................................................ 12

4.2.1. Description ....................................................................................... 13

4.2.2. Tools ................................................................................................. 13

4.3. The Beveridge and Nelson decomposition .................................................. 14

4.3.1. Description ....................................................................................... 14

4.3.2. Tools ................................................................................................. 15

4.4. The Unobserved components decomposition of Harvey............................. 16

4.4.1. Description ....................................................................................... 16

4.4.2. Tools ................................................................................................. 17

5. Turning points detection ...................................................................................... 19

5.1. Detecting turning points using a computer algorithm ................................. 19

5.1.1. Tools ................................................................................................. 20

5.2. Detecting turning points with Markov switching models............................ 21

5.2.1. Tools ................................................................................................. 22

6. Applications ......................................................................................................... 24

7. Software review for business cycles analysis ...................................................... 27

8. Conclusions.......................................................................................................... 28

Page 4: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

Business cycles analysis and related software

applications

Gian Luigi MAZZI∗ and Marco SCOCCO∗∗

∗Eurostat, Unit A6Statistical Indicators for Euro-zone Business Cycle Analysis

Jean Monnet Building, L-2920 Luxembourge-mail: [email protected]

∗∗2SDA 17, rue des Bains L-1219 Luxembourge-mail: [email protected]

Website: http://europa.eu.int/comm/euroindicators

Abstract : Despite the importance of business cycle analy-sis, currently there is no specific software containing all thetechniques that could be used for the purposes of diagnosisof the cyclical behavior of the economy. In this paper wepresent the most widely used techniques for business cycleanalysis along with a software review linking together theo-retical and computational problems. We focus on two mainviews of the business cycle, the classical and the growth cy-cle views. Moreover we present the main applications basedon aggregated data for the Eurozone. A final table providesuseful web links where programs to replicate our results canbe downloaded.

Keywords : Business cycles; Turning points; Markov Switch-ing; Software applications.

1

Page 5: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

Business cycles analysis and related softwareapplications

Gian Luigi MAZZI∗ and Marco SCOCCO∗∗

∗Eurostat, Unit A6Statistical Indicators for Euro-zone Business Cycle Analysis

Jean Monnet Building, L-2920 Luxembourge-mail: [email protected]

∗∗2SDA 17, rue des Bains L-1219 Luxembourge-mail: [email protected]

Website: http://europa.eu.int/comm/euroindicators

2

Page 6: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

1 Introduction

In modern macroeconomics the analysis of growth and fluctuations repre-sent two of the main topics. The behavior of the economy is described byan interaction between growth and cycles. A correct understanding of thosephenomena is essential for a correct analysis of economic momentum and foranticipating future movements. It is also quite clear that the attention ofanalysts is more oriented to long-term growth in the so-called ”developmenteconomics” whereas the need for reducing economic fluctuations is the firstobjective for the mature market economies.In the same way, long term policy measures (structural policies) have eco-nomic growth as a principal objective. By contrast, short-term policies (sta-bilization policies) have the reduction of economic fluctuations as a principalobjective.Stabilization policies were firstly defined by Tinbergen[20]. More recentlyMundell[21], Sargent[22], Lucas[23] and others aim to minimize the varianceof some relevant macroeconomic variables around their trend which is of-ten viewed as the steady-state position of the economy. In order to buildcorrect and efficient stabilization policies it is necessary to have a good un-derstanding of the cyclical situation of the economy as well as of its futureperspectives. This is why business cycle analysis is now considered as anessential instrument not only for identifying the state of the economy but,and much more, to supply policy makers with the relevant information onwhich they can build their measures to ensure economic stability.From the end of the second world war a large variety of techniques and toolsfor analyzing business cycle behavior of the economy have been proposed.Various approaches are often based on quite different assumption and the-ories so that their results and interpretations can sometimes be complex.Moreover, for the practice of business cycle analysis is not really easy to linkdifferent methodology proposed in a variety of scientific papers and com-puter tools which can permit their daily use.The aim of this paper is to present the most widely used techniques forbusiness cycle analysis associated with a detailed software review linking to-gether theoretical, empirical and computational problems and aspects. Wefocus on two main approaches to describe business fluctuations: the classicalone developed by NBER for the US economy and the growth cycle approachderived from the concept of permanent and transitory components in eco-nomic variables. Clearly, our survey does not intend to be exhaustive butonly to supply a useful didactic instrument for people who are interested inbusiness cycle analysis.The paper is organized as follows: section 2 presents the different views ofthe business cycles, section 3 introduces the problem of statistical meth-ods and tools availability, section 4 presents growth cycles and the differentways for trend estimation and detrending, section 5 presents parametric and

4

Page 7: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

non-parametric approaches to turning points detection; in section 6 some ap-plications to Eurozone IPI1 are presented, in section 7 we summarize thesoftware available for business cycle analysis and in section 8 we presentsome conclusions and recommendations.

2 Alternative assessments of the economic fluctu-

ations

The measurement and the analysis of economic cycles have been a ”holygrail” of economic research for many years. The first studies dated fromthe end of XIX, but only around 1930 was there a first important rational-ization of the matter by Schumpeter[24]. The modern theory of economiccycles is usually referred to as the pioneering study of Burns and Mitchell[1]who introduced the concept of the business cycle.In the economic literature we can identify two kinds of approaches to analyz-ing business cycle fluctuations: the classical business cycle and the growthcycle. They differ in the way the economic fluctuations are measured: thefirst one is based on trend-cycle figures and the second one on detrendeddata.Following Pagan[2], classical cycles are:

”. . . hills and valley in a plot of the levels of the series...representing thegeneral level of economic activity.”

Growth cycles are defined as fluctuations in the stationary part of the rel-evant economic variables. Growth cycles relate short-term movements ofaggregate activity to the long-run term ones.Other alternative views of the economic, even if less relevant in terms ofthe literature available as well as of the empirical studies, the recovery cycleand the growth rate cycle. The following subsection briefly describes suchalternative approaches.

2.1 The classical approach

This view of business cycles relates to the monumental work of A.F. Burnsand W.C. Mitchell[1]; the two authors define business cycles in the followingway:

”Business cycles are a type of fluctuations found in the aggregate economic

activity of nations that organize their work mainly in business enterprises:

a cycle consists of expansions occurring at about the same time in many

1Plotted in Figure 2.

5

Page 8: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

economic activities, followed by similarly general recessions, contractions,

and revivals which merge into the expansion phase of the next cycle; this se-

quence of changes is recurrent but not periodic; in duration business cycles

vary form more than one year to ten or twelve years; they are not divisible

into shorter cycles of similar characters with amplitudes approximating their

own.”

The Burns and Mitchell classical definition of the business cycles still formsthe basis of the work by the NBER2. The methodologies proposed by the twoauthors were refined and extended by Victor Zarnowitz[8], G.H. Moore[27]and Anirvan Banerji[10] at the Economic Cycles Research Institute(ECRI)in New York to obtain a characterization of economic fluctuations for a num-ber of developed countries.Within each economy the ECRI approach distinguishes between cycles ingrowth, employment, inflation and foreign trade; even cycles in the majorsectors of the domestic economy are addressed with the aim of producing asystem of leading indicators for monitoring critical aspects of the economy.As defined by Burns and Mitchell the business cycle is a pattern seen in aseries taken to represent the aggregate economic activity of a nation. Aspointed out by Harding and Pagan[3] such a statement lacks precision ontwo counts; it does not say how one can measure aggregate economic activ-ity and it does not indicate how one is to describe the patterns in it.As for the first question the two authors use a wide range of time series todate the business cycle as no single reliable monthly or quarterly measure ofthe aggregate economic activity was available to them. The pattern in eachsingle series is then described by identifying the turning points.These turning points define the ”specific cycles” in each series, from thesespecific cycles a single sequence of turning points is distilled and constitutesthe ”reference chronology” which is the business cycle of a country. Twopoints emerge from this brief description:

1. Burns and Mitchell do not distinguish between business cycles andeconomic growth.

2. To characterize the business cycle of a nation it is sufficient to de-termine the turning points in the series representative of aggregateeconomic activity.

It is self evident from[1] that the two authors never tried to isolate thetrend from the series under investigation. The Burns and Mitchell approachfocuses on the ”cycles relatives”; once the turning points in the referenceseries are detected, a value of 100 is attributed to the observations which

2The dating committee of the NBER determines the official business cycles chronologyfor the United States.

6

Page 9: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

correspond to these turning points; all other values are compared with 100.This procedure while removing the inter-cycle trend leaves the intra-cycletrend unaltered.The second point above mentioned shifts our attention to the differentmethodologies that the current literature provides for turning points de-tection. A review of these methodologies as well as of the software routinescurrently available for these purposes is presented in section 5.1 and 5.2.

2.2 The growth cycle view

It is necessary to point out that even if the main attention of the NBER hashistorically been focused on classical cycles, the growth cycles have consis-tently also been studied.Impressed by the fact that countries in western Europe, whose capital stockwas destroyed during WW2, did not have a classical recession in the postwar period, the NBER researchers thought it was interesting to study thegrowth cycles for these countries. The most relevant results of these studiesare due to the work of of Mintz[6][7].As Mintz[6] points out, to distinguish between classical expansions and re-cessions is useful, but when one of the two phases doesn’t occur frequently,a new definition of business cycles phases is required. According to theempirical evidence the suggestion of Mintz was to keep the analysis in thesame framework developed by Burns and Mitchell by simply changing theirdefinition and introducing the concept that the series assumed to measureaggregate economic activity must be considered in a deviation from trendform.Before dealing with the relevant issue of trend and cycle decomposition it isuseful to introduce some empirical evidence about the relationship betweengrowth cycles and classical business cycles. This evidence mainly comesfrom the US experience; a valuable description of the same can be found inZarnowitz[8] and in Niemira[9].

1. Growth cycle highs tend to lead the corresponding peaks in the clas-sical cycles3;

2. Growth cycles tend to be more symmetric in duration and amplitudewith respect to the classical cycles. These are characterized by a strongasymmetry in duration4;

3. Growth cycles manifest a strong connection with inflationary cycles.Empirical evidence for the U.S. suggests that a change in the rate of

3In the business cycles terminology the words high and low are usually referred to thegrowth cycles, peaks and troughs to the classical cycles.

4Expansionary periods are considerably longer than recessionary periods ones.

7

Page 10: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

growth for the economy precedes a change in prices by an average ofseven months.

2.3 Other views of business cycle

Finally it can be of interest to recall that classical and growth cycles arenot the only ways to describe economic fluctuations. There are at least twoother ways to do it: growth rate cycle and recovery cycles.By the late 1980s, the use of growth rate cycles for measurement of serieswhich manifested few actual cyclical declines but did show cyclical slow-down5 was introduced.The growth rate cycle is based on the ratio of the latest monthly figure tothe average of the preceding twelve months. This approach can be viewed asan alternative, even if quite raw, way to obtain the detrended series. Turn-ing points could be identified by the same procedures described in section5.1 and 5.2. The growth rate cycle displays some interesting features thatrender it particularly suitable for real time monitoring and forecasting:

1. It avoids the problem of trend estimation;

2. The cyclical turns in the broad measures of aggregate economic ac-tivity in the form of output, income, employment and sales clustertogether;

Recovery cycles are an important addition to the measure of the durationof classical business cycles. The duration of business cycles is measured asthe period from peak over trough to the recovery date, the date where thelevel of the previous peak is reached.

2.4 Some conclusions

Despite the fact that in some cases the classical and the growth cycle views ofbusiness cycle have been presented as alternative ways to analyze economicfluctuations, in reality they can be used as a complementary analytical in-strument. As mentioned above peaks in growth cycles tend to lead thoseobserved by the classical approach. This characteristic is not a consequenceof a bias in one of the two views but it indicates that the two series of peaksmeasure different economic situations. Peaks in the growth cycle representa slow down and an acceleration of the economic activities whereas in the

5See Banerji and Hiris[10] for an exhaustive treatment of the argument

8

Page 11: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

classical view, they respectively describe trend inflection and recovery. Byputting together the four elements described above we obtain a completedefinition of the different states of the economy during a complete cycle.Moreover, empirical evidence shows that anticipating peaks in the growthcycle is easier than in the cyclical Burns and Mitchell approach. In otherwords decelerations and accelerations of economies are easier anticipatedthan trend inflections and recoveries. Finally, it is useful to point out that,as Mintz observed, decelerations and accelerations may even occur withouttrend inflections and recoveries.

3 Statistical methods and tools availability

The different views proposed in section 2 are related to some statisticalmethods for the analysis of business cycles. We decided to concentrate ourattention on two major categories: detrending methods and turning pointsdetection methods. The first one is strongly related to growth cycles analysisdescribed in section 2.2 whereas the second one can be applied to all differ-ent views of business cycles. As it can clearly be shown, the classical viewdoesn’t require the use of special statistical techniques with the exceptionof normal smoothing ones(i.e. moving averages) to eliminate the irregularcomponent. In this paper we decided not to analyze with particular atten-tion the remaining views proposed in section 2.3.Both detrending and turning points detection methods can be broadly clas-sified in two main approaches following their statistical foundation: para-metric and non-parametric.A non-parametric method extracts a signal from a time series by taking aweighted moving average over its observations. A parametric method in-volves the specification of a statistical model, the estimation of a set ofparameters, and the application of a signal extraction algorithm.

3.1 Tools availability

Despite the importance and the relevance of business cycle analysis, cur-rently we observe that there is not a specific software containing all thetechniques that could be used for the purposes of diagnosis of the cyclicalbehavior of the economy.The BUSY software currently developed in a research program financed bythe European commission, should in principle cover this gap even if it is notyet available. Different techniques are available on a wide range of softwaresometimes proposed by the official developers but most commonly by re-searchers and academics. For these reasons different techniques available in

9

Page 12: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

the same environment are not necessarily coherent in terms of data manage-ment and characteristics of the output and for the same reasons, businesscycle analysis is frequently carried on by using different software with a largehuman intervention. In our survey we decided to concentrate our attentionon the main econometric packages such as Rats, E-views and Pc-Give andon the most used matrix programming languages like Gauss, Matlab, Oxand SAS.

4 Filtering techniques for trend extraction

A crucial problem in modern empirical business cycle research is the de-trending of macroeconomic time series to compute the stylized facts6 of thegrowth cycles.For a long time the dominant approach to modelling these time series wasto view them as a sum of a deterministic trend and stochastic deviationstreated as the residual ”cyclical” component7.Since Nelson and Plosser[11] it has been common to regard macroeconomictime series as being difference stationary instead of trend-stationary.A trend stationary series can be represented in the following way:

yt = σ0 + σ1t + ct (1)

ct = αct−1 + εt (2)

under the stationarity condition |α| < 1.The above equations assert that the variable yt is subject to a constantgrowth trend and that the deviations from the trend follow a stationaryAR(1) process. The actual values are seen to fluctuate around the trendwith no obvious tendency for the amplitude of the fluctuations to increaseor decrease. The steady increase in the mean level renders the series non-stationary but its first difference is stationary:

∆yt = σ1 + ∆ct (3)

as ∆ct is stationary since ct is stationary.If the parameter α in the equation(2) is one, meaning the autoregressivepart of the relation(1) has a unit root, we have a series that strays awayfrom the linear trend.

6The moments of the detrended series.7For instance a linear time trend fitted to the log of a macroeconomic series representing

the output.

10

Page 13: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

The first difference has the form:

∆yt = σ1 + εt (4)

and it is stationary, being a constant plus white noise.We refer to the y variable in this case as Difference Stationary(DS).Figure 1 in section 6 displays a TS and a DS series generated by simulation.Even if the two cases mentioned seem to be quite similar there is a funda-mental difference between TS series and DS series involving the reaction ofthe system to innovations or shocks εt. These have a transient effect in TSprocesses and a permanent effect in DS case8.Of course it is unlikely that any type of linear deterministic trend can persistover a long time as this would imply that economic growth is not influencedby structural and technical changes as well as by wars and financial crisis.Trends are variable because of interactions with shorter fluctuations andpossibly structural breaks.A large number of statistical methods have been proposed for isolating thepermanent and transitory components in macroeconomic time series, thesecan be classified mainly as non-parametric and parametric.We present below a review of the most commonly used techniques for signalextraction, the Hodrick and Prescott filter and the Baxter and King filter areclassified as non-parametric according to the above mentioned definition, theUnobserved component model and the Beveridge and Nelson decompositionas parametric.

4.1 The Hodrick and Prescott filter

The Hodrick and Prescott filter is the most widely known and commonlyused univariate method for the estimation of the trend component of a timeseries. It is largely used in scientific papers as well as by international orga-nizations like the IMF and the OECD. In the European Union it is used bythe Economic and Financial Affairs Directorate and in the Economic Direc-torate of the European Central Bank.

4.1.1 Description

The application of the Hodrick and Prescott filter extracts from a series yt

the growth component gt . The estimation of gt is obtained through theminimization of the sum of squares of the transitory component subject to apenalty for the variation in the second differences in the growth component.That is gt is the solution to the following minimization problem:

8Johnston and DiNardo[12] provide an exhaustive treatment of the problem.

11

Page 14: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

min[gt]Tt=1

T∑

t=1

[(yt − gt)2 + λ[(gt+1 − gt) − (gt − gt−1)]

2] (5)

where λ is a penalty parameter which is closely related to the smoothnessof the estimated trend. The larger λ is, the smoother is the result.It is easy to understand that for this filter the role of the smoothing param-eter λ is crucial. In their original paper Hodrick and Prescott recommendedsome values for λ. These are the following:

• λ = 100 for annual data;

• λ = 1600 for quarterly data;

• λ = 14400 for monthly data.

The proposed values for λ can be derived from the formula 100 ∗ f 2 wheref is the frequency of the observations (f=1, 4, 12 for annual,quarterly andmonthly data).The effect of the filter depends on the properties of yt; when it is a station-ary series Pedersen[17] derives the optimal estimator of the λ parameter; asmany economic time series are assumed to have a unit root, a judgementmust be used to choose the value of λ.

4.1.2 Tools

As above mentioned the HP filter is a smoothing technique commonly usedto estimate the long-term trend of a series. Its recent widespread use is prob-ably due to its simple estimation procedure that rends it extremely simpleto implement from a practical point of view.The HP filter is included in a built-in command in E-views, Pc-Give, Mi-crofit and as specific program or procedure in Gauss, Matlab, Rats andSAS. Figure 3 in section 6 plots the HP(λ = 14400) trend for the Euro-zone IPI obtained by the algebra function in Pc-Give, Figure 4 displays thecorresponding cyclical component.

4.2 The Baxter and King filter

An ideal band pass filter is used to isolate the components of a time seriesthat lie within a fixed range of frequencies, say ω1 and ω2. To implement asimilar filter in the time domain an infinite order moving average is requiredand so an infinite number of observations.

12

Page 15: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

4.2.1 Description

Baxter and King[13] proposed a band-pass filter that passes through com-ponents of the time series with fluctuations between 6 and 32 quarters andremoves the components of higher and lower frequencies.The Baxter and King filter is a linear filter that approximates the idealband-pass filter above described via a finite terms moving average. It as-sumes the following form:

BK(L) =k∑

j=−k

ajLj (6)

The moving average was defined to be finite as it involves only 2k+1 terms.The ”bands” that define the range of periodicities to be extracted must bechosen a priori and economic theory can support this decision. In particular,as mentioned above, Baxter and King opted for a 6−32 quarters band. Theyrefer to Burns and Mitchell’s definition of the business cycles in support oftheir choice9.It is useful to recall that from an historical point of view, for the UnitedStates, very few cycles are shorter than two or longer than eight years10.But NBER research always required that business cycles involve absolutedeclines in economic activity, whereas Baxter and King, by attempting toobtain a statistical trend-cycle decompositions obtain estimates of growthcycles and not business cycles.The approximation proposed by Baxter and King[13] has been shown tofail to filter out the desired components when yt is nonstationary. An im-proved approximation of the ideal filter was proposed by Christiano andFitzgerald[25]; the two authors noted that the optimal approximation tothe ideal band pass filter requires knowing the true DGP of yt and derivethe optimal approximation when the series is I(1). This choice producegood results for standard macroeconomic time series.

4.2.2 Tools

Recently the BK filter was extensively used in macroeconomic research andits ability to isolate cyclical components of a time series investigated. Theoriginal code implementing the filter was developed in Matlab is available atMarianne Baxter Home page at Boston University; a similar code was devel-oped by Mark Watson and used to characterize the US economy in ”Business

9See section 2.10According to the historical NBER chronology for the United States, which goes back

to 1796(monthly after 1854), only four of the 45 peak to peak cycles exceeded eight yearsor 100 months and only two were shorter than two years or 20 months. The more recentpeak to peak cycle lasted 128 months and was officially determined by the decision of theNBER to date the end of current expansionary phase at March 2001.

13

Page 16: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

cycles fluctuations in US macroeconomic time series”; Estima web page con-tains a Rats procedure for the same purpose11.When using the Baxter and King filter, k observations are lost at the begin-ning and the end of the sample period, according to the required degree ofapproximation to the ideal filter.To avoid the lost of observations, it is possible to forecast and backcast theseries before applying the filter so as to use the complete moving average.All the programs presented in this section operate in such a way. It is trivialto note as the reliability of forecasts over such a long period is quite low.Moreover if this forecast is made with univariate ARIMA models it is wellknown that they will not correctly capture turning points. An alternativeprocedure is the one adopted by Dominique Ladiray[28] in producing theMacro SAS to extract the band passed cyclical component. It consists in re-ducing progressively the length of moving average as less data are available.Figure 5 in section 6 presents the band-passed Eurozone IPI obtained by ex-ploiting a Rats procedure; by comparing this graphic with the one in Figure6 where a decreasing span filter was applied we note the two are quite similar.

4.3 The Beveridge and Nelson decomposition

Beveridge and Nelson[19] were the first to propose a model based decompo-sition method of an integrated time series, which provides a convenient wayto estimate its permanent and its transitory components.

4.3.1 Description

Following the two authors, any ARIMA(p, 1, q) process can be representedas the sum of a stochastic trend plus a stationary component, where astochastic trend is defined to be a random walk, possibly with drift.For an ARIMA(0, 1, 1) model the decomposition can be easily obtained;suppose ∆yt is a MA(1) process so that ∆yt = et + bet−1, where et is whitenoise and |b| < 1.

yt = yt − 1 + et + bet−1 (7)

Solving equation(7) recursively and assuming y0 = e0 = 0, we obtain:

yt =t∑

j=1

ej + b

t−1∑

j=1

ej (8)

11See Table 3 in section 7.

14

Page 17: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

and therefore:

yt = (1 + b)t∑

j=1

et − bet (9)

Equation(9) gives the decomposition of the series yt into the permanent andthe transitory components, which are given by, respectively:

gt = (1 + b)t∑

j=1

et and dt = −bet (10)

An alternative expression for the trend component is:

gt = gt−1 + (1 + b)et (11)

Evidently gt is a random walk without drift and dt is a stationary process.Some general remarks on the Beveridge and Nelson decomposition:

• No a priori definition of the characteristics of the cyclical componentis required by the Beveridge and Nelson approach. All the parame-ters involved in the decomposition are estimated from the availabledataset so the decomposition does not depend upon external param-eters linked, for example, to the smoothness of the trend or to thefrequency range of the cyclical component.

• The estimated permanent and transitory components depend heavilyon the particular ARIMA model which is fitted to the data. It is wellknown that the identification of an ARIMA model is quite a subjectiveissue. Beveridge and Nelson is thus characterized by a certain degreeof arbitrariness and different decompositions can be consistent withthe same dataset.

• The transitory component is defined as a cumulative sum of shocksso the cyclical pattern is generated by a diffusion mechanism like theone described by Frisch. This implies that the cycle obtained usingthe Beveridge and Nelson decomposition can significantly differ withrespect to the ones obtained using mechanical approaches, such as theHodrick and Prescott and the Baxter and King filter.

4.3.2 Tools

As the Beveridge and Nelson decomposition is a model-based approach, itcan be implemented by exploiting the ARIMA procedures available in all

15

Page 18: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

the most widely used econometric and statistical packages.Specific codes are available at Estima web page for Rats; Gauss and SASoffers similar programs. Figure 7 in section 6 plots the Beveridge and Nel-son (0,1,1) decomposition obtained by exploiting Rats. For the reasons ex-plained in the methodological description it appears evident that the cyclicalcomponent isolated in such a way can not be clearly identified by its turningpoints.

4.4 The Unobserved components decomposition of Harvey

The unobserved components approach refers mainly to the work of Harvey[14].The main idea is that each economic time series yt is the result of some un-observed components:

yt = gt + ct + εt (12)

where the intended interpretation of the components is as follows:

gt = trend componentct = cyclical componentεt = unsystematic component following the Gaussian process εt ∼ NID(0, σ2

ε)

4.4.1 Description

The key hypothesis is that all the components are generally stochastic andgenerated by independent processes. So the Harvey decomposition is basedupon the hypothesis that trend and cycle have a separate dynamic structure.The general model for the trend component gt proposed by Harvey is theso-called local linear trend model:

gt = gt−1 + βt−1 + ηt (13)

βt = βt−1 + ζt (14)

The component gt is usually referred to as the level of the trend, while theβt is interpreted as its slope; ηt and ζt are orthogonal white noise so thatCov(ηt, ζt) = 0 ∀t, s. A variety of interesting sub-models are nested withinthe local linear model by imposing suitable restrictions on the variance pa-rameters σ2

ε , σ2η and σ2

ζ .

When σ2η = σ2

ζ = 0, the trend gt is purely deterministic having this formu-lation:

16

Page 19: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

gt = gt−1 + βt = g0 + βt (15)

when only σ2ζ = 0, gt is a random walk with drift of the form:

gt = gt−1 + βt + ηt (16)

From Koopman, Harvey, Doornik & Shepard[15] we present Table 1 speci-fying both the name and the appropriate restriction of the various models:Given a particular level and trend specification, the cyclical component can

Level σε ση

constant term * 0local level * *random walk 0 *

Trend σε ση σζ

deterministic trend * 0 0level with fixed slope * * 0random walk with fixed drift 0 * 0local linear trend * * *smooth trend * 0 *

Table 1: Restrictions of the various models

be modelled to capture a cycle that may be present in the observed series.

4.4.2 Tools

Given the variety of possible specifications, it is difficult to address thereader to a specific package to estimate unobserved component models.When working with time series it is important to have generic program-ming tools which offer complete flexibility. Such a tool is offered by Stampdeveloped by Harvey and Koopman and by its free counterpart Ssfpack byKoopman. Stamp is a program designed to model and forecast time seriesbasing on structural time series models; the main advantage of Stamp is itsuser-friendliness, the hard word is done by the program, leaving the userfree to concentrate on formulating models.SsfPack is a library of C routines based on state space form and the Kalmanfilter. In general terms it is able to replicate almost all the models whichcan be specified in Stamp but it is based on Ox and it requires some pro-gramming skills to operate properly. SsfPack is free of charge for workers inuniversity and government with no commercial purposes.An interesting Gauss application is presented in Kim and Nelson[18], it re-lates the decomposition of Real GNP to random walk (stochastic trend)

17

Page 20: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

component and stationary (cyclical) component.Another interesting series of Gauss programs accompanies the paper[26].The authors compare the two techniques and determine under which condi-tions they produce the same trend-cycle decomposition.

18

Page 21: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

5 Turning points detection

As we pointed out in section 1 it is possible to fully understand the charac-teristics of the business cycle of a nation by determining the turning pointsin the series assumed to be representative of the overall economic activity.Turning points in the levels of the series describe the classical business cy-cles, the ones in the series measured as deviation from trend, the growthcycles.In the following subsection we present the most widely used techniques todetect turning points in business cycle. These techniques can be mainlyclassified as parametric or non-parametric.Parametric procedures refer to the seminal work of Hamilton[4]. By ap-plying a Markov Switching model to the quarterly growth rates of the USGDP, Hamilton develops an optimal dating rule for the inferred smoothedprobabilities and obtained an almost perfect fit to the NBER official datingfor the US economy.Non-parametric techniques refer to the NBER tradition and in particularto the work of Bry and Boschan[5] who developed an algorithm to detectcyclical turning points in a time series.

5.1 Detecting turning points using a computer algorithm

In this subsection we deal with the problem of turning points detection usingcomputer algorithms. These algorithms detect the cyclical turning pointsmainly by identifying the local max and min in the selected series. Firstlywe refer to the Bry and Boschan algorithm.Bry and Boschan translate the NBER turning points detection method intoa set of simple decision rules:

1. Peaks and Troughs must alternate.

2. Each phase (from peak to trough or trough to peak) must have aduration of at least six months.

3. A cycle (from Peak to Peak or from Trough to Trough) must have aduration of at least 15 months.

4. Turning points within six months of the beginning or end of the seriesare eliminated as are peaks or troughs within 24 months of the begin-ning or end of the series if any of the points after or before are higher(or lower) than the peak (trough).

Table 2 presents this method in step by step form.The procedure refers to the Burns and Mitchell methodology by determining

19

Page 22: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

tentative peaks and troughs in a highly smoothed series and subsequentlyrefine the dating of turning points based on less smoothed series.The original series is smoothed firstly by a 12-months moving average, thenby a Spencer curve12 and finally by a lower order moving average dependingon the MCD13.The Bry and Boschan algorithm is based on seasonally adjusted monthlytime series.When the data is measured at a quarterly frequency an analogue to the BBalgorithm would be the algorithm developed by Harding and Pagan[3]. Thetwo authors treats the differenced series ∆yt as a measure of the derivative ofyt with respect to t; this leads to the use of the sequence ∆yt > 0, ∆yt+1 < 0as signalling a peak. Some ”censoring rules” to ensure that peaks andtroughs alternate and the single phases and cycles respect a minimum du-ration are incorporated.

5.1.1 Tools

The original algorithm developed by Bry and Boschan is actually availablefor Gauss thanks to M. Watson. The quarterly algorithm developed byHarding and Pagan is also available for Gauss. We tested the ability ofMark Watson’s program to detect cyclical turning points by applying it tothe monthly industrial production for the Eurozone (1985:01-2002:02). Thealgorithm was applied to the series in the levels and the detrended series aswell.The resulting turning points can be observed in Figures 4, 5, 6 and 8 of Sec-tion 6. Notably the algorithm detects more turning points in the detrendedseries than it does in the levels. This is natural as economic slowdown andrecovery are more frequent than classical recessions and expansions.

12The Spencer curve is a 15-month moving average with negative weights at the extremesand positive and higher weights closer to the center.

13The months of cyclical dominance is defined as the number of months needed for theaverage change in the irregular component to become smaller than the average change inthe trend component. Once the MCD scalar has been obtained for e series it can be usedas the length of a moving average that removes the irregular component for the same.

20

Page 23: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

I Determination of extremes and substitution of values.

II Determination of cycles in 12-month moving average (extremes re-placed).A. Identification of points higher (or lower) than 5 months on eitherside.B. Enforcement of alternation of turns by selecting highest of multiplepeaks (or lowest of multiple troughs).

III Determination of corresponding turns in Spencer curve (extremesreplaced).A. Identification of highest (or lowest) value within 5 months of selectedturn in 12-month moving average.B. Enforcement of minimum cycle duration of 15 months by eliminatinglower peaks and higher troughs of shorter cycles.

IV Determination of corresponding turns in short-term moving averageof 3 to 6 months, depending on MCD (months of cyclical dominance).A. Identification of highest (or lowest) value within 5 months of selectedturn in Spencer curve.

V. Determination of turning points in unsmoothed series.A. Identification of highest (or lowest) value within 4 months, or MCDterm, whichever is larger, of selected turn in short-term moving average.B. Elimination of turns within 6 months of beginning and end of series.C. Elimination of peaks (or troughs) at both ends of series which arelower (or higher) than values closer to end.D. Elimination of cycles whose duration is less than 15 months. E.Elimination of phases whose duration is less than 5 months.

VI. Statement of final turning points.

Table 2: The Bry and Boschan computer algorithm.

5.2 Detecting turning points with Markov switching models

An increasingly popular way to detect turning points in time series is byspecifying a statistical model for the data and then using the estimated pa-rameters of the model to obtain a turning points chronology.Probably the best known member of this class of models is the one devel-oped by Hamilton[4]. Hamilton specified a Markov switching model for thequarterly growth rate of US GDP in this way:

∆yt = µst+

4∑

i=1

[∆yt−i − µst−i] + εt (17)

with:St = 0, 1 (18)

21

Page 24: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

The model is locally linear14 but globally non-linear. This nonlinearity isforced by the presence of the latent variable St. This variable is assumedto follow a first order Markov chain. An interesting result of the obtainedestimation is the possibility to compute the smoothed and filtered proba-bilities which can be used to segment the time series into expansionary andrecessionary periods. To achieve this goal the optimal filter of Hamilton andKim’s smoother can be used.The presentation of the full methodology developed by Hamilton exceedsthe aims of this paper but we would like to emphasize two points:

1. Even if the first difference is applied to the data to obtain stationarity,Hamilton obtained a classical business cycle chronology.

2. Hamilton’s model is not per se a dating rule as a rule to detect turningpoints must be specified on the inferred probabilities.15

As for the dating rule, Hamilton opted for a 0.5 rule meaning when theprobability of a recession crosses the 0.5 level, a change in the phase of thebusiness cycle is assumed.A natural generalization of the Hamilton model is the Markov-switchingvector autoregressive(MS-VAR) model characterizing the business cyclesas common regime shifts in the stochastic process of economic growth indifferent nonstationary time series. Here the K-dimensional time series∆yt = (∆y1t, ..., ∆ykt) t=1,...,T, is generated by a vector autoregressionof order p:

∆yt − µst= A1(∆yt−1 − µst−1

) + · · · + Ap(∆yt−p − µst−p) + εt (19)

Recently Krolzig[16] extended the basic multivariate methodology abovementioned by considering Markov-switching cointegrated vector autoregres-sive processes; in this extension the idea of Markovian regime shifts proposedby Hamilton, is applied to multiple cointegrated time series.

5.2.1 Tools

A number of different programs for several packages are available to estimateMS models. James Hamilton’s home page provides Gauss programs for thispurpose; Rats procedures and Matlab programs are available as well.A remarkable set of programs was developed by Kim and accompanies thebook of Kim and Nelson[18].

14Linear conditional on the state of the economy.15On the smoothed or filtered depending on the amount of information the researcher

wants to use

22

Page 25: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

However, the most flexible way to estimate MS models is by Ox and theMSVAR package developed by Hans Martin Krolzig. The package allowsfor a wide range of models specifications and can be freely used for researchpurposes. Table 3 in section 7 presents the web sites where these applica-tions are available.Figure 9 in section 6 presents the smoothed probabilities obtained by speci-fying Hamilton’s model for the monthly growth rate of the Eurozone indus-trial production by using MSVAR. The related turning points are obtainedby applying a 0.5 rule. It appears natural to compare these turning pointswith the ones of Figure 8; the turning points detected by the two methodsappear quite similar, the main difference regards the peak at 1992:03 whichis detected by the non-parametric method at 1991:11.Hamilton’s model determines a further turning point, a trough at 2002:02,and considers the actual recessionary phase as concluded. This result mustnot be emphasized as the probabilities of a recession cross the 0.5 level onlyfor the last observation available at the moment; for this data observationsmoothed and filtered probabilities are the same so further observations areneeded.

23

Page 26: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

6 Applications

0 50 100 150 200 250 300

0

100

200

300

400

500

DS

TS

Figure 1: A trend stationary and a difference stationary series.

1985 1990 1995 2000

85

90

95

100

105

110

115

120

Figure 2: Eurozone IPI, 1985:01-2002:02.

1985 1990 1995 2000

85

90

95

100

105

110

115

120

Figure 3: Eurozone IPI and HP(14400) trend

24

Page 27: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

1985 1990 1995 2000

.96

.97

.98

.99

1

1.01

1.02

1.03

1987:12

1986:04

1993:06

1991:11 1994:12

1996:10

1998:05

1998:12

2000:12

Figure 4: HP(14400) filtered Eurozone IPI

1985 1990 1995 2000

-4

-3

-2

-1

0

1

2

3

1986:01

1987:08

1992:02

1993:07

1995:02

1996:10

1998:02

1999:05

2000:11

1990:06

1991:02

Figure 5: Band-passed 18-96 Eurozone IPI

1985 1990 1995 2000

-4

-3

-2

-1

0

1

2

3

1986:02

1987:09

1990:07

1991:02

1992:02

1993:07

1995:02

1996:10

1998:02

1999:05

2000:09

Figure 6: Band-passed 18-96 with decreasing span filter Eurozone IPI

25

Page 28: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

1985 1990 1995 2000

-1

-.75

-.5

-.25

0

.25

.5

.75

1

1.25

Figure 7: Beveridge and Nelson(0,1,1) decomposition, Eurozone IPI

1985 1990 1995 2000

85

90

95

100

105

110

115

120

1991:11

1993:06

2000:12

Figure 8: Turning points detected by the BB procedure on Eurozone IPI.

1985 1990 1995 2000

.1

.2

.3

.4

.5

.6

.7

.8

.9

1

P 1992:03

T 1993:06P 2001:01

T 2002:02

Figure 9: Smoothed probabilities of a recessionary phase, Eurozone IPI,P=peak T=trough.

26

Page 29: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

7 Software review for business cycles analysis

Signal extraction technique Package available at:

Hodrick and Prescott filter Gauss, RatsE-views, Matlab ideas.uqam.ca/QMRBC/codes.htmlMicrofit, Pc-GiveSAS http://www.unige.ch/ses/

sococ/mirage/welcome.html

Baxter and King filter Matlab http://people.bu.edu/mbaxter/Gauss www.wws.princeton.edu/∼mwatsonRats www.estima.comSAS See above

Christiano and Fitzgerald Eviews, Gauss www.clev.frb.org/research/optimal filter Rats, Matlab economists/fitzgerald

/tjfbandpass.html

Unobserved component Stamp http://stamp-software.com/ssfpack http://www.ssfpack.comGauss http://wuecon.wustl.edu/∼morley/

Beveridge and Nelson Gauss http://wuecon.wustl.edu/∼morley/decomposition Rats www.estima.com

SAS See above

Markov switching models Gauss http://weber.ucsd.edu/jhamilto/software.htm

www.econ.washington.edu/user/cnelsonOx-MSVAR http://www.economics.ox.ac.uk/

research/hendry/krolzig/default.htmRats www.estima.com

Bry and Boschan algorithm Gauss www.wws.princeton.edu//∼mwatson

Table 3: Business cycles software availability

27

Page 30: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

8 Conclusions

In this paper we presented a review of the main techniques for businesscycle analysis as well as the software available for the same purpose. Whatemerges from this analysis is at the moment there is not a specific softwarecontaining all the techniques required for a complete analysis of the economicfluctuations phenomena. Various applications are available but they covera large variety of packages.Two solutions for this problem can be presented:

1. The development of such a specific software; in this sense the BUSYproject seems to be really promising.

2. The integration of the different software for business cycle analysis;

The second point mentioned raises the problem of the creation of a commoninterface among the different packages, this is the real challenge for thefuture.

28

Page 31: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

References

[1] Burns, A.F. and Mitchell W.C. (1946), Measuring business cycles, NewYork, National Bureau of Economic Research.

[2] Pagan, A. (1997),Toward an understanding of some business cycle

characteristics, Australian Economic Review, 30,1-15.

[3] Harding, D. and Pagan, A. (2001), Dissecting the cycle: A method-

ological investigation, journal of monetary economics, Forthcoming.

[4] Hamilton, J. (1989), A new approach to the andlysis of non-stationary

time seires and the business cycle, Econometrica 57, 357-384.

[5] Bry, G. and Boschan, C. (1971), Cyclical analysis of time series: se-

lected procedures and computer programs, technical paper 20, NewYork: Columbia University Press for NBER.

[6] Mintz, I. (1969), Dating postwar business cycles, Methods and their

applications to Western Germany, 1950-1967, Nber Occasional paper107, New York.

[7] Mintz, I. (1972), Dating American Growth Cycles, in V.Zarnowitz:Business cycles today, NBER, New York, 39-88.

[8] Zarnowitz V. (1992), Business cycles: Theory, History, Indicators and

Forecasting, University of Chicago Press for the NBER.

[9] Niemira M.P. (1993), Forecasting financial and economic cycles, JohnWiley and Sons.

[10] Banerji A. and Hiris L., A multidimensional framework for

measuring business cycles, ECRI research paper, availablewww.businesscycle.com.

[11] Nelson, C.R. and Plosser, C.I. (1982), Trend and random walks in

macroeconomic time series, Journal of Monetary Economics 10,139-62.

[12] Johnston J. and DiNardo J., Econometric methods, Fourth Edition,220-23, McGraw-Hill International Editions.

[13] Baxter, M. and King, T. (1999), Measuring Business Cycles: Approxi-

mate Band-Pass Filters for Economic Time Series, Rview of Economicand Statistifcs, Vol.81(4), 575-93.

[14] Harvey, A.C. (1985), Trends and Cycles in macroeconomic time series,Journal of Business and Economic Statistics 3,216-30.

29

Page 32: BUSINESS CYCLES ANALYSIS AND RELATED SOFTWARE APPLICATIONS

[15] Koopman, S.J., Harvey, A.C., Doornik, J.A. &Shephard, N. (1999),Stamp 6.0, Timberlake Consultants.

[16] Krolzig, H.M. (1996), Statistical analysis of cointegrated VAR pro-

cesses with markovian regime shifts, Discussion paper 25/1996, Insti-tute for Economics and Statistics University of Oxford.

[17] Pedersen, T.M. (2000), The Hodrick and Prescott filter, the Slutzky

effect and the distortionary effect of filters, Journal of Economic dy-namic and control.

[18] Kim, C.J. and Nelson, C.R. (1998), State-Space models with regime

switching:calssical and Gibbs sampling approach with applications,MIT Press.

[19] Beveridge, S. and Nelson, C.R. (1981), A new approach to the de-

composition of economic time series into permanent and transitory

components with particular attention to measurement of the ”business

cycle”, journal of monetary economics 7, 154-174.

[20] Tinbergen, J. (1940), Statistical Testing of Business-Cycle Theories,Geneva: League of Nations. Vol. I: A Method and its application toInvestment Activity.

[21] Mundell, R.A. (1962), The appropriate use of Monetary and Fiscal

policy for internal and external stability.

[22] Sargent, Thomas J. (1986),Rational Expectations and Inflation.

[23] Lucas, R. E. (1976), Econometric Policy Evaluation: A Critique,Carnegie Rochester Conference Series on Public Policy, 1, 19-46.

[24] Schumpeter, J. A. (1939),Business Cycles, New York, McGraw-Hill.

[25] Christiano L.J. and Fitzgerald, T.J. (1999), The band pass filter,NBER Workijng Paper 7257.

[26] Morley, J. Nelson, C.R. and Zivot, E. (2001), Why are Beveridge-

Nelson and Unobserved-Component Decompositions of GDP So Dif-

ferent?, Review of Economics and Statistics.

[27] Zarnowitz, V. and Moore, G. (1982), Sequential signals of recession

and recovery, Journal of Business, January, 57-85.

[28] Ladiray, D. (2001), DIVERSES MACROS SAS: Analyse Ex-

ploratoire des Donnes, Analyse des Sries Temporelles, available at:www.unige.ch/ses/sococ/mirage/welcome.html.

30