Hi there, I have weekly return data for each company, I would like to write a SAS code that can take the mean of the weekly returns for each company in the dataset. My data looks like: DATE COMPANY RETURN 5/2/2014 A 0.01 12/2/2014 A -0.05 19/2/2014 A 0.02 ....... 5/2/2014 B 0.02 12/2/2014 B 0.01 19/2/2014 B -0.01 ......... After deducing the mean, I would also like to deduce standard deviation of returns for each company and seeing if any of the returns for each company are < 3.09 standard deviations in which case I would like insert a CRASH dummy variable of "1" for that company during that year, otherwise "0" . Any help or ideas will be greatly appreciated. Thanks.
... View more