Hi. I need help to form rank and portfolio by following the procedure below (step 1 to 3). The code I used to do this, I mentioned in the following but I did not get the similar result like the paper I am trying to replicate. Please suggest me whether my codes are right or wrong. The authors rank leverage and form portfolio, and track their portfolio in the following 20 years.
Step 1: Each calendar year, we sort firms into quartiles (i.e., four portfolios) according to their leverage ratios, which we denote: Very High, High, Medium, and Low. The portfolio formation year is denoted event year 0. We then compute the average leverage for each portfolio in each of the subsequent 20 years, holding the portfolio composition constant.
Step2: We repeat these two steps of sorting and averaging for every year in the sample period. This process generates 39 sets of event-time averages, one for each calendar year in our sample.
Step3: We then compute the average leverage of each portfolio across the 39 sets within each event year. The figure represents the average leverage along the event time. Here the event time refer to the x-th year after portfolio formation.
39 = 39 times of portfolio formations, i.e., each year during 1965 and 2003, the authors rank leverage and form portfolio, and track their portfolio in the following 20 years.
/* create rank and four portfolio quartiles of book_leverage */
egen portfolio_bk_lev=xtile(book_leverage), n(4) by(fyear)
**gen average leverage ratio based on four portfolio:
tabstat book_leverage if portfolio_bk_lev==4 , by( fyear ) stat(n mean median)
tabstat book_leverage if portfolio_bk_lev==3 , by( fyear ) stat(n mean median)
tabstat book_leverage if portfolio_bk_lev==2 , by( fyear ) stat(n mean median)
tabstat book_leverage if portfolio_bk_lev==1 , by( fyear ) stat(n mean median)
Please advice me how to do that. Any suggestion much appreciated. Thank you.
Related Posts with How to rank and form portfolio
CounterHi all, I have the following dataset: Code: * Example generated by -dataex-. To install: ssc ins…
How is this construct `=function(argument)', `=scalar_name', `=scalar_value' etc. called, and where can I read more about it?Nick Cox is putting to good use a construct which has same form like dereferencing of a local, excep…
Tobit regression generating predicted values above the censored limit.Hi all ! I am running the tobit model on stata 14.1 with the following command: tobit effscr lnta_…
the regression constant in oglmHow do I get the regression constant in oglm? …
using export excel in combination with conditional statementDear all, Would you be able to advise me on the following? I have written several checks to flag d…
Subscribe to:
Post Comments (Atom)
0 Response to How to rank and form portfolio
Post a Comment