{"id":16275,"date":"2021-08-31T02:41:44","date_gmt":"2021-08-30T18:41:44","guid":{"rendered":"https:\/\/www.tejwin.com\/?post_type=insight&#038;p=16275"},"modified":"2026-02-03T17:12:37","modified_gmt":"2026-02-03T09:12:37","slug":"event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns","status":"publish","type":"insight","link":"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/","title":{"rendered":"Event Study \u2014 The Announcement Impact of Seasoned Equity Offerings on Stock Returns"},"content":{"rendered":"\n<p>Use python and TEJ database to execute event study<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter caption-align-center\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0irn7X2VhEGKO5xez.jpg\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Photo Creds:&nbsp;<a href=\"https:\/\/unsplash.com\/photos\/ESsGNnhUiCg\" rel=\"noreferrer noopener\" target=\"_blank\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e1ab8f1ba52\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e1ab8f1ba52\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#Preface\" >Preface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#The_Editing_Environment_and_Modules_Required\" >The Editing Environment and Modules Required<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#The_Highlights_of_the_Article\" >The Highlights of the Article<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#Database_Used\" >Database Used<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#Issuance_of_Common_Stocks_for_TSE-Listed_Firms\" >Issuance of Common Stocks for TSE-Listed Firms<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#Event_Study_%E2%80%94_Data_Sorting\" >Event Study \u2014 Data Sorting<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#Event_Study_%E2%80%94_Visualization_and_Statistical_Tests\" >Event Study \u2014 Visualization and Statistical Tests<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/#Related_Link\" >Related Link<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"2f4e\"><span class=\"ez-toc-section\" id=\"Preface\"><\/span><strong>Preface<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"e1cb\">Seasoned equity offerings is a common financing option for listed firms, and the purpose of it includes<strong>&nbsp;expansion of capital expenditures, retirement of debts and improvement of financial structure<\/strong>. However, previous literature has implied that this borrowing behavior tends to send negative signals to the market, leading to stock prices plummeting at the date of announcement.<\/p>\n\n\n\n<p id=\"534a\">Event study is a statistical method that analyzes the impact of important corporate events(M&amp;A, SEO, stock buyback\u2026) or economic shocks(regulation change, policy, macroeconomic conditions\u2026) on firms\u2019 value. Basically, event study consists of the following steps: event date confirmation, definition of estimation window and event window, calculation of abnormal return and statistical test. Therefore, this week, we will verify whether this negative announcement effect also happens in the Taiwan stock market by adopting the TEJ API database and event study approach !<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"81c9\"><span class=\"ez-toc-section\" id=\"The_Editing_Environment_and_Modules_Required\"><\/span><strong>The Editing Environment and Modules Required<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"7e81\">We use Windows OS and Jupyter Notebook in this article<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import tejapi<br>import pandas as pd<br>import numpy as np<br>import matplotlib.pyplot as plt<br>from sklearn.linear_model import LinearRegression<br>from scipy import stats<br>tejapi.ApiConfig.api_key = 'Your Key'<br>tejapi.ApiConfig.ignoretz = True<\/pre>\n\n\n\n<p id=\"3f84\"><em>Note: sklearn.linear_model is used for regression\uff1bscipy is for statistical test<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"f387\"><span class=\"ez-toc-section\" id=\"The_Highlights_of_the_Article\"><\/span><strong>The Highlights of the Article<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Obtain common stocks issuance events<\/li>\n\n\n\n<li>Execute event study<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"8013\"><span class=\"ez-toc-section\" id=\"Database_Used\"><\/span><strong>Database Used<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.tej.com.tw\/columns.html?idCode=TWN%2FANPRCSTD\" rel=\"noreferrer noopener\" target=\"_blank\">Security Characteristics Document<\/a>: the code of the database is \u2018TWN\/ANPRCSTD\u2019, covering the code of listed firms<\/li>\n\n\n\n<li><a href=\"https:\/\/api.tej.com.tw\/columns.html?idCode=TWN%2FASTK1&amp;t=%E5%8F%B0%E7%81%A3%E8%B3%87%E6%96%99%E5%BA%AB\" rel=\"noreferrer noopener\" target=\"_blank\">Formation of Capital<\/a>: the code of the database is \u2018TWN\/ASTK1\u2019, containing SEO and capital reduction information<\/li>\n\n\n\n<li><a href=\"https:\/\/api.tej.com.tw\/columndoc.html?subId=42\" rel=\"noreferrer noopener\" target=\"_blank\">Unadjusted Stock Price<\/a>: the code of the database is \u2018TWN\/APRCD\u2019, including the stock price of listed firms<\/li>\n\n\n\n<li><a href=\"https:\/\/api.tej.com.tw\/columndoc.html?subId=180\" rel=\"noreferrer noopener\" target=\"_blank\">Fama&amp;French Factors<\/a>: the code of the database is \u2018TWN\/AFACTO1D\u2019, which have Fama&amp;French factors portfolio return.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2fac\"><span class=\"ez-toc-section\" id=\"Issuance_of_Common_Stocks_for_TSE-Listed_Firms\"><\/span><strong>Issuance of Common Stocks for TSE-Listed Firms<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"e5a6\"><strong>Step 1.&nbsp;Get the codes of TSE-listed firms, then save in list&nbsp;<code>tse_stocks<\/code><\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">security = tejapi.get('TWN\/ANPRCSTD',<br>                mkt = 'TSE',<br>                stypenm = '\u666e\u901a\u80a1',<br>                opts = {'columns':['coid','mdate','stypenm','mkt']},<br>                paginate = True,<br>                chinese_column_name = True)<br>tse_stocks = security['\u8b49\u5238\u78bc'].tolist()<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"9bbf\"><strong>Step 2.&nbsp;Obtain the events of listed firms<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">events = tejapi.get('TWN\/ASTK1',<br>               x_mt_date = {'gte':'2019-01-01', 'lte':'2021-08-01'},<br>               opts = {'columns':['coid','cash','x_mt_date']},<br>               paginate = True,<br>               chinese_column_name = True)<\/pre>\n\n\n\n<p id=\"4d15\">This article will treat&nbsp;<strong>the date of resolution of shareholders\u2019 meeting<\/strong>&nbsp;as event day. The event day falls between January 2019 ~ August 2020<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0lxFEeLEcuOE9iDSj.png\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">cash = events[events['\u73fe\u91d1\u589e\u8cc7(\u4edf\u80a1)']&gt;0].reset_index(drop=True)<\/pre>\n\n\n\n<p id=\"35f1\">We only need&nbsp;<strong>issuance of common stock for cash<\/strong>, instead of earnings or capital surplus transferred to common stock<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0Q1zbjpcJjpbzkYze.png\" alt=\"\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"e98b\"><strong>Step 3.&nbsp;Select&nbsp;TSE-listed&nbsp;firms\u2019 events<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">tse_cash = cash[cash['\u516c\u53f8'].isin(tse_stocks)].reset_index(drop=True)<\/pre>\n\n\n\n<p id=\"984d\">Combined with TSE-listed firms\u2019 code&nbsp;<code>tse_stocks<\/code>&nbsp;and&nbsp;<code>isin()<\/code>,we finally obtain issuance of common stock for cash event only for TSE-listed firms<strong>&nbsp;<\/strong><code>tse_cash<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0kz8rQ4IY1YumXF1Y.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"54af\"><span class=\"ez-toc-section\" id=\"Event_Study_%E2%80%94_Data_Sorting\"><\/span><strong>Event Study \u2014 Data Sorting<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter caption-align-center\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0ULPaVjmw_BLzl8ju.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Photo Creds:\u00a0<a href=\"https:\/\/www.uvic.ca\/socialsciences\/economics\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">University of Victoria<\/a><\/figcaption><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"b132\"><em>Estimation window(T0~T1): -260~-10 periods is set. The actual returns in this period will be regressed on Fama &amp; French factor-based portfolio return, which yields the coefficient estimates that will be used to calculate expected return within event window<\/em><\/p>\n\n\n\n<p id=\"9c76\"><em>Event day (0): the date of resolution of shareholders\u2019 meeting, since it\u2019s the earliest signal for SEO sent to market<\/em><\/p>\n\n\n\n<p id=\"8076\"><em>Event window(T2~T3): -5 ~ +5 periods.&nbsp;<\/em><mark><em>The&nbsp;<\/em><\/mark><em>difference between actual return and expected return predicted by Fama &amp; French model is so-called abnormal return<\/em><\/p>\n<\/blockquote>\n\n\n\n<p id=\"38b0\">Because we include 140 events of common stocks issuance, each loop is used to cope with each event, and the output will be stored in variable&nbsp;<code>final<\/code>&nbsp;. We also exclude some events that lack data or belong to initial public offerings. In the following section, we select some important parts of codes within the loop to interpret and take the first event<strong>&nbsp;( stock = \u20181314\u2019, date = \u20182019\u201305\u201324\u2019 )&nbsp;<\/strong>as an example to show what\u2019s going on in each loop. Other parts of codes can be viewed in source code<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Obtain adequate returns<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">return_set = tejapi.get('TWN\/APRCD',<br>                      coid = stock,<br>                      mdate = {'gte': date + pd.Timedelta(days =     <br>                      -450), 'lte': date + pd.Timedelta(days = 25)}, <br>                      opts = {'columns' : ['coid', 'mdate','roi']},<br>                      paginate = True,<br>                      chinese_column_name = True)<\/pre>\n\n\n\n<p id=\"4cf0\">Each event has a unique combination of firm code&nbsp;<code>stock&nbsp;<\/code>and event date&nbsp;<code>date<\/code>&nbsp;, which are used to obtain return around event day. Here we choose the returns of 450 days before the event date and 25 days after the event date to make sure we\u2019ll have complete return in estimation window(251&nbsp;<strong>trading days<\/strong>) and event window(11&nbsp;<strong>trading days<\/strong>)<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0Ryjz2S-nkeD6jhTd.png\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Split off the return of estimation window and event window respectively<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">event_index = return_set[return_set['\u5e74\u6708\u65e5'] == date].index.values.astype(int)[0]<\/pre>\n\n\n\n<p id=\"0e3f\">First of all, the event date\u2019s index should be&nbsp;<strong>used as a basis<\/strong>&nbsp;to split two windows<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">estimate_window = return_set[event_index - 260 - 1: event_index - 10].reset_index(drop=True)<br>event_window = return_set[event_index - 5: event_index + 5 + 1].reset_index(drop=True)<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0NgonG9OwpABS8mNy.png\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Find the corresponding Fama &amp; French factor-based return<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">#\u4f30\u8a08\u8d77\u59cb\u65e5\u671f(-260)<br>estimate_start = estimate_window.loc[0, '\u5e74\u6708\u65e5']<br>#\u4e8b\u4ef6\u7d50\u675f\u65e5\u671f(+5) <br>event_end = event_window.loc[5*2, '\u5e74\u6708\u65e5']<\/pre>\n\n\n\n<p id=\"377b\">For starters, we need to find the beginning date of the estimation window and the last date of the event window. Then based on the two dates, we directly obtain the daily portfolio return of&nbsp;<strong>market risk premium, size premium, book-to-market premium, profitability and investment factors<\/strong>.&nbsp;<code>Y9999&nbsp;<\/code>means the above returns are based on TSE-listed firms and belong to simple return<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fama_french = tejapi.get('TWN\/AFACTO1D',<br>                   coid = 'Y9999',<br>                   mdate = {'gte':estimate_start, 'lte': event_end}, <br>                   opts = {'columns': ['coid', <br>                   'mdate','mrp','smbn','bp','op','inv']},<br>                   paginate = True,<br>                   chinese_column_name = True)<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0hiRUw3sno2-Qr3qN.png\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Estimate the coefficient of factors<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">ols_data = estimate_window.merge(fama_french, on = '\u5e74\u6708\u65e5')<br>x = ols_data.loc[:,['\u5e02\u5834\u98a8\u96aa\u6ea2\u916c', '\u898f\u6a21\u6ea2\u916c(5\u56e0\u5b50)','\u6de8\u503c\u5e02\u50f9\u6bd4\u6ea2\u916c','\u76c8\u5229\u80fd\u529b\u56e0\u5b50','\u6295\u8cc7\u56e0\u5b50']].values<br>y = ols_data['\u5831\u916c\u7387\uff05'].values.reshape(-1,1)<br>model = LinearRegression()<br>model.fit(x,y)<\/pre>\n\n\n\n<p id=\"f974\">After&nbsp;<strong>combining estimation return and Fama-French portfolio return<\/strong>, we convert them into two-dimensional array variables which are required in a linear model. Finally, put dependent variable and independent variable in the model<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0UJqysF_V_KiunMK.png\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Calculate abnormal return<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">predict_data = event_window.merge(fama_french, on = '\u5e74\u6708\u65e5')    <br>event_x = predict_data.loc[:,['\u5e02\u5834\u98a8\u96aa\u6ea2\u916c','\u898f\u6a21\u6ea2\u916c(5\u56e0\u5b50)','\u6de8\u503c\u5e02\u50f9\u6bd4\u6ea2\u916c','\u76c8\u5229\u80fd\u529b\u56e0\u5b50','\u6295\u8cc7\u56e0\u5b50']].values<\/pre>\n\n\n\n<p id=\"f640\">Here we combine the&nbsp;<strong>event window return with Fama &amp; French portfolio return<\/strong>, and store the factor-based portfolio returns to be independent variables to get the expected return by putting them in fitted model&nbsp;<code>model.predict()<\/code>&nbsp;. The next step is to calculate the abnormal returns, cumulative returns and add one more columns to indicate the relative day<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">event_window['\u9810\u671f\u5831\u916c\u7387'] = model.predict(event_x)<br>event_window['\u7570\u5e38\u5831\u916c\u7387'] = event_window['\u5831\u916c\u7387\uff05'] - event_window['\u9810\u671f\u5831\u916c\u7387'] <br>event_window['\u7d2f\u8a08\u7570\u5e38\u5831\u916c\u7387'] = event_window['\u7570\u5e38\u5831\u916c\u7387'].cumsum()    <br>event_window['\u76f8\u5c0d\u5929\u6578'] = [i for i in range(-5, 5 + 1)]<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0iCC4_Zf98rasrJJk.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"bf32\">Each loop will keep repeating the above steps and the output will be added in&nbsp;<code>final&nbsp;<\/code>table, as the following shown<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/06UUsHGxtRvyd2pHE.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"645c\"><span class=\"ez-toc-section\" id=\"Event_Study_%E2%80%94_Visualization_and_Statistical_Tests\"><\/span><strong>Event Study \u2014 Visualization and Statistical Tests<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Calculate the average abnormal returns and cumulative abnormal returns<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">sorted_data = final.groupby(by = '\u76f8\u5c0d\u5929\u6578').mean().reset_index()<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/07Ww_cvPiZ6Y2cOju.png\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visualization<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">plt.plot(sorted_data['\u76f8\u5c0d\u5929\u6578'], sorted_data['\u7570\u5e38\u5831\u916c\u7387'], label = 'Average Abnormal Retrun')<br>plt.plot(sorted_data['\u76f8\u5c0d\u5929\u6578'], sorted_data['\u7d2f\u8a08\u7570\u5e38\u5831\u916c\u7387'], label = 'Cumulative Abnormal Return')<br>plt.xlabel('Event Day')<br>plt.title('Event Study')<br>plt.xticks(np.arange(-5, 5+1 , 1)) <br>plt.legend()<br>plt.show()<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/0lR6XKMZlwPd-rDW8.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"1069\">As you can see, there\u2019s<strong>&nbsp;apparently negative abnormal return<\/strong>&nbsp;one or two days after the event day. However, the abnormal return reverses back around zero afterwards, which imply the market might already digest the information<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Statistical test<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">ttest = pd.DataFrame()<br>for day in range(-5,5+1): <br>    sample = final[final['\u76f8\u5c0d\u5929\u6578'] == day]['\u7570\u5e38\u5831\u916c\u7387'].values<br>    t, p_value = stats.ttest_1samp(sample, 0)<br>    if p_value &lt;= 0.01:<br>        significance = '***'<br>    elif 0.01 &lt; p_value &lt;= 0.05:<br>        significance = '**'<br>    elif 0.05 &lt; p_value &lt;= 0.1:<br>        significance = '*'<br>    else:<br>        significance = ''  <br>    ttest = ttest.append(pd.DataFrame(np.array([day,t,p_value, significance]).reshape((1,4)), columns = ['\u76f8\u5c0d\u5929\u6578','T\u6aa2\u5b9a\u503c', 'P-value','\u986f\u8457\u6c34\u6e96'],)).reset_index(drop=True)ttest = ttest.set_index('\u76f8\u5c0d\u5929\u6578')<\/pre>\n\n\n\n<p id=\"1d4e\">We use&nbsp;<code>stats.ttest_lsamp()<\/code>&nbsp;to carry out T-tests to examine whether the daily abnormal return is&nbsp;<strong>significantly different from zero<\/strong>. We also add one more significance star column based on p-value<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/04sSnCIj53CKevpMk.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"3532\">Therefore, we can prove that the announcement of SEO&nbsp;<strong>does significantly impact firms\u2019 value<\/strong>. The reason for not impacting the return at the event date may result from firms usually declaring important issues after the stock market closes<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"f8ba\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"5afd\">After today\u2019s introduction, we believe readers have more understanding of event study! Actually still lots of assumptions we proposed in this article can be adjusted based on previous literature or event characteristics, such as estimation and event window or the methods to calculate the abnormal return. To execute event study more efficiently, we highly recommend TEJ API databases as we use in this article given its quality and variety without wasting time on data crawling and cleaning. If readers are interested in observing other events\u2019 impact on firms\u2019 value, welcome to the&nbsp;<a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/index\" target=\"_blank\" rel=\"noreferrer noopener\">TEJ E Shop<\/a>&nbsp;to purchase the data that satisfy your need!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5a07\"><span class=\"ez-toc-section\" id=\"Related_Link\"><\/span><strong>Related Link<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.tej.com.tw\/index.html\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ API<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_intro\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ E-Shop<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Use python and TEJ database to execute event study Preface Seasoned equity offerings is a common financing option for listed firms, and the purpose of it includes&nbsp;expansion of capital expenditures, retirement of debts and improvement of financial structure. However, previous literature has implied that this borrowing behavior tends to send negative signals to the market, [&hellip;]<\/p>\n","protected":false},"featured_media":16276,"template":"","tags":[3161,3536,3008],"insight-category":[690,50],"class_list":["post-16275","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-corporate-events","tag-eventstudy","tag-tejapi-quant","insight-category-data-analysis","insight-category-fintech"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight"}],"about":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/types\/insight"}],"version-history":[{"count":1,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16275\/revisions"}],"predecessor-version":[{"id":23375,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16275\/revisions\/23375"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media\/16276"}],"wp:attachment":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media?parent=16275"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/tags?post=16275"},{"taxonomy":"insight-category","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight-category?post=16275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}