Adding date to loop
Posted: Wed Jun 08, 2022 6:19 am
I'm using EViews 11 to run the following simple code for a sample of 173 firms:
I have a daily data file, how can I run the above loop for every month separately? I don't know how to introduce date restrictions in the loop. Many thanks.
Code: Select all
vector(173) myvec
for !i=1 to 173
smpl if c_id=!i
myvec(!i) = @cor(ret,ret(-1))
next