Hi everyone, I have a dataset like this (sample data). This dataset is organized by permno (stock identification), last date, and date. Variable "date" are the dates within the 2-year window from last date. For example, for the last date=31/7/2001, dates are ranging from 31/7/1999 to 31/7/2001. Symbol are stock symbols for each date Permno Last date Date SYMBOL 12345 31/07/2001 31/07/1999 A 12345 31/07/2001 01/08/1999 A 12345 31/07/2001 02/08/1999 A 12345 31/07/2001 ………… A 12345 31/07/2001 15/02/2000 A 12345 31/07/2001 16/02/2000 A1 12345 31/07/2001 ……… A1 12345 31/07/2001 21/04/2001 A1 12345 31/07/2001 22/04/2001 A2 12345 31/07/2001 ………. A2 12345 31/07/2001 26/06/2001 A2 12345 31/07/2001 …… …… 12356 15/09/2009 ………. B Now I would like a dataset that summarizes the begining dates and enddates of a stock symbol. The output should look like this. It shows that permno 12345 has a symbol = A from 31/7/1999 to 15/2/2000, and A1 from 16/2/2000 to 21/4/2001 and so on Permno Last date Begdates Enddates SYMBOL 12345 31/07/2001 31/07/1999 15/02/2000 A 12345 31/07/2001 16/02/2000 21/04/2001 A1 12345 31/07/2001 22/04/2001 26/06/2001 A2 12356 15/09/2009 ……… ………… ……… Could anyone show me how to do it? Thank you very much
... View more