{"id":16691,"date":"2022-01-18T02:33:13","date_gmt":"2022-01-17T18:33:13","guid":{"rendered":"https:\/\/www.tejwin.com\/?post_type=insight&#038;p=16691"},"modified":"2024-07-03T17:37:49","modified_gmt":"2024-07-03T09:37:49","slug":"performance-of-taiex-during-chinese-new-year","status":"publish","type":"insight","link":"https:\/\/www.tejwin.com\/en\/insight\/performance-of-taiex-during-chinese-new-year\/","title":{"rendered":"Performance of TAIEX during Chinese New Year"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/14uSkr2BItbyKGATvbHvOHw.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Return of TAIEX before &amp; after Market Closure Period<\/p>\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-69f7e66612f2f\" 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-69f7e66612f2f\"  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\/performance-of-taiex-during-chinese-new-year\/#Highlights\" >Highlights<\/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\/performance-of-taiex-during-chinese-new-year\/#Preface\" >Preface<\/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\/performance-of-taiex-during-chinese-new-year\/#Editing_Environment_and_Modules_Required\" >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-4\" href=\"https:\/\/www.tejwin.com\/en\/insight\/performance-of-taiex-during-chinese-new-year\/#Database\" >Database<\/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\/performance-of-taiex-during-chinese-new-year\/#Performance_of_TAIEX\" >Performance of TAIEX<\/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\/performance-of-taiex-during-chinese-new-year\/#Event_Study_%E2%80%94_Pre_Closure\" >Event Study \u2014 Pre Closure<\/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\/performance-of-taiex-during-chinese-new-year\/#Conclusion\" >Conclusion<\/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\/performance-of-taiex-during-chinese-new-year\/#Source_Code\" >Source Code<\/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\/performance-of-taiex-during-chinese-new-year\/#Extended_Reading\" >Extended Reading<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.tejwin.com\/en\/insight\/performance-of-taiex-during-chinese-new-year\/#Related_Link\" >Related Link<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"da67\"><span class=\"ez-toc-section\" id=\"Highlights\"><\/span><strong>Highlights<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Difficulty\uff1a\u2605\u2605\u2606\u2606\u2606<\/li>\n\n\n\n<li>Analyze return of TAIEX before &amp; after market closure since 2008 and apply Event Study to discuss stocks with significant anomaly return.<\/li>\n\n\n\n<li>Reminder\uff1aIf you are not familiar with event study, please read\u00a0<a href=\"https:\/\/medium.com\/tej-api-financial-data-anlaysis\/quant-6-event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns-7099cca259c4\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\">\u3010Quant(6)\u3011 Event Study \u2014 The Announcement Impact of Seasoned Equity Offerings on Stock Returns<\/a>\u00a0so as to understand fundamentals of this method.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"28ff\"><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=\"d079\">Chinese New Year is the most important festival of Chinese society. Traditionally, it is the genuine year-end. Stock market participants would conclude market performance in past year and begin the project targeting upcoming year. Therefore, this article would take Chinese New Year as the subject, discussing the performance of TAIEX during this period. To boot, we would apply event study on individual stocks and take past-and-upcoming 5 day as the event period so as to calculate the anomaly return.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"a2d3\"><strong><em>Note\uff1aStocks that this article mentions are just for the discussion, please do not consider it to be any recommendations or suggestions for investment or products.<\/em><\/strong><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"8b3c\"><span class=\"ez-toc-section\" id=\"Editing_Environment_and_Modules_Required\"><\/span><strong>Editing Environment and Modules Required<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"502e\">MacOS &amp; Jupyter Notebook<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Basic<br>import pandas as pd<br>import numpy as np# Statistics Calculation<br>from sklearn.linear_model import LinearRegression<br>from scipy import stats# TEJ API<br>from datetime import datetimeimport tejapi<br>tejapi.ApiConfig.api_key = 'Your Key'<br>tejapi.ApiConfig.ignoretz = True<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"94bc\"><span class=\"ez-toc-section\" id=\"Database\"><\/span><strong>Database<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"2490\"><a href=\"https:\/\/api.tej.com.tw\/columns.html?idCode=TWN%2FAPRCD\" rel=\"noreferrer noopener\" target=\"_blank\">Unadjusted Stock Price(daily)<\/a>\uff1aListed securities with unadjusted price and index. Code is \u2018TWN\/APRCD\u2019.<\/p>\n\n\n\n<p id=\"23ae\"><a href=\"https:\/\/api.tej.com.tw\/columns.html?idCode=TWN%2FANPRCSTD\" rel=\"noreferrer noopener\" target=\"_blank\">Security Attribute<\/a>\uff1aListed securities with industry domain. Code is \u2018TWN\/ANPRCSTD\u2019.<\/p>\n\n\n\n<p id=\"52c6\"><a href=\"https:\/\/api.tej.com.tw\/columns.html?idCode=TWN%2FAIND\" rel=\"noreferrer noopener\" target=\"_blank\">Security Basic Information<\/a>\uff1aListed securities with basic information. Code is \u2018TWN\/AIND\u2019.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5c78\"><span class=\"ez-toc-section\" id=\"Performance_of_TAIEX\"><\/span><strong>Performance of TAIEX<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"ba80\"><strong>Step 1. Data Selection<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">twn = tejapi.get('TWN\/APRCD',<br>                coid = 'Y9997',<br>                mdate = {'gte': '2008-01-01', 'lte':'2021-03-30'},<br>                opts = {'columns':['mdate', 'roia']},<br>                paginate = True,<br>                chinese_column_name = True)<\/pre>\n\n\n\n<p id=\"f17f\">We get Return Index(Y9997) and set the period from 2008\/01\/01 to 2021\/03\/31 so as to ensure that it covers all the Chinese New Year period in each year.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1y7UqH2n50ymdkoymmLNyLg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"1963\"><strong>Step 2. Import Last Trading Date before Market Closure &amp; Match It with Date of Market Data<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Last trading date in every year <br>last_day = ['2008-02-01', '2009-01-21', '2010-02-10', '2011-01-28', '2012-01-18', '2013-02-06', '2014-01-27', '2015-02-13', '2016-02-03', '2017-01-24', '2018-02-12', '2019-01-30', '2020-01-20', '2021-02-05']# Ensure that last_day is \"date\" data type. We transfer it to datetime item.<br>last_day = [datetime.fromisoformat(i) for i in last_day]# Match last trading date with market data<br>date = []<br>for i in last_day:<br>    date.append(int(twn[twn['\u5e74\u6708\u65e5'] == i].index.values))<\/pre>\n\n\n\n<p id=\"ecbe\"><strong>Step 3. Calculate Return of market closure date along with pre-and-post 15 and 5 day period.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">market = pd.DataFrame(columns = ['\u524d\u5341\u4e94\u65e5\u7d2f\u8a08\u5831\u916c', '\u524d\u4e94\u65e5\u7d2f\u8a08\u5831\u916c', '\u5c01\u95dc\u65e5\u5831\u916c', '\u5f8c\u4e94\u65e5\u7d2f\u8a08\u5831\u916c', '\u5f8c\u5341\u4e94\u65e5\u7d2f\u8a08\u5831\u916c' ])for i in date:<br>    <br>    # Pre 15-day cumulative return <br>    market.loc[i, '\u524d\u5341\u4e94\u65e5\u7d2f\u8a08\u5831\u916c'] = ((twn.loc[i, '\u6536\u76e4\u50f9(\u5143)'] \/ twn.loc[i-15, '\u6536\u76e4\u50f9(\u5143)']) - 1) * 100<br>    <br>    # Pre 5-day cumulative return<br>    market.loc[i, '\u524d\u4e94\u65e5\u7d2f\u8a08\u5831\u916c'] = ((twn.loc[i, '\u6536\u76e4\u50f9(\u5143)'] \/ twn.loc[i-5, '\u6536\u76e4\u50f9(\u5143)']) - 1) * 100<br>    <br>    # Market Closure date return<br>    market.loc[i, '\u5c01\u95dc\u65e5\u5831\u916c'] = ((twn.loc[i, '\u6536\u76e4\u50f9(\u5143)'] \/ twn.loc[i-1, '\u6536\u76e4\u50f9(\u5143)']) - 1) * 100<br>    <br>    # Post 5-day cumulative return<br>    market.loc[i, '\u5f8c\u4e94\u65e5\u7d2f\u8a08\u5831\u916c'] = ((twn.loc[i+5, '\u6536\u76e4\u50f9(\u5143)'] \/ twn.loc[i, '\u6536\u76e4\u50f9(\u5143)']) - 1) * 100<br>    <br>    # Post 15-day cumulative return<br>    market.loc[i, '\u5f8c\u5341\u4e94\u65e5\u7d2f\u8a08\u5831\u916c'] = ((twn.loc[i+15, '\u6536\u76e4\u50f9(\u5143)'] \/ twn.loc[i, '\u6536\u76e4\u50f9(\u5143)']) - 1) * 100<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/180om-yIndJdCCskBV7vuQQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"7400\"><strong>Step 4. Calculate Average Margin of Up-and-Down &amp; Up-and-Down Situation<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">for i in range(0,5):<br>    data['\u5e73\u5747\u6f32\u5e45'][i] = market.iloc[:, i].mean()<br>    <br>    pos = list(filter(lambda x: (x &gt; 0), market.iloc[:,i]))<br>    data['\u4e0a\u6f32\u6b21\u6578'][i] = len(pos)<br>    data['\u4e0a\u6f32\u6a5f\u7387'][i] = len(pos) \/ len(last_day)<br>    data['\u4e0a\u6f32\u5e73\u5747\u6f32\u5e45'][i] = np.mean(pos)<br>    <br>    neg = list(filter(lambda x: (x &lt; 0), market.iloc[:,i]))    <br>    data['\u4e0b\u8dcc\u6b21\u6578'][i] = len(neg)<br>    data['\u4e0b\u8dcc\u6a5f\u7387'][i] = len(neg) \/ len(last_day)<br>    data['\u4e0b\u8dcc\u5e73\u5747\u8dcc\u5e45'][i] = np.mean(neg)<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1cBjGXC4oJi4XDDfUhOvaBw.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"d5a6\">Based on above chart, we would find that there is a down trend during pre 15-day trading period. As for the period after Chinese New Year, it shows that TAIEX performs well, overall. These circumstances caused by that market participants tend to sell current position to avoid impact of incident during market closure. After the closure, they buy more position as starting new plans.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cd5f\"><span class=\"ez-toc-section\" id=\"Event_Study_%E2%80%94_Pre_Closure\"><\/span><strong>Event Study \u2014 Pre Closure<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"4244\"><strong><em>Note\uff1aIf you are not familiar with event study. Please firstly read&nbsp;<\/em><\/strong><a href=\"https:\/\/medium.com\/tej-api-%E9%87%91%E8%9E%8D%E8%B3%87%E6%96%99%E5%88%86%E6%9E%90\/quant-6-event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns-7099cca259c4\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\"><strong><em>\u3010Quant(6)\u3011 Event Study \u2014 The Announcement Impact of Seasoned Equity Offerings on Stock Returns<\/em><\/strong><\/a><strong><em>.<\/em><\/strong><\/p>\n<\/blockquote>\n\n\n\n<p id=\"9d8c\"><strong>Step 1. Get Code of Common Stocks<\/strong><\/p>\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)tse_stocks = security['\u8b49\u5238\u78bc'].tolist()<\/pre>\n\n\n\n<p id=\"b962\"><strong>Step 2. Event Studt Process(Programming is available at Source Code)<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Based on data within \u2018Estimate Window\u2019 , 251 trading day each year, we construct Fama\/French 5 Factor Model.<\/li>\n\n\n\n<li>Apply above 5 Factor Model to forecast returns in \u2018Event Window\u2019 , which covers pre-and-post 5 trading day.(11 day in total, containing closure date)<\/li>\n\n\n\n<li>Get the anomaly return by that actual return minus forecast return. Calculate the cumulative anomaly return.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1cjfUNWkmJ6YWOtoofIjtFg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"9f2b\"><strong>Step 3. Test Significance of Anomaly Return during Pre-Closure<\/strong><\/p>\n\n\n\n<p id=\"f112\">We apply t-test and P-value to test the significance.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pre_close = pd.DataFrame()for stock in tse_stocks:<br>    <br>    # Take the closure date as basis to calculate anomaly return <br>    df = test[test['\u8b49\u5238\u4ee3\u78bc'] == stock].reset_index(drop=True)<br>    df = df[df['\u76f8\u5c0d\u5929\u6578'] == 0]<br>    <br>    # Delete stocks with too little sample amount <br>    if len(df) &lt; 4:<br>        print(stock, 'has no enough data')<br>        continue<br>    <br>    sample = df['\u7d2f\u8a08\u7570\u5e38\u5831\u916c\u7387'].values<br>    <br>    # Test<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>            <br>    pre_close = pre_close.append(pd.DataFrame(np.array([stock,t,p_value, significance]).reshape((1,4)), columns = ['\u8b49\u5238\u4ee3\u78bc','T\u6aa2\u5b9a\u503c', 'P-value','\u986f\u8457\u6c34\u6e96'],)).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\/1hT5gaiAnunLG2uFy20yp7g.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"af39\">We use the most rigorous standard(P-value &lt; 0.01) to select stocks with significant anomaly return.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">result = pre_close[(pre_close['T\u6aa2\u5b9a\u503c'] &gt; 0) &amp; (pre_close['P-value'] &lt; 0.01) ].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\/1TWs_Pe7Q1nmxl-t8zrhhQg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"a9ff\"><strong>Step 4. Calculate \u2018Daily\u2019 Anomaly Return<\/strong><\/p>\n\n\n\n<p id=\"77df\">Firstly, calculate the average anomaly return delaying n period in each year. For example, the average anomaly return of pre-5, pre-4 and pre-3 day separately . Subsequently, aggregate the average cumulative return from pre-5 day to closure date.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Average Anomaly Return<br>for i in range(-5, 1):<br>    result['\u7b2c' + str(i) + '\u5929\u5e73\u5747\u7570\u5e38\u5831\u916c'] = test[test['\u8b49\u5238\u4ee3\u78bc'].isin(positive_list) &amp; (test['\u76f8\u5c0d\u5929\u6578'] == i)].groupby('\u8b49\u5238\u4ee3\u78bc')['\u7570\u5e38\u5831\u916c\u7387'].mean().reset_index(drop=True)# Aggregate the period cumulative anomaly return<br>result['\u671f\u9593\u7d2f\u8a08\u5e73\u5747\u7570\u5e38\u5831\u916c\u7387'] = test[test['\u8b49\u5238\u4ee3\u78bc'].isin(positive_list) &amp; (test['\u76f8\u5c0d\u5929\u6578'] == 0)].groupby('\u8b49\u5238\u4ee3\u78bc')['\u7d2f\u8a08\u7570\u5e38\u5831\u916c\u7387'].mean().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\/1U6mmwWcpnKVld_1sVsHb3w.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"72c8\"><strong>Step 5. Merge above Chart with Basic Information Table(TWN\/AIND)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">result['\u516c\u53f8\u4e2d\u6587\u7c21\u7a31'] = ''<br>result['TEJ\u7522\u696d\u540d'] = ''<br>result['TEJ\u5b50\u7522\u696d\u540d'] = ''for i in range(len(positive_list)):<br>    firm_info = tejapi.get('TWN\/AIND',<br>                          coid = positive_list[i],<br>                          opts = {'columns':['coid', 'inamec', 'tejind2_c', 'tejind3_c']},<br>                          chinese_column_name = True,<br>                          paginate = True)    result.loc[i, '\u516c\u53f8\u4e2d\u6587\u7c21\u7a31'] = firm_info.loc[0, '\u516c\u53f8\u4e2d\u6587\u7c21\u7a31']<br>    result.loc[i, 'TEJ\u7522\u696d\u540d'] = firm_info.loc[0, 'TEJ\u7522\u696d\u540d']<br>    result.loc[i, 'TEJ\u5b50\u7522\u696d\u540d'] = firm_info.loc[0, 'TEJ\u5b50\u7522\u696d\u540d']<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1Uq5-g7-GAEGIsCx8VhBMng.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1eFHQskjubosZr7-_oIvgDg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"110b\">According to the attribute of these 3 companies, we find that corporations with the most significant anomaly return pre closure are industrial-related or manufacturing stocks.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"460c\">Event Study \u2014 Post Closure<\/h1>\n\n\n\n<p id=\"e953\">The process of post closure is quite similar to that of pre closure. What we should change is the event period, in coding, from -5 to +5. Considering the length of this article, we just present the result.(Complete process is available at Source Code)<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1fGP7MYvj_167hFl7sfZsew.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.tejwin.com\/wp-content\/uploads\/1N3p0bbeYVPDpG_voUW6mcA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"6616\">Above chart shows that industrial-related stocks maintain the status of owning the most significant anomaly return during post closure period.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"6687\"><strong><em>Note\uff1aStocks that this article mentions are just for the discussion, please do not consider it to be any recommendations or suggestions for investment or products.<\/em><\/strong><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"9612\"><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=\"2526\">Firstly, we analyze market participant\u2019s attitude toward market closure by the performance of TAIEX return. With above content, you would notice that there is a lightly short period during pre closure and a majorly long one after the closure.<\/p>\n\n\n\n<p id=\"b953\">Secondly, we apply event study to find stocks with anomaly return. In this part, you would find that industrial-related companies have the most significant anomaly return. We consider that the situation is derived from both the increasing demand for fundamentally industrial processed product and decline of metal price during late February and early March, so market participants, then, expect&nbsp;<strong>the revenue would increase and cost of manufacturing goes down<\/strong>, therefore, long these stocks.<\/p>\n\n\n\n<p id=\"fbc4\">Last but not least, please note that \u201c<strong>Stocks this article mentions are just for the discussion, please do not consider it to be any recommendations or suggestions for investment or products.\u201d<\/strong>&nbsp;Hence, if you are interested in issues like Event Study, welcome to purchase the plans offered in&nbsp;<a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/index\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ E Shop<\/a>&nbsp;and use the well-complete database to find the potential event.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"088d\"><span class=\"ez-toc-section\" id=\"Source_Code\"><\/span><strong>Source Code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/gist.github.com\/tej87681088\/dc27d2ed12992f6cd64ea124791edf43#file-tejapi_medium-11-ipynb\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\">Click here to go Github<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"d861\"><span class=\"ez-toc-section\" id=\"Extended_Reading\"><\/span><strong>Extended Reading<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.tejwin.com\/en\/insight\/pairs-trading\/\" class=\"ek-link\">Pairs Trading<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.tejwin.com\/en\/insight\/event-study-the-announcement-impact-of-seasoned-equity-offerings-on-stock-returns\/\" class=\"ek-link\">Event Study \u2014 The Announcement Impact of Seasoned Equity Offerings on Stock Returns<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"267e\"><span class=\"ez-toc-section\" id=\"Related_Link\"><\/span>Related Link<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>Return of TAIEX before &amp; after Market Closure Period Highlights Preface Chinese New Year is the most important festival of Chinese society. Traditionally, it is the genuine year-end. Stock market participants would conclude market performance in past year and begin the project targeting upcoming year. Therefore, this article would take Chinese New Year as the [&hellip;]<\/p>\n","protected":false},"featured_media":16694,"template":"","tags":[2581,2371,2632,2638,3005,2700],"insight-category":[690,50],"class_list":["post-16691","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-event-study","tag-python","tag-statistics","tag-taiwan-stock","tag-tejapi-application","tag-2700","insight-category-data-analysis","insight-category-fintech"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16691","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":2,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16691\/revisions"}],"predecessor-version":[{"id":24869,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/16691\/revisions\/24869"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media\/16694"}],"wp:attachment":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media?parent=16691"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/tags?post=16691"},{"taxonomy":"insight-category","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight-category?post=16691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}