Hello All, I would like to create a variable that, for each day, creates a variable that represents the following 30 days of returns. The data takes the following form: Firm Date Ret A 1/1/11 .1 A 1/2/11 .01 A 1/3/11 .1 A 1/4/11 .2 . . . . B 1/1/11 .05 B 1/2/11 .1 . . . So the idea is for the 1/1/11 observation for Firm A, the variable would return the cumulative return, starting that day, and going forward one day. Just to make it simple, we could use addition, rather than a compounding return: .1 + .01 + .1 + .2 and so on for thirty days. And for the 1/2/11 observation for Firm A, it would be: .01 + .1 + .2 and so on for thirty more days. And this would continue with all the firms that I have. Any help would be greatly appreciated. I am going to be downloading a small file for you guys to play with if you need data to work out the problem. Thanks! John
... View more