Hello Statalist Forum,
I've looked a lot on this forum to find a solution to my problem, but couldn't find it. I've tried to follow princeton event study manual, but sadly didn't work out as planned.
https://dss.princeton.edu/online_hel...ventstudy.html
Main idea:
I'm constructing an event study on abnormal returns around a publication date of a certain index. My data consist of aprox 263 companies with daily data for the last 9 years ( 2010-2018). In my data i've variables consisting of the estimation/event window ( t10 till t-160 ) and a year variable ( 2010 - 2018 ) so i can seperate the different event windows.
I'm trying to predict the normal return using the code stated below, but it keeps saying no observations. If i exclude the "year==2011", the normal return will be computed just fine but for the whole period, but i only want to predict it via the estimation window of that year.
Hopefully you guys can help me with this problem.
Many thanks
Regards Mathijs
I've looked a lot on this forum to find a solution to my problem, but couldn't find it. I've tried to follow princeton event study manual, but sadly didn't work out as planned.
https://dss.princeton.edu/online_hel...ventstudy.html
Main idea:
I'm constructing an event study on abnormal returns around a publication date of a certain index. My data consist of aprox 263 companies with daily data for the last 9 years ( 2010-2018). In my data i've variables consisting of the estimation/event window ( t10 till t-160 ) and a year variable ( 2010 - 2018 ) so i can seperate the different event windows.
I'm trying to predict the normal return using the code stated below, but it keeps saying no observations. If i exclude the "year==2011", the normal return will be computed just fine but for the whole period, but i only want to predict it via the estimation window of that year.
Hopefully you guys can help me with this problem.
Many thanks
Regards Mathijs
Code:
sum id_firm local N `r(max)' gen NR_MMM=. forvalues i = 1/`N'{ quietly reg r_firm r_mkt if (id_firm==`i' & t_event<-1 & t_event>-160 & year==2011) quietly predict r if id_firm==`i' quietly replace NR_MMM = r if (id_firm==`i' & year==2011) quietly drop r }
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(Date id_firm) double(r_firm r_mkt) int(t_event year) 19025 230 -.0025229357798165005 .0009238920203358916 -160 2012 19753 190 .04309623430962348 .008499461024778178 -160 2014 20481 55 .017344726437954334 -.013286579185272403 -160 2016 21216 29 -.0016835016835016834 -.0057290387665841274 -160 2018 20845 1 .004322766570605188 -.00041036062882888227 -160 2017 21216 101 -.029866781263429322 -.014070304515416828 -160 2018 19389 117 -.0008529629693450356 -.007311275622280882 -160 2013 20845 162 -.0005654509471304248 -.00041132637191249277 -160 2017 18654 253 .0031395348837210493 .0025931880654076122 -160 2011 19753 104 .0019767759762650966 .005542485169522096 -160 2014 20481 77 -.027538940809968857 -.0244139656425276 -160 2016 20481 29 -.0029585798816568047 -.009780698020322642 -160 2016 19025 64 .007498183259562601 .0009238920203358916 -160 2012 18654 240 -.008320852055250457 .003960798894399681 -160 2011 20845 96 .0012170821511255409 -.00041036062882888227 -160 2017 20845 86 -.0006589062156819929 -.0038222696951609016 -160 2017 19025 147 -.0018137847642080494 .0027320294821615754 -160 2012 19025 164 .0019557728636515385 -.000906108986788931 -160 2012 18290 195 -.02115320045175681 -.018229018996314128 -160 2010 20481 61 -.021164021164021184 -.034915054782913554 -160 2016 19025 191 -.003249573212734672 .0009238920203358916 -160 2012 20845 126 .003335804299481013 -.00041036062882888227 -160 2017 19025 228 . -.000906108986788931 -160 2012 19025 82 .006389776357827529 .0027320294821615754 -160 2012 20481 204 -.010085917071348524 -.009780698020322642 -160 2016 19025 34 -.0011225204294690466 .008704551203918855 -160 2012 20481 249 -.02539323234082064 -.013286579185272403 -160 2016 18654 212 .006600660066006601 -.0006918838506268181 -160 2011 18654 2 .011499336576736028 -.004645843539880874 -160 2011 19389 261 .0030651340996169017 .0004006551252724098 -160 2013 18290 102 -.011016949152542439 -.013671369723985602 -160 2010 21216 165 -.07318536292741461 -.03084133269141974 -160 2018 20845 92 .006963788300835654 -.0021383160402405842 -160 2017 18290 249 -.027441320246588963 -.01888664290653764 -160 2010 19389 5 -.04989571634846782 -.024451988473967307 -160 2013 19753 161 -.004789272030651408 -.0052465955687669465 -160 2014 20845 231 . -.00041036062882888227 -160 2017 21216 80 -.000961307378034106 -.003480714957667023 -160 2018 18654 109 -.01069804760631181 .0027684343119748623 -160 2011 18290 194 .009378746209717315 -.013748042633690364 -160 2010 21216 30 -.0198230088495574 -.0057290387665841274 -160 2018 20481 218 -.034782608695652195 -.013286579185272403 -160 2016 20845 181 . -.00041132637191249277 -160 2017 18290 80 -.006535947712418266 -.01412053152525962 -160 2010 20845 32 . .002033351334687284 -160 2017 20845 200 .005118534482758559 -.0021383160402405842 -160 2017 19389 139 -.004910852541697981 .0004006551252724098 -160 2013 19389 42 .0037240229431762203 -.007311275622280882 -160 2013 19753 149 -.00013314545030901345 .0039360675525585516 -160 2014 20481 152 . -.0244139656425276 -160 2016 20845 206 .0019074868860276585 .002137692174711363 -160 2017 20481 139 -.009038238702201636 -.020355222115953017 -160 2016 20481 22 -.028169014084507043 -.009780698020322642 -160 2016 19389 84 .02689486552567241 -.0035879254802366123 -160 2013 18654 114 -.0001436781609195729 -.0006918838506268181 -160 2011 19753 79 -.043214556482183364 .0039360675525585516 -160 2014 18654 235 .016705069124423995 .009586230130776991 -160 2011 19753 61 -.03406326034063263 .003833500022236543 -160 2014 19753 67 .006464445549477999 .005542485169522096 -160 2014 20845 125 -.021739130434782723 -.007281091070833001 -160 2017 18654 201 .011919241060569253 .003960798894399681 -160 2011 20481 52 . -.020355222115953017 -160 2016 18290 144 -.01512287334593574 -.017931964365187236 -160 2010 18290 21 -.009112939869743007 -.01412053152525962 -160 2010 21216 88 -.008610567514677198 .0014633901474704967 -160 2018 19389 166 -.0005540166204985835 -.00983273264947775 -160 2013 18290 228 .001288659793814433 -.004730396738467131 -160 2010 19025 122 -.010162656271004095 .0009238920203358916 -160 2012 18290 148 -.012016673450197206 -.01888664290653764 -160 2010 18654 193 . -.0006918838506268181 -160 2011 20845 57 -.011997658993367254 .003606625416629603 -160 2017 18654 261 .005048543689320432 -.004645843539880874 -160 2011 18290 180 -.001011122345803949 -.01412053152525962 -160 2010 21216 85 .007442849548112737 .0054546025170260515 -160 2018 20481 30 .011702986279257489 -.009780698020322642 -160 2016 18654 189 .003181818181818182 -.0006918838506268181 -160 2011 20481 240 -.019933774834437097 -.0244139656425276 -160 2016 19025 62 .00890906555522843 .0009238920203358916 -160 2012 18290 165 -.001082251082251059 .0038328423100025028 -160 2010 20845 242 -.008926717874195552 .003606625416629603 -160 2017 21216 78 -.004935834155972359 -.0057290387665841274 -160 2018 18654 202 .02214904157792387 .0027684343119748623 -160 2011 19025 32 .024425495013730182 .006152778451469831 -160 2012 21216 254 -.006703910614525076 -.014070304515416828 -160 2018 21216 249 -.019212598425196833 -.004994591320939908 -160 2018 19025 247 -.023809523809523808 .0009238920203358916 -160 2012 18654 56 . -.006934446479533244 -160 2011 19025 112 .0034812880765882634 .0007791305653860964 -160 2012 21216 69 -.014165390505359877 -.0057290387665841274 -160 2018 19025 240 -.0026423037305746363 .005892718963099062 -160 2012 20845 215 .00723589001447178 -.0021383160402405842 -160 2017 19389 184 -.005788712011577424 -.007311275622280882 -160 2013 20845 131 .00493177708367577 -.0021383160402405842 -160 2017 20845 78 .03596450256889304 -.00041036062882888227 -160 2017 20845 124 .017813971243160778 -.0021383160402405842 -160 2017 20845 127 . -.00041036062882888227 -160 2017 18290 91 .0052238805970148405 .002316134549601034 -160 2010 18654 236 .0015661707126076406 .013837415367837527 -160 2011 18290 67 -.017308524448290723 -.01888664290653764 -160 2010 18290 54 -.02000871742498713 -.01888664290653764 -160 2010 end format %tdnn/dd/CCYY Date
Comment