BookmarkSubscribeRSS Feed
kwil
Fluorite | Level 6

Hi,

 

I currently have a set of buy and hold abnormal returns for periods of 6, 12, 24 and 36 months. I want to adjust the t-statistic used to test the significance of the means in order to account for the events being non-random. I would like to adjust the t-statistics for overlapping samples by adjusting the variance covariance matrix for the overlapping long run returns. I am using the methodology outlined in Lyon, Barber & Tsai (1999) but am really unsure how to implement this in SAS.

 

Data Set:

Firm Month BHAR

x         6         10%

y         6         15%

z         6         -10%

y        12          5%

z        12         40%

y        24         20%

z        24        -10%

 

kwil_0-1602028055920.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Any help would be really appreciated, thanks.

9 REPLIES 9
kwil
Fluorite | Level 6

Hi,

 

I currently have a set of buy and hold abnormal returns for periods of 6, 12, 24 and 36 months. I want to adjust the t-statistic used to test the significance of the means in order to account for the events being non-random. I would like to adjust the t-statistics for overlapping samples by adjusting the variance covariance matrix for the overlapping long run returns. I am using the methodology outlined in Lyon, Barber & Tsai (1999) but am really unsure how to implement this in SAS.

 

Data Set:

Firm Month BHAR

x         6         10%

y         6         15%

z         6         -10%

y        12          5%

z        12         40%

y        24         20%

z        24        -10%

 

kwil_0-1602028055920.png

Any help would be greatly appreciated, thanks. 

jimbarbour
Meteorite | Level 14

I notice no one yet, has responded to your question.  There's nothing wrong with posting it here in the Programming forum, but I wonder if it might be seen by more qualified people if you posted it in one of the Analytics forums.  Just a thought.  Either way, I hope you find a good solution.

 

Good luck!

 

Jim

jimbarbour_0-1602034274456.png

 

kwil
Fluorite | Level 6

I haven't been able to find a solution yet, does anyone know of any similar threads that I can have a look at or anyone they think would know how to solve this problem?

 

Thanks

Rick_SAS
SAS Super FREQ

This formula is a modification of the usual covariance estimate between two variables X and Y.

However, it requires that the X and Y variables by time series, which means the observations are equally spaced in time, which your data are not.

 

My suggestions:

1. Do you have monthly data? If not, you can't directly apply the formula.

2. Do you know how to manually create the usual covariance estimate for variables X and Y? If not, start there, since you can compare your answers with PROC CORR.

3. Do you know how to perform matrix programming in SAS/IML? If not, applying the estimation process will be more complex.

 

Here's how you can use PROC IML to reproduce the usual covariance estimate. If you have monthly data, you can modify this method to get the time series covariance.

proc corr data=sashelp.class cov noprob; 
   var Height Weight;
   ods select Cov;
run;


/* Manual compuation. Reproduce convariance estimate and
   compare with PROC CORR. */
proc iml;
 
use sashelp.class; 
read all var "Height" into X; 
read all var "Weight" into Y; 
close sashelp.class;
 
n = nrow(X);           /* assume no missing values */
cX = X - X[:];         /* subtract mean to center X */
cY = Y - Y[:];         /* center Y */
cov = (cX` * cY) / (n-1);
print cov;
kwil
Fluorite | Level 6
Hi Rick,

Thanks for your reply.

I do have the data in a time series format - I have the monthly excess returns for each firm. However, i have no experience with matrix programming and am not sure how to do it.

I am trying to test the significance of the mean returns for the 6 month, 12 month, 24 month and 36 month horizons using a normal t statistic. How would i set this up to then do the matrix programming in IML?

Currently i have::

Firm Month BHAR
a 1 0.01
a 2 0.05
a 3 0.07
b 1 0.9
b 2 0.51
b 3 0.01
Rick_SAS
SAS Super FREQ

>  i have no experience with matrix programming and am not sure how to do it. How would i set this up to then do the matrix programming in IML?

 

The best way to gain experience is to start writing programs. I have provided an example. You need to read the observations for group 'a' into the X vector and read the observations with group 'b' into the Y vector:

 

use Have;
read all var {Firm Month BHAR};
close;

X = BHAR[ loc(Firm='a') ];
Y = BHAR[ loc(Firm='b') ];
print X Y;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 1215 views
  • 3 likes
  • 4 in conversation