Realized monthly returns
Posted: Tue Mar 10, 2015 2:14 pm
hi there,
I am trying to compute the realized monthly returns where months have irregular number of days (between 20 and 22 days).
I have tried several alternatives of looping over dates such as the test code below but nothing seems to work as the date index once it reaches the last day of the month then it acts on the month (so instead of stopping on 31 December it carries onto February) even though the month index is fixed.
Could you please help with this?
Many thanks.
comp k = 1975, j = 01, l = 01
do i = 0, 22
disp %DATELABEL((k):(j):(l+i)) ruk((k):(j):(l+i))
end do i
I am trying to compute the realized monthly returns where months have irregular number of days (between 20 and 22 days).
I have tried several alternatives of looping over dates such as the test code below but nothing seems to work as the date index once it reaches the last day of the month then it acts on the month (so instead of stopping on 31 December it carries onto February) even though the month index is fixed.
Could you please help with this?
Many thanks.
comp k = 1975, j = 01, l = 01
do i = 0, 22
disp %DATELABEL((k):(j):(l+i)) ruk((k):(j):(l+i))
end do i