I am a little confused about how to transfer the results (only the coefficient and t-value) of multiple newey west regressions into one table (please see the table and code below) other than typing them manually into Excel.
Could someone please give me a hint on how to approach this issue?
Thank you very much in advance.
Cyrano
About the specific issue:
The regressions are based on momentum strategies which are described below:
****Short information about momentum:****************************************************** ************************************************** *****************
Following a momentum strategy means that you look a few months in the past (in the code j=3,6) and look at the best and worst-performing stocks.
Then you buy (long) the best-performing stocks and short-sell (short) the worst-performing stocks and hold those stocks for the next few months in the future (in the code k=3,6,9).
The difference between the best-performing stocks and the worst-performing stocks during the holding period is the portfolio return.
************************************************** ************************************************** ************************************************** ****************
This results in j x k different combinations that I would like to show in one single table like this:
For each J x K strategy, I would like to show the
- Coefficient and
-t-statistic
(in the columns)
for each of the three return measures:
-long
-short and
-portfolio return
(in the rows)
K= | 3 | 3 | 6 | 6 | 9 | 9 | ||
Coeff | t-stat | Coeff | t-stat | Coeff | t-stat | |||
J= | 3 | Long | ||||||
3 | Short | |||||||
3 | Portfolio | |||||||
6 | Long | |||||||
6 | Short | |||||||
6 | Portfolio |
Code:
************************************************** *********************
forvalues j = 3 (3) 6 { //J refers to the formation period
forvalues k = 3 (3) 9 { //K refers to the holding period
newey r_long_`j'`k' //newey west regression on the best performing stocks
newey r_short_`j'`k' //newey west regression on the worst performing stocks
newey r_portfolio_`j'`k' //newey west regression on the difference between best and worst
}
}
0 Response to transfer results of Newey West regressions into one single table
Post a Comment