Hello,

Hope there is someone who could help me to solve this...

I have a dataset with monthly returns for 130 stocks (the stock code is the name of column/variable). Thinking as a spreadsheet, first column contains dates, and the remaining columns contain the monthly returns. Let us name this dataset as StockReturns.dta

In another dataset, I have all the 130 stocks and some other info, such as Marketvalue, P/B ratio, number of monthly trades and so on. In this one, columns are Code, Mktvalue, etc), each observation is composed by stock Code (the same name used in the first dataset), MKT Value, etc. Let us name this dataset as StockCharacteristics.dta

I would like to select the stocks from StockCharacteristics.dta (for example, get the 10 with highest MKT Value) save their codes in a "list" and then use this list in the StockReturns.dta (could, for example, use "keek command" for the variables in the list...

Well, I know how to select the desired stocks in the second dataset; what I do not know is how to save the list with the name of stocks and the, how to get this list in the first dataset... I

I really don´t know if this is a complete dummy question, since it is very simple to do in an EXCEL environment.

Thanks, best regards,
RZ