Hi,
So I have got monthly panel data of about 5000 firms over a period of about 10 years and need to construct equally weighted as well as value weighted top in class and bottom in class portfolios based on a sustainability measure. Afterwards I need to take the (equally weigthed or value weigthed) returns of those portfolios and regress the Fama &French factors against them. Since I am not very experience with stata I was wondering whether someone could help me with the commands to do so. Therefore I would need a command that select the returns of the top and bottom 25 % each month based on the sustainability variable followed by a mean command of those returns and then regressing them with three other varables. For the value weighted portfolios I would also need a command which would weighted each return by the fraction of this firms market value to the whole market value within that portfolio.
Any help is highly appreciated
Regards,
Lutz
So I have got monthly panel data of about 5000 firms over a period of about 10 years and need to construct equally weighted as well as value weighted top in class and bottom in class portfolios based on a sustainability measure. Afterwards I need to take the (equally weigthed or value weigthed) returns of those portfolios and regress the Fama &French factors against them. Since I am not very experience with stata I was wondering whether someone could help me with the commands to do so. Therefore I would need a command that select the returns of the top and bottom 25 % each month based on the sustainability variable followed by a mean command of those returns and then regressing them with three other varables. For the value weighted portfolios I would also need a command which would weighted each return by the fraction of this firms market value to the whole market value within that portfolio.
Any help is highly appreciated
Regards,
Lutz

thank you
Comment