Sorting stocks more than once to form portfolios
Posted: Sat Mar 27, 2021 2:52 pm
Hi Everyone
I have a question on Eviews Program Code on sorting.
I have a list of monthly stock returns (f1 to f200) and 2 loadings (Beta1 to Beta200 and Teta1 to Teta200) and 3 Fama French factors (market:rm, Small minus Big:smb, High minus low:hml).
I need to
1- Sort the stocks in the sample into three portfolios based on Beta loading (Beta 1 to Beta200).
2- Sort each of the above three portfolios into terciles based on Teta loading (Teta 1 to Teta200).
3- Hence, this sequential sorting should result in 9 portfolios each month based on Beta and Teta
4- Run rolling regression for each of the 9 portfolio returns on 3 Fama French factors (market, SMB and HML)
Could anyone help me especially on the Eviews code for sorting the stocks into 9 portfolios (3 by on loading and later 3 by another loading) ?
Thanks in advance for your help.
Kind regards
PS: I have the data available for those interested
I have a question on Eviews Program Code on sorting.
I have a list of monthly stock returns (f1 to f200) and 2 loadings (Beta1 to Beta200 and Teta1 to Teta200) and 3 Fama French factors (market:rm, Small minus Big:smb, High minus low:hml).
I need to
1- Sort the stocks in the sample into three portfolios based on Beta loading (Beta 1 to Beta200).
2- Sort each of the above three portfolios into terciles based on Teta loading (Teta 1 to Teta200).
3- Hence, this sequential sorting should result in 9 portfolios each month based on Beta and Teta
4- Run rolling regression for each of the 9 portfolio returns on 3 Fama French factors (market, SMB and HML)
Could anyone help me especially on the Eviews code for sorting the stocks into 9 portfolios (3 by on loading and later 3 by another loading) ?
Thanks in advance for your help.
Kind regards
PS: I have the data available for those interested