----------------------------------------------------------------------------------------------- log: /Volumes/ecxs2/users/baum/crsp/327evstud4.smcl log type: smcl opened on: 3 Apr 2010, 21:11:56
. use 327evstud, clear
. su
Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- permno | 120040 73573.67 20615.54 10016 91581 permco | 120040 20760.68 13750.25 323 51428 date | 0 ret | 119658 .0008281 .036728 -.7 2.333333 caldt | 120040 16093.33 635.5842 14977 17164 -------------+-------------------------------------------------------- event_date | 120040 16102.33 371.4021 15013 17141 first_date | 120040 15098.66 352.4275 14977 17111 last_date | 120040 17083.34 307.1394 15022 17164 trday | 120040 684.4097 433.7066 1 1507 target | 107 565.5514 318.2292 13 1107 -------------+-------------------------------------------------------- td | 120040 690.1725 252.0905 13 1107 dif | 120040 -5.762862 449.3579 -1106 1121 yymmdd | 0 vwretd | 120040 .0002864 .0095211 -.0468039 .0530638
. // define the event and estimation windows . local wlo -2
. local whi 2
. local nevent = `whi' - `wlo' + 1
. local elo -60
. local ehi -30
. bys permno: g event_window = (dif >=`wlo' & dif <=`whi')
. egen count_event_obs = count(event_window), by(permno)
. bys permno: g est_window = (dif>=`elo' & dif <= `ehi')
. egen count_est_obs = count(est_window), by(permno)
. . // screen out firms with inadequate obs . drop if count_est_obs < abs(`elo') - abs(`ehi') (0 observations deleted)
. drop if count_event_obs < `whi' - `wlo' (0 observations deleted)
. . // estimate normal performance . g double predicted_return = . (120040 missing values generated)
. levelsof permno, local(keys) 10016 10550 11411 11581 12260 15667 26607 31051 42200 47248 48961 50876 51706 51960 57330 59010 > 59328 65307 67029 67300 67360 68742 73809 75465 75489 75897 76136 76148 76194 76224 76274 76 > 702 76900 77026 77855 77860 78193 78213 78807 78881 79610 79788 80169 80438 80478 80592 80812 > 81022 81499 81689 82727 82839 83414 83825 83923 83953 83956 84550 84648 84782 84808 85332 85 > 347 85482 85522 85706 86452 87096 87347 87429 87444 87521 87571 88219 88298 88580 88609 88860 > 88868 89009 89093 89156 89255 89335 89396 89436 89458 89681 89730 89810 89885 89990 90169 90 > 309 90331 90335 90514 90552 90644 90909 91090 91201 91202 91282 91381 91497 91581
. loc nf: word count `keys'
. di "nfirms: `nf'" nfirms: 107
. foreach f of local keys { 2. capt reg ret vwretd if permno==`f' & est_window 3. if _rc==0 { 4. tempvar rhat 5. qui predict double `rhat' if permno==`f' 6. qui replace predicted_return = `rhat' if permno==`f' & event_window 7. } 8. }
. . // calculate abnormal return and CAR, and test for significance . gen double abnormal = ret - predicted_return if event_window (119525 missing values generated)
. egen CAR = sum(abnormal) if event_window, by(permno) (119505 missing values generated)
. egen arsd = sd(abnormal) if event_window, by(permno) (119525 missing values generated)
. // test average AR = 0: (CAR/N) / semean, where semean = s / sqrt(N) . g test = (1/sqrt(`nevent')) * (CAR / arsd) (119525 missing values generated)
. g pval = 1-normprob(abs(test)) (119525 missing values generated)
. format test %7.2f
. format pval %5.4f
. format event_date %td
. sort test
. l permno event_date CAR test pval if dif==0 & test < ., noobs sep(0)
+-------------------------------------------------+ | permno event_d~e CAR test pval | |-------------------------------------------------| | 76702 09oct2002 -.0461067 -6.47 0.0000 | | 90552 26aug2005 -.0184955 -3.04 0.0012 | | 51960 14jul2004 -.0979993 -2.92 0.0017 | | 91282 18oct2006 -.0580511 -2.25 0.0124 | | 88860 03jun2004 -.0990096 -2.20 0.0137 | | 89436 23mar2005 -.0170175 -2.15 0.0159 | | 89396 16jul2003 -.0933287 -2.13 0.0166 | | 10550 25sep2003 -.1161364 -1.91 0.0281 | | 77855 27apr2005 -.0501787 -1.69 0.0454 | | 90169 02may2006 -.1548956 -1.65 0.0494 | | 84808 10jan2003 -.0732438 -1.61 0.0533 | | 81022 21may2003 -.0196086 -1.52 0.0642 | | 75897 11nov2003 -.0743261 -1.51 0.0656 | | 90309 26oct2005 -.0783687 -1.47 0.0710 | | 87444 13apr2004 -.0437653 -1.45 0.0733 | | 89990 28feb2006 -.0138769 -1.25 0.1047 | | 89156 07jun2005 -.0247691 -1.24 0.1084 | | 83414 04may2004 -.0242185 -1.23 0.1100 | | 80169 23feb2005 -.0370844 -1.09 0.1387 | | 57330 05feb2004 -.0276352 -1.08 0.1405 | | 11581 04mar2005 -.0247245 -0.93 0.1763 | | 80812 03may2005 -.0387972 -0.91 0.1804 | | 68742 03sep2004 -.0341616 -0.87 0.1917 | | 15667 09oct2002 -.0797633 -0.84 0.1995 | | 89255 28jun2002 -.0391066 -0.81 0.2101 | | 89458 10sep2003 -.0256764 -0.80 0.2115 | | 89730 13oct2004 -.0151168 -0.75 0.2279 | | 50876 08mar2005 -.0092315 -0.71 0.2394 | | 76900 17jul2001 -.0629941 -0.70 0.2433 | | 86452 05feb2003 -.0071572 -0.67 0.2501 | | 90514 17nov2005 -.0230865 -0.62 0.2669 | | 76194 21aug2002 -.0341284 -0.61 0.2704 | | 87521 16jun2004 -.0481931 -0.61 0.2709 | | 80478 09mar2004 -.0188547 -0.61 0.2724 | | 76224 28jan2004 -.0355708 -0.58 0.2801 | | 80592 23nov2004 -.0183787 -0.58 0.2802 | | 87571 20aug2003 -.045074 -0.57 0.2844 | | 79788 28jan2005 -.0109088 -0.56 0.2863 | | 91381 29sep2006 -.0201364 -0.53 0.2995 | | 87429 21mar2001 -.1006099 -0.52 0.3008 | | 89093 27sep2002 -.035091 -0.42 0.3375 | | 90335 12aug2005 -.0706395 -0.40 0.3462 | | 42200 28sep2004 -.009896 -0.33 0.3689 | | 87096 14nov2001 -.0478029 -0.32 0.3733 | | 12260 24jan2003 -.028681 -0.32 0.3734 | | 73809 16feb2005 -.010472 -0.30 0.3812 | | 79610 15aug2002 -.0457576 -0.30 0.3838 | | 89335 16dec2003 -.0139895 -0.23 0.4096 | | 78193 14jan2003 -.0105486 -0.08 0.4692 | | 78881 04apr2003 -.0009639 -0.07 0.4735 | | 48961 05nov2002 -.0020785 -0.05 0.4812 | | 91201 24oct2006 -.0007579 -0.04 0.4844 | | 85522 06feb2004 -.0016847 -0.03 0.4885 | | 59328 21jan2003 -.0003191 -0.01 0.4977 | | 26607 03dec2004 .000378 0.01 0.4977 | | 91090 13jun2006 .0036436 0.04 0.4839 | | 75465 23oct2003 .0005243 0.05 0.4812 | | 76148 27feb2004 .0045316 0.05 0.4782 | | 77026 28aug2003 .008725 0.12 0.4514 | | 75489 02apr2003 .0091465 0.19 0.4256 | | 90909 17mar2006 .008025 0.19 0.4249 | | 87347 20jun2002 .0371063 0.21 0.4177 | | 67360 31may2005 .00406 0.29 0.3862 | | 11411 07dec2004 .0216771 0.42 0.3380 | | 47248 28nov2003 .0084085 0.45 0.3246 | | 77860 22jul2003 .0230893 0.46 0.3231 | | 91202 29aug2006 .0313684 0.51 0.3064 | | 81499 26jan2005 .0277505 0.55 0.2916 | | 59010 28aug2002 .0154359 0.55 0.2896 | | 78213 09nov2004 .0895498 0.71 0.2400 | | 84550 02mar2001 1.921142 0.72 0.2350 | | 85347 15aug2003 .0279342 0.76 0.2230 | | 88868 27aug2002 .0294438 0.83 0.2044 | | 85482 21apr2004 .0376047 0.83 0.2032 | | 89810 20jan2005 .0507107 0.85 0.1972 | | 84782 07dec2001 .0596102 0.86 0.1948 | | 51706 18sep2003 .0169309 0.86 0.1939 | | 89885 28oct2005 .1426962 0.90 0.1830 | | 89009 12feb2003 .0069225 0.91 0.1804 | | 90644 20sep2005 .1561582 0.95 0.1710 | | 83825 06mar2001 .0457107 1.04 0.1494 | | 78807 06nov2001 .0138368 1.12 0.1314 | | 31051 11jan2005 .0502203 1.15 0.1251 | | 83953 03sep2003 .0461275 1.18 0.1190 | | 76274 26may2004 .0566912 1.20 0.1155 | | 88298 16mar2004 .020426 1.24 0.1083 | | 83923 22feb2005 .2178374 1.28 0.1010 | | 84648 08apr2003 .0801753 1.36 0.0876 | | 82839 14jul2004 .0797305 1.40 0.0806 | | 83956 22nov2002 .1759411 1.41 0.0797 | | 82727 19jul2002 .0988225 1.45 0.0732 | | 81689 15nov2001 .4840554 1.46 0.0715 | | 76136 15oct2003 .018411 1.65 0.0498 | | 88609 06jan2004 .0162659 1.76 0.0388 | | 80438 10oct2001 .1175528 1.77 0.0383 | | 90331 10nov2005 .0253384 1.81 0.0353 | | 88580 13apr2005 .1094759 1.82 0.0343 | | 88219 16may2003 .0071333 2.34 0.0096 | | 89681 27apr2005 .0219369 2.36 0.0092 | | 65307 11mar2003 .1585437 2.80 0.0025 | | 85706 14nov2002 .0806415 2.95 0.0016 | | 85332 30mar2004 .0193681 2.98 0.0014 | | 10016 21feb2001 .0473362 5.51 0.0000 | +-------------------------------------------------+
. . // tabstat abnormal if permno == 76702 & event_window, stat(N mean sd semean) . // ttest abnormal == 0 if permno == 76702 & event_window . . // test across all events . reg CAR if dif==0, robust
Linear regression Number of obs = 107 F( 0, 106) = 0.00 Prob > F = . R-squared = 0.0000 Root MSE = .20015
------------------------------------------------------------------------------ | Robust CAR | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | .0242587 .0193492 1.25 0.213 -.014103 .0626205 ------------------------------------------------------------------------------
. . log close log: /Volumes/ecxs2/users/baum/crsp/327evstud4.smcl log type: smcl closed on: 3 Apr 2010, 21:12:36 -----------------------------------------------------------------------------------------------