I'm using stata 13 with windows 10 OS.
I want to calculate cumulative returns by firm in a certain period of time. I thought about calculate the sum of ln(1+ret), but as I have negatives, I don't think this is the way to go.
Does anyone have any idea about how to do this?
My date variable represents the date for the last earnings announcement. I want to calculate the cumulative returns for this date.
Following is a example of my data
I want to calculate cumulative returns by firm in a certain period of time. I thought about calculate the sum of ln(1+ret), but as I have negatives, I don't think this is the way to go.
Does anyone have any idea about how to do this?
My date variable represents the date for the last earnings announcement. I want to calculate the cumulative returns for this date.
Following is a example of my data
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long permno float(abn_ret date_ea) 10001 .0009003075 20528 10001 -.01267928 20528 10001 .006637205 20528 10001 -.007484646 20528 10001 -.02332831 20528 10001 .011132848 20528 10001 .02164412 20528 10001 -.01230608 20528 10001 .01596631 20401 10001 -.027130686 20401 10001 .004668585 20401 end format %td date_ea
Comment