Event study-Pairwise Wilcoxon signed rank test

For questions regarding programming in the EViews programming language.

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

veni
Posts: 12
Joined: Fri Sep 02, 2016 6:04 am

Event study-Pairwise Wilcoxon signed rank test

Postby veni » Thu May 07, 2020 8:34 am

Hi!
My post is a modification and an extension of an existing post from the past (viewtopic.php?f=5&t=10255&p=35884&hilit=abnormal+returns#p35884)

The context is more or less the same, but the suggested steps do not work in my case. The dataset consists of 38 series from Febr 2, 1995 to May 5, 2020. Assume that the date of interest is Sep 11, 2001, and we 'd like to compute the cumulative returns using a window of 88 days, starting from the event date and ending on Sept 11, 2002.

I import the 38 series and the dates.
group sept01 * not resid not dates 'I set all the series in a group
!window=88

According to the past post
!dateval = @mean(dates) ' taking the means gives us the date value for the single observation
%eventdate = @datestr(!dateval, "yyyy[q]q") ' this gives us the date string
%startdate = %eventdate + "-10" ' build up start date string
%enddate = %eventdate + "50" ' build up end date string
smpl {%startdate} {%enddate} ' set sample to the appropriate range

which I've wrongly modified them as

!dateval = @mean(dates) ' taking the means gives us the date value for the single observation **** I don't understand what this is for ****
%eventdate = @datestr(!dateval, "2001-09-11") ' this gives us the date string
%startdate = %eventdate ' build up start date string
%enddate = %eventdate+ 365-!window' build up end date string
smpl {%startdate} {%enddate} ' set sample to the appropriate range

for !t=1 to sept01.@count
for !j=1 to {%enddate}-!window
sample s_!j {%startdate}+!j-1 {%startdate}+!j+!window
smpl s_!j
matrix m1 = @convert(sept01,s_1) ' *** to calculate the cumulative sum for each of the series ****
matrix temp2=@cumsum((sept01)_s_!j) ' Error: Insufficient number of observations in "MATRIX TEMP1=@CONVERT(SEPT01,S_1)" on line 1.
matplace(abr, @transpose(temp2),!t,1) ' to save the rolling sum of returns in each window
next
next
smpl @all

The next steps are the subtraction of one of the columns of the abr and then perform pairwisely the Wilcoxon test. Is it possible to save only the p-values of the output, and how to write for example the following ser01.testby(med) ser02 using a command line?

Sorry for the long post.
Many thanks in advance!

Return to “Programming”

Who is online

Users browsing this forum: Google [Bot] and 29 guests