事件研究法——stata实现并购的超额回报率计算
耗时三天来研究这一问题(其中一天用于等待回归分析进度确实较为缓慢),最终理清了思路并掌握了如何利用市场模型对一个公司发生的多个事件进行超额回报率计算。
在Stata软件中实现了上述方法(参考普林斯顿大学提供的指导性教程https://dss.princeton.edu/online_help/stats_packages/stata/eventstudy.html):
使用公司ID进行合并操作,并从日个股收益率07_19_total_merge.dta中导入数据
*2. 对数据进行处理以生成dif文件;由于一个公司通常会涉及多个事件,因此必须对多个变量进行排序,其中firstdeclaredate字段代表并购交易的首次公告日期
按公司ID、首次登记日期及日期字段排序;按公司ID及首次登记日期分组,并生成记录序号;在上述分组下,在首次登记日期时为每个记录分配序号;计算每个公司及其首次登记日期下的最小目标值;删除临时变量target;计算记录序号与最小目标值的差值
设定时间窗口
within companyid and firstdeclaredate, generate event_window as 1 when the difference falls within -1 to 1.
count the number of observations within this window using egen.
within the same group, generate estimation_window as 1 for differences between -150 and -30.
count observations in the estimation window.
replace missing values in both windows with zeros.
list companies where event window has fewer than three observations.
examine companies with less than 120 estimates in the estimation window.
drop these cases from analysis.
估算事件期间的标准薪酬水平 set more off /_ 这一命令的作用是阻止Stata在每屏输出后暂停 */
生成预测回报率变量。
根据公司ID和首次宣布日期分组生成id变量。
注:在为每个公司ID分组后,请确保考虑到同一公司中多个事件的情况。
循环遍历id值从1到8。
注意:将循环上限替换为实际最大id值。
列出当前组中的公司ID及其diff值为0的数据点,并在此基础上进行回归分析。
预测当前组中的事件窗口内的回报率并存入预测变量p中;之后删除该组的数据。
*5. 计算非正常收益率及累积非正常收益率
按id和日期进行排序
生成变量abnormal_return,并在事件窗口为1的情况下将其设为dretwd减去predicted_return
通过按id分组并使用egen指令生成累积的non-abnormal return变量。
*6. Conduct significance testing
Sort entities by their ID and date
Group by ID and compute the standard deviation of abnormal return using egen
Calculate the test statistic as (1 divided by the square root of 3) multiplied by (cumulative abnormal return divided by the group standard deviation)
List company ID, first declaration date, cumulative abnormal return, and test statistic when dif equals zero
该查询输出结果文件名字段为output事件ID字段为Main_institutionID机构ID字段为companyID首次申告日期字段为firstdeclaredate累计异常回报率字段为cumulative_abnormal_return测试字段使用stats.csv进行计算当dif等于0时输出标记名称
*8.对整个事件做稳健性检验
reg cumulative_abnormal_return if dif==0, robust
