I am using the below example to explain my query. I am able to create portfolios successfully via astile and can see the quintile portfolios in "size5" column. Now I want to create a new variable "Difference" that gives the difference of size5 quintiles (5 - 1) within each year for "invest" variable.
there are the same ranks within a year for companies in the size5 column and I want the difference of quintile5 and quintile1 for "invest" variable. Please advise how I can do that?
Code:
webuse grunfeld bys year: astile size5=mvalue, nq(5)
regards, Sara
0 Response to SSC astile - how to get difference of High minus low portfolio ?
Post a Comment