Setting Estimation Window / Estimation Period in Event Study

For questions regarding programming in the EViews programming language.

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

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sat Jul 15, 2017 6:54 am

Hi!

We are currently working with an event study and experience some problems with setting estimation period. We are running the following regression as Cross-Section SUR (PCSE):

LOG_Returns c LOG_Returns(-1) WMP(-1) WMP WMP(+1) Monday Tuesday Wednesday Thursday ,

where LOG_Returns represent index returns for seven separate countries, WMP is market return and the remaining are dummies for weekdays.

The problem ouccurs when we want to estimate the coefficients with an estimation period. Ex: We have 100 events, and when each event ouccurs we want to measure the regression coefficients using data from the previous 200 days, estimation period = [-200,0] where 0 is the day of the event. We want to save the residual from all these 100 equations as abnormal return, such that we get a series with abnormal returns for our 100 events.

How can we resolve this issue? (little experience in EViews)

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

Re: Setting Estimation Window / Estimation Period in Event Study

Postby EViews Gareth » Sat Jul 15, 2017 7:31 am

How/where are the events stored?

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Re: Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sat Jul 15, 2017 7:51 am

How/where are the events stored?
We have organized the data in excel as:

A B C D E F G-K

Country 1 Date LOG_Returns WMP Event1 Event2 Mon-Thur
.
.
Country 2 Date LOG_Returns WMP Event1 Event2 Mon-Thur
.
.
Country 7 Date LOG_Returns WMP Event1 Event2 Mon-Thur
.
.


For Event1, Event2 and Mon-Thur we have dummies 1 if it occurs and 0 if not.

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

Re: Setting Estimation Window / Estimation Period in Event Study

Postby EViews Gareth » Sat Jul 15, 2017 7:56 am

So the events are common across cross-sections? (I think they have to be, but want to be sure)

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Re: Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sat Jul 15, 2017 8:01 am

So the events are common across cross-sections? (I think they have to be, but want to be sure)
Yes :)

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Re: Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sat Jul 15, 2017 8:04 am

So the events are common across cross-sections? (I think they have to be, but want to be sure)
I must add: We have dates for LOG_returns in column B and we have added a new column C, with the dates of the market return. We have used a VLOOKUP formula in excel to have these dates mach eachother. How can we do the same thing in EViews? :D

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

Re: Setting Estimation Window / Estimation Period in Event Study

Postby EViews Gareth » Sat Jul 15, 2017 8:10 am

I still can't quiet visualise how the data are structured. Could you provide the Excel file?

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Re: Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sat Jul 15, 2017 8:58 am

I still can't quiet visualise how the data are structured. Could you provide the Excel file?
Yes. In this excel file we have already matched the dates between log returns and market return.
Attachments
event study.xlsx
(7.47 MiB) Downloaded 469 times

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Re: Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sat Jul 15, 2017 9:00 am

I still can't quiet visualise how the data are structured. Could you provide the Excel file?
Yes. In this excel file we have already matched the dates between log returns and market return.
EDIT "Column C should be removed"

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

Re: Setting Estimation Window / Estimation Period in Event Study

Postby EViews Gareth » Sat Jul 15, 2017 10:24 am

Something like this:

Code: Select all

smpl @all series temp = win for !i=1 to @obsrange if temp(!i)=1 then temp(!i)=0 %enddate = @otod(!i) %startdate = @otod(!i-99) smpl {%startdate} {%enddate} equation eq_!i.ls LOG_Returns c LOG_Returns(-1) WMP(-1) WMP WMP(+1) !i=0 endif next
would work, but you have some data issues I think which prevent it from running fully.

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Re: Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sat Jul 15, 2017 10:48 am

Something like this:

Code: Select all

smpl @all series temp = win for !i=1 to @obsrange if temp(!i)=1 then temp(!i)=0 %enddate = @otod(!i) %startdate = @otod(!i-99) smpl {%startdate} {%enddate} equation eq_!i.ls LOG_Returns c LOG_Returns(-1) WMP(-1) WMP WMP(+1) !i=0 endif next
would work, but you have some data issues I think which prevent it from running fully.

Thanks! Will try it out tomorrow and let you know if it worked :)

mikaldj
Posts: 8
Joined: Sat Jul 15, 2017 6:19 am

Re: Setting Estimation Window / Estimation Period in Event Study

Postby mikaldj » Sun Jul 16, 2017 3:30 am

Something like this:

Code: Select all

smpl @all series temp = win for !i=1 to @obsrange if temp(!i)=1 then temp(!i)=0 %enddate = @otod(!i) %startdate = @otod(!i-99) smpl {%startdate} {%enddate} equation eq_!i.ls LOG_Returns c LOG_Returns(-1) WMP(-1) WMP WMP(+1) !i=0 endif next
would work, but you have some data issues I think which prevent it from running fully.

We ran the code, and we got some results. However, the code yields several residuals in a row i.e that we have residuals on a monday tuesday and wednesday, this should not be possible. We only need the residual on the day of the event. Another issue, we need to estimate the regressions as Cross-section SUR (PCSE).


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests