Hello everyone,
I am having trouble using rangestat for calculating cumulative returns.
My idea is to get cumulative returns from the AnnualReportDate until 7 days after but also the cumulative returns from the AnnualReportDate until 30 days after etcetera.
Previously I used rangejoin to combine my returns data to the AnnualReportDate and therefore used the interval -10 365 to expand the range and combine with returns of 10 observations before the annualreportdate until 365 observations after.
Now I want to use rangestat to recognise that the interval is for instance from day 0 (which is the annualreportdate) until 7 days after and then cumulate the returns from those observations.
This is the code I used up to now: rangestat (sum) sevend_a_cum_2 = return, by(ISIN) interval(AnnualReportDate 0 7)
However in my opinion it does not recognise the fact that they should cumulate the returns which are linked to the variable date_U from the annualreportdate until 7 days after.
I hope I explained my problem clearly and that you can help me how to solve this.
Thank you so much in advance,
Joëlle
I am having trouble using rangestat for calculating cumulative returns.
My idea is to get cumulative returns from the AnnualReportDate until 7 days after but also the cumulative returns from the AnnualReportDate until 30 days after etcetera.
Previously I used rangejoin to combine my returns data to the AnnualReportDate and therefore used the interval -10 365 to expand the range and combine with returns of 10 observations before the annualreportdate until 365 observations after.
Now I want to use rangestat to recognise that the interval is for instance from day 0 (which is the annualreportdate) until 7 days after and then cumulate the returns from those observations.
This is the code I used up to now: rangestat (sum) sevend_a_cum_2 = return, by(ISIN) interval(AnnualReportDate 0 7)
However in my opinion it does not recognise the fact that they should cumulate the returns which are linked to the variable date_U from the annualreportdate until 7 days after.
I hope I explained my problem clearly and that you can help me how to solve this.
Thank you so much in advance,
Joëlle
Comment