Code to calculate how weekday affects stock price ?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

anhkhoa_lpt
Posts: 22
Joined: Thu Sep 29, 2011 8:28 pm
Location: Vietnam

Code to calculate how weekday affects stock price ?

Postby anhkhoa_lpt » Sun Mar 22, 2015 11:36 pm

Dear Sir/Madam,
I come from Vietnam. Iam researching about how weekday affects stock price. I did it for only one serie (code VNI). Now I want expand it to all stock code (near 600 stocks). How can I do that ?
Thanks & Regards,

Code: Select all

'create one serie equals percent of VNI genr pc_vni=d(vni)/vni(-1) 'create one vector to store results vector(5) weekdays 'calculate return in weekdays for !i=2 to 6 smpl if weekday=!i weekdays(!i-1)=@mean(pc_vni) next delete pc_vni smpl @all

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Code to calculate how weekday affects stock price ?

Postby trubador » Mon Mar 23, 2015 1:54 am

Have you tried searching the forum? There are plenty of examples about that. For instance:
http://forums.eviews.com/viewtopic.php?f=3&t=9099
http://forums.eviews.com/viewtopic.php? ... 12&p=23385
http://forums.eviews.com/viewtopic.php?f=3&t=10903
And for the batch code, you need to look at the programming examples. A good place to start is:
http://forums.eviews.com/viewtopic.php?f=5&t=1638

anhkhoa_lpt
Posts: 22
Joined: Thu Sep 29, 2011 8:28 pm
Location: Vietnam

Re: Code to calculate how weekday affects stock price ?

Postby anhkhoa_lpt » Mon Mar 23, 2015 2:27 am

I understood.
Thank you so much, Mr Trubador


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests