Hi all,
I have this panel dataset of closing prices for 50 stock different stocks, divided over time into 63 periods.
Every period contains 28 daily observations. Now I want to calculate the returns per stock for every period of 4weeks with only using the first and the last observation of a period.
How could this be done?
This is how the dataset looks like
and then the second period begins and so on. During the periods, more stocks are added.
Thanks for your advise/help!
I have this panel dataset of closing prices for 50 stock different stocks, divided over time into 63 periods.
Every period contains 28 daily observations. Now I want to calculate the returns per stock for every period of 4weeks with only using the first and the last observation of a period.
How could this be done?
This is how the dataset looks like
PHP Code:
date close id periodvar
16-05-2013 118.76 8 1
17-05-2013 123.02 8 1
--
10-06-2013 106.35 8 1
11-06-2013 108.9 8 1
12-06-2013 108.15 8 1
16-05-2013 2.92 24 1
17-05-2013 3.19 24 1
--
11-06-2013 2.4 24 1
12-06-2013 2.38 24 1
Thanks for your advise/help!
Comment