business cycle indicator
//////////////////////////////////////
There exist many profitable trading strategies, such as the individual stock 
momentum, first documented in Jegadeesh and Titman (1993), the industry momentum 
in Moskowitz and Grinblatt (1999), the effect of the 52-week high price in George 
and Hwang (2004), and the effect of the maximum daily return in a month in 
Bali et al. (2011). However, Yan and Zhang (2016) argue that those profitable 
trading strategies would not be profitable during difficult time. In other words, 
investors would change their behavior during a recession. 

Objectives:
   1) understand the concept of business cycle
   2) generate a business cycle indicator
   3) if possible run CAPM by including this indicator 

    Source of data: 
      1) Business cycle data is from the National Bureau of Economic Research center. 
             The original starting date is June 1854.  
      2) stock data is from Yahoo!Finance. 

    Comments on your result

References
   Bali, Turan G., Nusret Cakici, and Robert F. Whitelaw, 2011, Maxing Out: 
         Stocks as Lotteries and the Cross-Section of Expected Returns, 
         Journal of Financial Economics 99 427-446.

   George, Thomas J, and Chuan-Yang Hwang, 2004, The 52-week High and Momentum 
         Investing, Journal of Finance 54, 5, 2145-2176.

   Grinblatt, Mark, and Bing Han, 2005, Prospect theory, mental accounting, 
         and momentum, Journal of Financial Economic 78, 311-339.

   Jegadeesh, N., and S. Titman, 1993, Returns to Buying Winners and Selling 
         Losers: Implications for Stock Market Efficiency, Journal of Finance 48, 65-91.

   Moskowitz, Tobias, and Mark Grinblatt, 1999, Do industries explain momentum? 
         Journal of Finance 54, 2017-2069.

   Yan, Yuxing and Shaojun Zhang, 2016, Business cycle, investors  preferences 
         and trading strategies, Frontiers of Business Research in China (forthcoming)  

  Table 1 from Yan and Zhang(2016)
        For a peak, we assign a positive 1 while for a trough, we assign a 
        negative 1. Any months between those peaks and troughs, we linearly 
        interpolate, see Panel B below. P for Peak and T for Trough. T(t-1) 
        is for the pervious Trough and P(t-1) is for the previous Peak. 

   Contraction        Expansion	cycle
     Peak (P)	      Trough (T)	P to T	T(t-1) to P  T(-1) to T    P(t-1) to P
  -----------         -----------------  ------  ----------  -----------   -----
  May 1923(II)        July 1924 (III)      14    22           36           40
  October 1926(III)   November 1927 (IV)   13    27           40           41
  August 1929(III)    March 1933 (I)       43    21           64           34
  May 1937(II)        June 1938 (II)       13    50           63           93
  February 1945(I)    October 1945 (IV)     8    80           88           93
  November 1948(IV)   October 1949 (IV)    11    37           48           45
  July 1953(II)       May 1954 (II)        10    45           55           56
  August 1957(III)    April 1958 (II)       8    39           47           49
  April 1960(II)      February 1961 (I)    10    24           34           32
  December 1969(IV)   November 1970 (IV)   11   106          117          116
  November 1973(IV)   March 1975 (I)       16    36           52           47
  January 1980(I)     July 1980 (III)       6    58           64           74
  July 1981(III)      November 1982 (IV)   16    12           28           18
  July 1990(III)      March 1991(I)         8    92          100          108
  March 2001(I)       November 2001 (IV)    8   120          128          128
  December 2007(IV)   June 2009 (II)       18    73           91           81

//////////////////////////////////////