Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Implementing a Momentum Investment Strategy with Stata

From   Robson Glasscock <[email protected]>
To   [email protected]
Subject   Re: st: Implementing a Momentum Investment Strategy with Stata
Date   Sun, 4 Mar 2012 09:20:09 -0500

Christopher Baum's "An Introduction to Stata Programming" discusses
moving-windows in Chapter 8. The -rolling- command is mentioned as
well as Cox and Baum's -mvsumm- and -mvcorr- programs (available from
SSC). Looking into these may help you think about a modified approach
to your problem.

Instead of using matrices, I wonder if it would be better to generate
two new variables that would help you identify the top 10% of firms in
each window. First, generate a "window" variable that would take on a
value of 1 for months 1-6, 2 for months 2-7, 3 for months 3-8, etc.
Second, generate an "identifier" variable that tags the top 10% of
firms in each window. You would know exactly which firms were included
in each window and then it would be possible for you to calculate the
returns for those firms over the next six months. Or maybe clever use
of -rolling- is the better approach here. I'm not sure, but I hope
this is enough to get you started.

Robson Glasscock

On Sun, Mar 4, 2012 at 7:43 AM,  <[email protected]> wrote:
> Dear all,
> I am trying to implement a Momentum Strategy following Jegadeesh/Titman(1993): Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency, JoF 48(1), pp. 65-91.
> I have monthly returns for ~1400 stocks for a total of 385 time periods and now have to proceed in the following way:
> 1) build cumulated returns over a formation period of 6months (I did that by generating new variables)
> 2) select the top 10% performing stocks in order to invest. This is done every month in order to generate so-called "overlapping" portfolios.
> 3) invest in those stocks for a holding period of 6 months
> 4) determine the average of the returns and adjust for risk
> For now, my approach was to generate matrices for every month t that consist of the cumulated returns over the previous 6 months.
> However I can not find an efficient way to sort these matrices while being able to identify which assets to invest in (this is crucial as I need to tell Stata somehow which assets to invest in).
> I am sure there is a better way to sort the cumulated returns of the previous 6 months in every month t while still being able to somehow "track" the variable name in order to invest in the corresponding stock.
> I hope I made myself clear, any help would be greatly appreciated!
> Best,
> Daniel
> --
> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
> Jetzt informieren:
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index