Cyclical Classification of Commodities Prices and the Stock Markets Martha Edith Bellini* and Antonio de-la-Torre-Gallegos** This paper investigates systematic patterns of lead, coincidence or lag on the prices of the most important commodities traded in the stock markets, Gold and of Oil, taking of as basic chronologies that provided by the turning points of the stock markets. The NBER approach is applied to identify turning points in the American Stock Market (using S&P500 index), the price of Gold and the price of Oil from January 1997 through June 2013. The "G" program is used to analyze the delays between the turning points, in order to classify the series according to the cyclical signal with respect to the stock market into leading, lagged, or coincident. The results of the cyclical classification show that the evolution of the price of gold is a leading variable with respect to the S&P 500 when peaks and troughs are separated at the time of performing the study. Hence, this variable can be used when predicting the end of downward trend in the stock markets. JEL Codes: G1, E32, G17, Q4, 1. Introduction Empirical evidence and relevant facts disclose that financial and stock markets do not follow a straight-line trend, but alternate between phases of a rising stock market and economic expansion with other phases of a low market and/or recession, thereby forming a series of peaks and troughs, which in turn determine this cyclical pattern. These cycles trigger financial and stock market crises that affect financial markets and, and end up affecting all economic sectors The first authors to address the issue of business cycles were Burns and Mitchell (1946). Business cycles have been analyzed since with Galbraith (1954) and Shiller (1989, 2005) showing that business cycles are due to the irrational behaviour of investors, or “animal spirit”. Siegel (1998) argues that the existence of cycles in the stock market reflects large shifts in consensus perceptions of fundamentals and expectations of the future. The existence of these cycles in the stock market contradicts the efficient market hypothesis, based on the rationality of investors and the theory of random walk following from Bachelier (1900) and Malkiel (1973). There are now many documented violations of market efficiency. For instance, Banz (1981) shows that small stocks earn an abnormal return compared to their risk. Hong et al. (2007) conclude their investigation by saying that the industrial sector predicts stock market movements. *Dra. Martha Edith Bellini, Department of Finance and Operation Management University of Seville, Spain; Email: ebellini@us.es **Dr. Antonio de-la-Torre-Gallegos, Department of Finance and Operation Management University of Seville, Spain; Email atorre@us.es 2 Using monthly data from 1997:1 - 2013:06 we analyze the turning points of the US stock market (S&P500), the price of Gold and the price of Oil, in order to investigate if the delays of the turning points of the (S&P500) in relation to the variables studied can be used for forecasting purposes and if the results of this investigation can be useful for long-term investors in helping them to form profitable market-timing strategies. In a previous research we studied the cyclical classification of several financial variables in relation to the stock market and in this paper we selected two of the most significant variables that showed to lead the stock markets, Bellini (2011). This research applies the approach used by the National Bureau of Economic Research (NBER) following Burns and Mitchell (1946) for the identification of turning points. The <G> program from Abad and Quilis (1996) is used to analyze the delays between the turning points, in order to classify the series according to the cyclical signal with respect to the stock market into leading, lagged, or coincident. The rest of the paper is organized as follows: In Section 2 we briefly present the literature on stock markets cycles and cyclical classification of turning points. In Section 3 we present the data and methodology followed in this investigation. In Section 4 we discuss the results of our cyclical classification and section 5 provides some concluding remarks. 2. Literature Review 2.1 Identifying Cycles There are two main approaches to locate the upward and downward phases of existing cycles in an economic variable. The first one advocates a parametric specification of the data generating process, where two different regimes are allowed, one that corresponds to the expansions – and therefore contains some type of upward trend – and another one that corresponds to the contractions and therefore contains a downward trend. Examples of this approach are Goodwin (1993), Diebold and Rudebusch (1996) and Ramchand and Susmel (1998). In particular, upward and downward phases are explicitly identified in Maheu and McCurdy (2000) using parametric Markov-switching models. The second approach takes a nonparametric perspective and, instead of fitting a fully specified statistical data generating process, looks at the original data series in search for the specific features of the cycle. That is, this procedure looks for periods of generalized upward trend, which are identified with expansions, and periods of generalized downward trend which are identified with contractions. The key feature of the analysis is the location of turning points, peaks and troughs, in the series. These turning points determine the different phases of the cycle, which can be subsequently analyzed. This method was first applied by Bry and Boschan (1971) to the analysis of business cycles. It has since been used by Watson (1994), Artis et al. (1997) and Harding and Pagan (2003) for business cycles, and by Gómez Biscarri and Pérez de Gracia (2002), Kaminsky and Schmukler (2003) and Pagan and Sossounov (2003) for stock market analysis. Candelon et al. (2008) use nonparametric methods to measure the synchronization of bull and bear markets in East Asian countries. Cyclical variations in stock returns are also widely reported in the literature, see Coakley and Fuertes (2006), Perez-Quiros and Timmermann (2004). One of the most used nonparametric method to recognize a cycle is the position taken by the “classic cycle” or “business cycle” approach particularly in the studies of the National Bureau of Economic Research (NBER) following Burns and Mitchell (1946). 3 This method involves the construction of a set of indicators of a cycle from the information available on a continuous random variable yt. In this method, the presence of a cycle (expansion and contraction) is indicated by the existence of turning points in the level series without trend adjustments. The variable is designated as yt and assumes that it is the log of the original series. Since our aim is to extract and locate the turning point of the stock market the nonparametric approach will be more suitable for this study as this method allows more flexibility in analyzing some important features of the stock market cycles. 2.2. Locating Historical Turning Points in Stock Markets Turning points are indentified by using the technique based on the NBER approach using the “Busy Program” created by Fiorentini and Planas (2003)1. The NBER approach relies on descriptive statistics and on the detection of turning points. It is based on a large amount of empirical experience, as it has been developed since 1940’s. It has proved to be well suited to the analysis of the US business cycle. Although it is a heuristic approach, it is now a reference for macroeconomists (see for example Zarnowitz, 1992). In previous paper we found that is more precise in locating the turning points of the FTSE100. Dunis et al. (2011) Many papers have analyzed the upward and downward trend following the algorithm suggested by Bry and Boschan (1971) currently in use in stock market analysis: Pagan and Sossounov (2003), Abad et al. (2000), and Gomez Biscarri and Perez de Gracia (2004), among others. 2.3. Cyclical Classification After analyzing the methods for cyclical classification applied to economic variables, among which are found those that use delays between the turning points, (the crosscorrelation function, the spectral coherence function, and the dynamic factor model), it is concluded that for the stock markets, and especially for trading strategies, the most convenient method is that which analyses the delays between the turning points from the use of the <G>2 program and, therefore, is the method utilized in this study. The principal objective of program <G> is to classify a set of time series according to the behaviour of its cyclical signal with respect to a given reference series into either leading, lagged, coincident or acyclical variables. In this process, the cyclical signal of each series is compared with that of the reference series, by computing the distance in months (delay) between the turning points of each series. The calculation of the median value of all delays enables the series to be assigned into any of the abovementioned categories. 1 We use the 'Busy' program to conduct our cyclical analysis of the S&P500 index. The program is downloadable at : www.jrc.cec.eu.int/uasa/prj-busy.asp. Also by contacting: Christophe.planas@jrc.it. 2 Abad, A., Cristóbal, A y Quilis E.M. (2004): Programs for Cyclical Analysis, <F>, <G>,and <FDESC>, Users guide. 4 3. The Methodology and Model In this paper we identify the stock market turning points by locating the peaks and troughs that signal a change in the trend using the NBER method, then the cyclical classification are implemented in order to extend the knowledge about the financial markets and the behaviour of the variables, to use the information for predictions. With this regard, the use of leading indicators can be extremely helpful. For the cycle analysis the “Busy Program” of Fiorentini and Planas (2003) is used and for the cyclical classification the <G> program of Abad et Al. (2000). 3.1 The Data The data used for this investigation is monthly data from American stock market (S&P500), the price of Gold, the price of Oil and the Consumer Sentiment Index. The sample period is 1997:1 - 2013:6 with 200 data points. For the transformation of the data, the technique implemented relies in the first place on second moment analysis. It is hence assumed that the series are second-order stationary, with mean and auto-covariances that are finite and do not depend on time. Because most economic time series do not satisfy these conditions, they need to be transformed. Let Xit be a time series with sample length T, i.e. i=1,•••, N, .t=1, •••,T. Besides a logtransformation that serves at the cases where the series variance increases together with the mean, according to the general expression: ∑ v X [1] 3.2 The NBER Approach The NBER procedure starts with a detrending moving average; the method used for detrending is the Hodrick-Prescott filter designed by Hodrick and Prescott (1997). The filter is given by: [2] Where λ is the inverse signal to noise ratio, i.e. the ratio of the variance of the innovations in the short-term component to the variance of the innovations in the long-term component. For monthly series, typical values are λ=14400, see Hodrick and Prescott (1997). The larger λ the smoother the long-term components, see also Harvey and Jaeger (1993). Secondly the stationary series is corrected for outliers. Outliers are identified as the points that lie outside the Z , Z , where denotes the sample mean of the I-th series and Z ) the sample standard deviation. 5 The turning points found in the reference series are produced together with descriptive statistics such as average and median and details about the phases and length of the cycle found are given. The transformed series together with the turning points are presented in graphical format. For monthly data, a 2x12 centered Moving Average (MA) is applied on the outliercorrected data in order to obtain the "first cycle" curve. A first set of potential turning points is searched for in the 2x12 MA filtered series. The turning points are looked for in the interval [t-nterm,t+nterm] where the default is nterm=5. A minimum phase length of 1.25*MQ periods from a peak (trough) to a peak (trough) is imposed, MQ denoting the data periodicity of 12 for monthly series. The succession peak-trough is checked and imposed if necessary. 3.3 The <G> program. The identification of leading, coincident and lagged indicators for an economic system is one of the main tasks of the cyclical analysis, with an origin dating back to the beginning of the 20th century, with the NBER studies on the economy of the United States. The procedures most commonly used consider that there is a special series acting as a comparison standard, either for its economic relevance (e.g., the Gross Domestic Product) either for its statistical properties (e.g., the Index of Industrial Production). The series to be classified (xt) are related below one by one to the reference series (yt). In our study the stock market (S&P500) will be the reference serie. The procedures of cyclical classification can use the delays between the turning points: the <G> procedure, the cross correlation function or the spectral coherence function. The first two methods are defined in the time domain, while the third one is on the frequency domain. For trading purposes is necessary to now the delays between the turning points, so therefore the most convenient is the <G> procedure. The cyclical classification based on the turning point tries to identify systematic patterns of lead, coincidence or lag taking as basic chronologies that provided by the turning points of the reference series (fy). In fact, if the series to be classified, xt, has its turning points with a median delay3 ranging from –3 to 3 months from those of the reference series, it is considered that both are coincident. If this median delay is lower (higher) than –3 (3) months, it is considered that xt leads (lags) to yt. A fourth possibility can also occur: that the turning points of xt are not consistent with those of yt due to the lack of a common cycle between both series, usually due to a significant difference between the main frequencies of both cycles. Procedure <G> operates as follows: from the turning points of the reference series (fy) and classified series (fx) identified by the method described in the above section, a correspondence between them is established in three steps: 1. Each turning point of the series fy is associated with the nearest of fx, 2. Each turning point of the series fx is associated with the nearest of fy, 3. Unidirectional couplings are eliminated, retaining only the bi-directional ones. 3 The median is used because it is a robust estimator, so it is particularly useful in a setting of small samples such as that commonly found in this type of analysis. 6 This relation is called double and shows the characteristic that two turning points of one series cannot be associated with the same turning point of the other, so there can be turning points without correspondence. If the number of turning points without correspondence is high, it is considered that there is no cyclical relationship between the turning points of x and y. This procedure of classification has been also programmed in Pascal and is called <G> (Abad and Quilis, 1997). The Ry and Rx ratios are a synthetic measure of the degree of conformity between two series. That both are close to the unit is a condition necessary for a cyclical relation to exist between the two series. If, on the contrary, both are close to zero, it is considered that there is no cyclical relationship between the series or, in the terms of the program <G>, the series x is cyclically unclassifiable in relation to series y (x <a> y). The cases where Ry or Rx tend to zero (but not both simultaneously) suggest intermediate situations where there can be some local, but no overall agreement, which is a sign of inconsistency. In these cases, for more safety, it has been decided to consider also both series as unclassifiable. The acceptance limits, Ly and Lx, are established a priori and, by default, the program <G> assumes Ly=Lx=0.70. 4. Empirical Results: The Turning Points and the cyclical classifications. 4.1 The Turning Points using the NBER Approach For the analysis we use the ‘Busy’ Program and the results of the turning points for the American stock market (S&P500), the price of gold and the price of Oil in table 1 below. The in-sample period analyzed is from 1997:1 through 2013:06. S&P500: Peak Trough Peak Aug-87 Nov-87 May-90 Trough Peak Trough Peak Trough Peak Trough Peak Trough Oct-90 Jan-94 Jun-94 Jun-98 Aug-98 Aug-00 Sep-02 Oct-07 Feb-09 Peak Trough Apr-11 Sep-11 Gold: Peak Trough Peak Trough Peak Trough Peak Trough Peak Trough Peak Nov‐87 Aug‐89 Jan‐90 Feb‐93 Jan‐96 Aug‐99 Oct‐99 Mar‐01 Feb‐08 Oct‐08 Aug‐11 Oil: Trough Peak Trough Peak Trough Peak Trough Peak Trough Peak Trough Peak Trough Peak Trough Peak Trough Jul-86 Jul-87 Oct-88 Oct-90 Jan-92 Jun-92 Dec-93 Dec-96 Dec-98 Nov-00 Dec-01 Jul-06 Jan-07 Jun-08 Feb-09 Apr-11 Jun-12 Table 1: Results of NBER turning point analysis 4.2 Cyclical classification based on the turning points. The dataset of the American stock market (S&P500), the price of gold, the price of Oil and the Consumer Sentiment Index were analysed with the "G" program. The results are presented on tables 2 and 3. 7 S&P 500 Date Gold Date Delays (months) S&P 500 Date Gold Date Troughs Troughs Delays (months) Peaks Peaks Jun‐98 ‐ * Aug‐98 Aug‐99 12 Aug‐00 Oct‐99 ‐10 Sep‐02 Mar‐01 ‐18 ‐4 Oct‐07 Feb‐08 4 Feb‐09 Oct‐08 Apr‐11 Aug‐11 4 Sep‐11 Dec‐11 Dating for Cyclical Classification * Troughs vs Global Series Peaks vs Peaks Troughs Nº of turning points S&P 500 8 4 4 Nº of turning points Gold 6 3 3 Nº of paired turning points 6 3 3 Conformity ratio S&P 500 0.8 0.8 0.8 Conformity ratio Gold 1.0 1.0 1.0 Minimun limits of conformity 0.7 0.7 0.7 0.0 Coincident 4.0 Laddged ‐4.0 Leading Median delay Cyclical Classification Gold vs S&P 500 Table 2: Results of Cyclical classification for the gold S&P 500 Date Oil Date Delays (months) S&P 500 Date Oil Date Troughs Troughs Delays (months) Peaks Peaks jun‐98 ene‐97 ‐17 ago‐98 dic‐98 4 ago‐00 nov‐00 3 sep‐02 dic‐01 ‐9 ‐ jul‐06 * ‐ ene‐07 * oct‐07 abr‐11 jun‐08 abr‐11 8 0 feb‐09 sep‐11 feb‐09 jun‐12 0 9 Dating for Cyclical Classification Global Series Peaks Troughs Nº of turning points S&P 500 8 4 4 Nº of turning points Oil 10 5 5 Nº of paired turning points 8 4 4 Conformity ratio S&P 500 1.0 1.0 1.0 Conformity ratio Oil 0.8 0.8 0.8 Minimun limits of conformity 0.7 0.7 0.7 Median delay 1.5 1.5 2.0 Coincident Coincident Coincident Cyclical Classification Oil vs S&P 500 Table 3: Results of Cyclical classification for the oil The prices of gold and the oil are coincident variables with respect to the S&P 500 when the series is analysed as a whole. However, if the peaks and troughs are separated at the time of performing the study, it can be observed that the price of the gold leads the troughs of the S&P 500. Hence, this might be the variable that could provide a sufficiently early prediction of the end of the downward trends and, therefore, be valid to open long-term positions in the trading systems. 5. Concluding Remarks The results of the cyclical analysis using the NBER approach and the cyclical classification using the "G" program show that from the two financial variables analysed, the price of gold is the only leading variable with respect to the S&P 500 when the analysis of the peaks and troughs are separated at the time of performing the study. The prices of gold and the oil are coincident variables with respect to the S&P 500 when the series is analysed as a whole. 8 As an overall conclusion, only the price of gold has behaved as a leading variable, and hence this might be the only variable that could provide a sufficiently early prediction of the end of the downward trends. It can be confirmed that the analysis of the delays between the turning points of some commodities (the price of gold and price of oil) in relation to the stock market can be of great use facilitating the achievement of higher yields. References Abad, A. and Quilis, E.M. (1996): “<F> y <G>: dos programas para el análisis cíclico. Aplicación a los agregados monetarios”, Boletín Trimestral de Coyuntura, n. 62, p. 63-103. Abad, A. and Quilis, E.M. (1997): “Programas de análisis cíclico: <F> , <G> y <FDESC>. Manual del usuario”, Instituto Nacional de Estadística, Documento Interno. Abad, A. and Quilis, E.M. (1994): “A technique for cyclical analysis,” Eurostat-INSEE Workshop on Short Term Indicators, Paris, France. Abad, A., Cristóbal, A y Quilis E.M. (2000): Fluctuaciones Económicas, Puntos de Giro y Clasificación Cíclica. Instituto Nacional de Estadística, documentos de trabajo. Abad, A., Cristóbal, A y Quilis E.M. (2004): Programs for Cyclical Analysis, <F>, <G>,and <FDESC>, Users guide. Abad, A., Cristóbal, A and Quilis E.M. (2000): Economic Fluctuations,Turning Points, and Cyclical Classification. Report for the project Tools and Practices for Business Cycle Analysis in National Statistical Institutes of EU (BUSY), October 2000. Artis, M.J., Kontolemis, Z.G., and Osborn, D.R., (1997): Business Cycles for G7 and European Countries. Journal of Business 70 (2), 249–279. Bachelier, L. (1900): Théorie de la Speculation: Paris: Gauthier-Villars. Banz, R. (1981): The Relationship between Return and Market Value of Common Stocks. New York: Journal of financial Economics, 9 (1), 31-18. Bellini, M.E. (2011) Cyclical Analysis of Variables Determining the Behaviour of Financial and Stock Market: An Empirical Study. Doctoral Thesis. Bry, G. and Boschan, C. (1971): Cyclical Analysis of Time Series: Selected Procedures and Computer Programs. New York: National Bureau of Economic Research (NBER). Burns, A. F., and Mitchell W. C., (1946): Measuring Business Cycles. National Bureau of Economic Research (NBER). ISBN: 0-870-14085-X. URL: http://www.nber.org/books/burn46-1 Candelon, B., Piplack, J., and Straetmans, S., (2008): On Measuring Synchronization of Bulls and Bears: The case of East Asia. Journal of Banking and Finance 32 (6), 1022–1035. 9 Coakley, J., Fuertes, A.-M., (2006): Valuation Ratios and Price Deviations from Fundamentals. Journal of Banking and Finance 30 (8), 2325–2346. De la Torre, A and Bellini, E. (2009): Las crisis bursátiles en España y su comparación con otros mercados internacionales: Análisis de sus principales características. Universia Business Review. Cuarto trimester, 44-61. Diebold, F., Rudebusch, G., 1996: Measuring Business Cycles: A Modern Perspective. Review of Economics and Statistics 78 (1), 67–77. Dunis, C., Bellini, E. and De la Torre A. (2011): Stock Market Cycles: How Good are they for Long-Term Trading? Fiorentini, G., Planas, C.(2003): Busy Program User Manual. Tools and Practices for Business Cycle, Analysis in European Union. EC Fifth Framework Program SCA Project IST-1999-12654. Forni, M., and Lippi, M. (2001): The Generalized Dynamic Factor Model: Representation Theory Econometric Theory, 17, 1113–1141 Forni, M., Lippi M. and Reichlin L. (2000): “The Generalized Dynamic Factor Model: Identification and Estimation”, Review of Economics and Statistics, 82, 4, 540-554. Galbraith, J.K. (1954): The Great Crash. Riverside Press, Cambridge, UK. Gómez, J. And Pérez de Garcia, F. (2004): Stock Market Cycles and Stock Market Development in Spain. Spanish Economic Review, 6, 127-151. Goodwin, T.H. (1993): Business-Cycle Analysis with a Markov-Switching Model. Journal of Business and Economic Statistics 11 (3), 331-339. Harding, D. and Pagan, A.R. (2000): “Knowing the Cycle”. In: Backhouse, R.E., Salanti, A. (Eds.), Macroeconomics and the Real World-Volume 1: Econometric Techniques and Macroeconomics. Oxford University Press, Oxford, 23-42. Harding, D. And Pagan, A.R. (2002): Dissecting the Cycle: A Methodological Investigation. Journal of Monetary Economics 49 (2), 365-381. Harding, D. and Pagan, A.R. (2003): A Comparison of Two Business Cycle Dating Methods. Journal of Economic Dynamics and Control 27 (9), 1681-1690. Harvey, A.C. and Jaeger A. (1993), “Detrending, Stylised Facts and the Business Cycle”, Journal of Applied Econometrics, 8, 231-247. Hodrick R. and Prescott E. (1997): Post-War Business Cycles: An Empirical Investigation, Journal of Money, Credit and Banking, 29, 1, 1-16. Hong, H. Torous, W., and Valkanov, R. (2007): Do Industries Lead Stock Markets? Journal of Financial Economics 83 (2), 367-396. Kaminsky, G., and Schmukler, S. (2003): Short-Run Pain, Long-Run Gain: The Effects of Financial Liberalization. NBER Working Paper 9787. 10 Maheu, J.M., and McCurdy, T.H. (2000): Identifying Bull and Bear Markets in Stock Returns. Journal of Business and Economic Statistics 18 (1), 100-112. Malkiel, B.G. (1973): A Random Walk Down Wall Street. Norton: New York. Massimo, G., and Timmermann A. (2005) Economic Implications of Bull and Bear Regimes in the UK Stock and Bond Returns. The Economic Journal 115, (500), 111143. Pagan, A.R. and Sossounov K.A. (2003): A Simple Framework for Analyzing Bull and Bear Markets. Journal of Applied Econometrics, 18 (1), 23-46. Perez-Quiros, G., and Timmermann, A. (2000): Firm Size and Cyclical Variations in Stock Returns. Journal of Finance 55 (3), 1229-1262. Ramchand, L., and Susmel, R. (1998): Volatility and Cross Correlation Across Major Stock Markets. Journal of Empirical Finance 5 (4), 397-416. Ruíz, R. and de La Torre A. (2007): Determinación y Análisis de la Tendencia y el Ciclo en las Series Bursátiles. Análisis Financiero, 1004, 2, 14-23. Shiller, R.J. (1989): Market Volatility. MIT Press, Cambridge MA. Shiller, R.J. (2005): Irrational Exuberance. Second Edition, Princeton: Princeton University Press. Siegel, J.J. (1998): Stocks for the Long Run. McGraw-Hill, New York. Stock J. And Watson, M. (1993): A Probability Model of the Coincident Economic Indicator, in Lahiri, K. and Moore, G. (1993), Leading Economic Indicators: New Approaches and forecasting Records, Cambridge University Press: New York. Tversky, A. and Kahneman D. (1991): Loss Aversion in Riskless Choice: A ReferenceDependent Model. The Quarterly Journal of Economics, 106 (4), 1039-1061. Watson, M.W. (1994): Business-Cycle Durations and Postwar Stabilization of the US Economy. American Economic Review 84 (1), 24-46. Zarnowitz, W. (1992): Business Cycles: Theories, History, Indicators and Forecasting. Chicago: University of Chicago.