Momentum trading strategy 
//////////////////////////
One phrase summary: buy winners and sell losers. 
Implied assumption: within a short-term (between 3 months and 12 months), 
                    the winner will remain a winner while a loser would 
                    continue to be a loser. 
 Two related questions: 
 ----------------------
     1) how to define a winner from a loser? 
     2) how to conduct a test?

 Objectives of this term project:
     1) learn CRSP monthly data set 
     2) learn how to use R to test the trading strategy 

 Source of data:CRSP monthly data 
 Basic logic:   According to Jegadeesh and Titman (1993) it is a profitable trading 
                strategy if we buy the past winners and sell the past losers.  

 Notations: 	Check the past K-month returns, and then form a portfolio for L months, 
     Where K=3,6,9 and 12 and L=3, 6, 9 and 12. Below we use K=L=6 as an example. 
     Trading strategy: Estimate all stocks  past 6- month returns and sort stocks 
      into 10 groups (deciles) according to their 6-month total returns. Long 
       the top decile (winners) and short the bottom decile (losers) for the next 6 months. 
   
   Procedure:
       Step 0: Starting month: January 1965
       Step 1: Retrieve CRSP data (PERMNO, DATE and RET)
       Step 2: Estimate past 6-month cumulative returns R_t^6month
       Step 3: Sort all stocks into deciles according to their cumulative 6-month returns
       Step 4: Long winners (best return group) and short losers for the next 6-month
       Step 5: Estimate portfolio returns
       Step 6: Move to the next month and repeat the above steps until 12/1989
 References
 ----------------------
    Jegadeesh Narasimhan and Sheridan Titman, 1993, Returns to Buying Winners and 
           Selling Losers: Implications for Stock Market Efficiency, Journal of Finance 
           48 (1), 65-91.
           http://canisius.edu/~yany/doc/momentumJF1993.pdf

    Appendix A: Table 1 from Jegadeesh and Titman (1993).
           http://canisius.edu/~yany/doc/momentumTable1.pdf
           http://canisius.edu/~yany/doc/momentumTable1.png

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