Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • test statistics issues in event study

    dear all, I'm recently doing an event study but i'm totally fresh to it, and can't figure out how test the significance of abnormal return in stata.

    particularly, my question is below:

    there is a common shock (like a tsunami)occurred in day 0 , and I use the market model to estimate the normal return based on day -244(244 days before the shock) to day - 10,

    then I calculated the abnormal return for day 0 to day 10, now what I want to test is whether the mean of abnormal return is statistically significant equal to 0.

    also the abnormal return and test statistics is calculated based on Stephen J.BROWN and Jerold B. WARNER 1985. below is a snapshot of the equation in this paper

    Click image for larger version

Name:	QQ截图20160430163817.png
Views:	1
Size:	96.5 KB
ID:	1338282



    the problem is how could I do the test in stata, I know there is a example in http://dss.princeton.edu/online_help...ventstudy.html

    but what confusing me is the calculation of standard deviation here, actually it's the standard deviation of the abnormal return of estimation window by equation (7) in the pic above.

    and I don think Stata could do this adjustment automatically , so I need your help to perform the test..


    any advice and suggestions would be appreciated.

    thanks !

  • #2
    If you have already tagged the event day with zero, the the following command should work for you
    Code:
    egen mean_abnormal_ri = mean(A /(day==0))
    egen sd_abnormal_ri=sd(A / (day>-245 & day<-6 ))
    gen test_stat = mean_abnormal_ri / sd_abnormal_ri
    If you need more detailed help, you can see this page http://www.opendoors.pk/home/paid-he...irical-finance
    Last edited by Attaullah Shah; 30 Apr 2016, 13:12.
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      Originally posted by Attaullah Shah View Post
      If you have already tagged the event day with zero, the the following command should work for you
      Code:
      egen mean_abnormal_ri = mean(A /(day==0))
      egen sd_abnormal_ri=sd(A / (day>-245 & day<-6 ))
      gen test_stat = mean_abnormal_ri / sd_abnormal_ri
      If you need more detailed help, you can see this page http://www.opendoors.pk/home/paid-he...irical-finance

      Thanks for your response Attaullah, I didn't describe my problem very clear. Now what I want to do is test the significance of abnormal return for an individual company in a time interval, say ten days (day 0 to day 9), so equation(6) in the attached pic is actually time series aggregation rather than cross sectional aggregation in my case.


      and what confuse me here is , take your code as an example, A here is the cumulative abnormal return in the ten days event window, so mean(A) is just an real number for each company, right?

      so the test_stat is also a single real number for each company, then how could I test the significance of a given single number?

      or I'm wrong at somewhere but I didn't realize yet?

      below is the code for my case

      Code:
      gen event_date = date("2008/5/12", "YMD")
      gen Trddt_date  = date(Trddt, "YMD")
      format Trddt_date %td 
      gen dif = Trddt_date - event_date
      //destring Stkcd, replace
      
      bys Stkcd: gen event_window = 1 if dif >=0 & dif <= 30
      
      egen count_event_obs = count(event_window), by (Stkcd)
      
      bys Stkcd: gen estimation_window = 1 if  dif <= -10
      
      egen count_est_obs = count(estimation_window), by (Stkcd)
      
      replace event_window =0 if event_window ==.
      replace estimation_window =0 if estimation_window ==.
      
      drop if count_event_obs < 8
      
      drop if count_est_obs < 40
      sort Stkcd Trddt_date
       
      gen Predict_Dretwd=.
      gen Ab_return_OLS =.
      
      
      egen id = group(Stkcd)
      qui su id, mean
      
      //market model
      forvalues i = 1(1)`=r(max)' {
         l id Stkcd if id ==`i' & dif ==0
         qui reg Dretwd Cdretwdeq if id ==`i' & estimation_window ==1
         predict p if id ==`i'
         replace Predict_Dretwd = p if id ==`i' 
         drop p
         replace Ab_return_OLS = Dretwd - Predict_Dretwd if id ==`i' 
         
       }
      bys id: egen ave_Ab_return_OLS = total (Ab_return_OLS*event_window)
      bys id: replace ave_Ab_return_OLS  = ave_Ab_return_OLS /count_event_obs   
      bys id: egen ave_Ab_return_OLS_est = total (Ab_return_OLS*estimation_window)
      bys id: replace ave_Ab_return_OLS_est  = ave_Ab_return_OLS /count_est_obs  
      
      //mean adjusted model
      sort id Trddt_date
      bys id: egen R_bar_mean = total (Dretwd) if estimation_window ==1
      bys id: replace R_bar_mean = R_bar_mean /count_est_obs
      qui su R_bar_mean, mean
      bys id: replace R_bar_mean = r(mean) 
      bys id: gen Ab_return_mean = Dretwd - R_bar_mean
      bys id: egen ave_Ab_return_mean =  total (Ab_return_mean*event_window )
      bys id: replace ave_Ab_return_mean = ave_Ab_return_mean /count_event_obs
      bys id: egen ave_Ab_return_mean_est =  total (Ab_return_mean*estimation_window)
      bys id: replace ave_Ab_return_mean_est = ave_Ab_return_mean /count_est_obs
      
      //market adjusted model
      sort id Trddt_date
      bys id: gen Ab_return_market = Dretwd - Cdretwdeq 
      bys id: egen ave_Ab_return_market = total( Ab_return_market*event_window) 
      bys id: replace ave_Ab_return_market = ave_Ab_return_market/count_event_obs
      bys id: egen ave_Ab_return_market_est = total( Ab_return_market*estimation_window)
      bys id: replace ave_Ab_return_market_est = ave_Ab_return_market/count_est_obs
      
      
      
      //generate test statistics for each model
      
        // mean adjusted model
      bys id: egen SD_mean = total((Ab_return_mean - ave_Ab_return_mean_est)^2*estimation_window) 
      bys id: replace SD_mean = sqrt(SD_mean/(count_est_obs-1))
      
        // market adjusted model
      bys id: egen SD_market = total((Ab_return_market - ave_Ab_return_market_est)^2*estimation_window) 
      bys id: replace SD_market = sqrt(SD_market/(count_est_obs-1))  
      
        // market model
      bys id: egen SD_OLS = total((Ab_return_OLS - ave_Ab_return_OLS_est)^2*estimation_window) 
      bys id: replace SD_OLS = sqrt(SD_OLS/(count_est_obs-1))  
      
      bys id: gen test_mean = Ab_return_mean/SD_mean
      bys id: gen test_market = Ab_return_market/SD_market
      bys id: gen test_OLS = Ab_return_OLS/SD_OLS
      
      
      
      gen Gcircle_id = .
      destring Gcircle_dis,replace force
      
      //egen Max_Gcircle_dis = max(Gcircle_dis)
      
      forvalues i = 1(1)2{
         replace Gcircle_id = `i' if Gcircle_dis >250*(`i' -1)& Gcircle_dis <=250*`i'
         ttest test_market ==0 if Gcircle_id == `i' & event_window==1
      }
      
      forvalues i = 3(1)6{
         replace Gcircle_id = `i' if Gcircle_dis >500*(`i' -1)& Gcircle_dis <=500*`i'
         ttest test_market==0 if Gcircle_id == `i' & event_window==1
      }
      
      
      
      qui su id, mean
      forvalues i = 1(1)`=r(max)' {
         ttest test_OLS ==0 if id == `i' & event_window==1   
       }
      save "E:\Research\eventstudy\erath quake\wenchuan\individual share\all.dta", replace

      Comment

      Working...
      X