Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

re: Re: st: RE: Getting variable names in a matrix


From   Christopher Baum <kit.baum@bc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   re: Re: st: RE: Getting variable names in a matrix
Date   Fri, 10 Feb 2012 15:43:07 -0500

<>
I am trying to implement a momentum investment strategy. I.e. I need to rank stocks according to their cumulated performance over a previous period (this information is stored in my matrices) and then take the top X% in order to classify in which stocks I will invest in the subsequent period (hence I want the name of the asset in order to tell Stata which returns to cumulate for the investment).

My idea was to realize this through usage of matrices. However I do not know if there exists a better approach to solving this. Do you (or does anyone else) have some input for me?


There is a somewhat similar problem, relating to ranking of firms' returns versus index returns, described in sections 10.1 and 14.3 of ISP, referenced below. The first example uses only Stata, while the second, somewhat more involved, makes use of Mata.

Kit

Kit Baum   |   Boston College Economics and DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming   |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata   |   http://www.stata-press.com/books/imeus.html


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index