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 on April 23, and its replacement, 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 <>
To   "" <>
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 Baum   |   Boston College Economics and DIW Berlin   |
An Introduction to Stata Programming   |
An Introduction to Modern Econometrics Using Stata   |

*   For searches and help try:

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