"Turn-of-the-year effect" using seasonal dummies

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Aksel
Posts: 2
Joined: Tue Feb 23, 2021 6:37 am

"Turn-of-the-year effect" using seasonal dummies

Postby Aksel » Wed Feb 24, 2021 1:39 am

Hello,

I am currently working on a study to examine seasonal effects, particularly "turn-of-the-year-effect" at stock markets. The structure of the workfile is daily irregular, so all the observations that are not trading days are excluded. What I am trying to do is to code the dummy variables in a way, that during trading days from -1 to 3, it takes the value 1 and otherwise 0. So, the trading day window takes place at the last trading on December to the third trading day on January every year. Can somebody please help me how to generate that kind of dummy variable in EViews.

Looking forward to receive an answer.

Best regards,
Aksel

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

Re: "Turn-of-the-year effect" using seasonal dummies

Postby EViews Gareth » Wed Feb 24, 2021 8:42 am

Something like:

Code: Select all

series dum = (@month=12 and @month(1)=1) or (@month=1 and @month(-1)=12) or (@month=1 and @month(-2)=12) or (@month=1 and @month(-3)=12)
Follow us on Twitter @IHSEViews

Aksel
Posts: 2
Joined: Tue Feb 23, 2021 6:37 am

Re: "Turn-of-the-year effect" using seasonal dummies

Postby Aksel » Thu Feb 25, 2021 1:03 am

Yes! Thank you very much. That code works perfectly.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 18 guests