Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Event study with OLS market model: R squared is 0.000

    Hello,

    I have conducted an event study using an OLS market model to determine whether there is a variation in stock prices when a certain event ha been announced. The sample consists 37 firms from different countries across different industries as you can find below the STATA codes. However, the model to test the variation in return for overall firms has a R squared value of 0,000 as shown in attachment.
    Click image for larger version

Name:	overall.JPG
Views:	1
Size:	25.4 KB
ID:	1440057

    I think something went wrong because the model to test the variation in return for each firm do have a higher R squared value. I will be very thankful if someone can help me on this matter.

    STATA codes used to conduct this event study are shown as follows:

    *1) Cleaning the data and Calculating the Event and Estimation Windows

    *For number of trading days:

    sort company_id date
    by company_id: gen datenum=_n
    by company_id: gen target=datenum if date==event_date
    egen td=min(target), by(company_id)
    drop target
    gen dif=datenum-td

    *Certain events have confounding events within the event window, therefore, these observations should not be taken into account

    drop if company_id==6
    drop if company_id==19
    drop if company_id==20
    drop if company_id==23
    drop if company_id==32
    drop if company_id==40

    by company_id: gen event_window=1 if dif>=-1 & dif<=1
    egen count_event_obs=count(event_window), by(company_id)
    by company_id: gen estimation_window=1 if dif>=-301 & dif<-1
    egen count_est_obs=count(estimation_window), by(company_id)
    replace event_window=0 if event_window==.
    replace estimation_window=0 if estimation_window==.

    tab company_id if count_event_obs<3
    tab company_id if count_est_obs<30

    drop if count_event_obs < 3
    drop if count_est_obs < 30

    drop count_event_obs
    drop count_est_obs

    *2)Estimating Normal Performance

    gen predicted_return=.
    egen id=group(company_id)
    /* for multiple event dates, use: egen id = group(group_id) */
    forvalues i=1(1)37 { /*note: replace N with the highest value of id */
    l id company_id if id==`i' & dif==0
    reg ret market_return if id==`i' & estimation_window==1
    predict p if id==`i'
    replace predicted_return = p if id==`i' & event_window==1
    drop p
    }

    *3)Abnormal and Cumulative Abnormal Returns

    sort id date
    gen abnormal_return=ret-predicted_return if event_window==1
    by id: egen cumulative_abnormal_return = sum(abnormal_return)

    *4) Testing for Significance

    sort id date
    by id: egen ar_sd = sd(abnormal_return)
    gen test =(1/sqrt(3)) * ( cumulative_abnormal_return /ar_sd)
    list company_id cumulative_abnormal_return test if dif==0

    *5) Testing Across All Events

    reg cumulative_abnormal_return if dif==0, robust

    [CODE]
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int date byte company_id double(ret market_return) int event_date byte _merge_eventdate_stockreturn int SIC byte _merge
    19968 1 -.0189699224788216 -.0004065831108909955 20720 3 124 3
    19891 1 -.0022607727181933185 -.003122270336573342 20720 3 124 3
    19851 1 -.008234394585821502 -.0025477006543374397 20720 3 124 3
    20458 1 -.02445961319681455 -.011681172698121816 20720 3 124 3
    20676 1 -.00929549902152648 -.005117088944955791 20720 3 124 3
    21182 1 0 0 20720 3 124 3
    20740 1 -.009230769230769268 .00003624304586554158 20720 3 124 3
    20919 1 -.012436844150796746 .0026391433710435085 20720 3 124 3
    19960 1 -.0008044150896778804 .0003018037210623168 20720 3 124 3
    19849 1 -.013009007984996332 -.00798140113863098 20720 3 124 3
    19834 1 -.0023622135710716333 .004095650896268032 20720 3 124 3
    20017 1 .015407103946425428 .011444705882352975 20720 3 124 3
    20614 1 -.04130545639979596 -.00842314341413162 20720 3 124 3
    19926 1 .012204983701678173 .005963136971449223 20720 3 124 3
    19869 1 -.0005250588574041566 .00007285443683530266 20720 3 124 3
    20325 1 .02570694087403605 .006823748979353679 20720 3 124 3
    21241 1 .008101101749837978 .0021477034216820126 20720 3 124 3
    20774 1 .003336113427856476 .0017223498036890272 20720 3 124 3
    20228 1 .014573213046495425 .008835055219095184 20720 3 124 3
    21235 1 -.04760383386581476 .00028119624189490173 20720 3 124 3
    20215 1 -.018500434573966426 -.0016652494331066726 20720 3 124 3
    20367 1 .01591289782244567 .005654933641084754 20720 3 124 3
    20852 1 -.031065088757396445 -.004195632329190302 20720 3 124 3
    20270 1 .01313320825515953 .01487468216491094 20720 3 124 3
    21061 1 .01595547309833023 .007412187380096968 20720 3 124 3
    19898 1 -.006856532343988812 -.005226126941330757 20720 3 124 3

  • #2
    Lilong:
    as per your regression output, you seemingly have no predictors in your OLS code (it might be the results of the condtions you imposed, that is -if dif==0-.
    I wouls start with checking if what you coded is consistent with your research goals.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Note that the code in post #1 apparently was adapted from the code at

      https://dss.princeton.edu/online_hel...ventstudy.html

      Comment


      • #4
        Originally posted by Carlo Lazzaro View Post
        Lilong:
        as per your regression output, you seemingly have no predictors in your OLS code (it might be the results of the condtions you imposed, that is -if dif==0-.
        I wouls start with checking if what you coded is consistent with your research goals.
        Thank you very much for your feedback, Carlo. Clearly, I still have a lot to learn from you guys since I have just started to use STATA. These codes are indeed from the link found by William. I will examine the codes more carefully.

        Comment


        • #5
          Originally posted by William Lisowski View Post
          Note that the code in post #1 apparently was adapted from the code at

          https://dss.princeton.edu/online_hel...ventstudy.html
          Exactly, because the codes seemed to be suitable for my research. I have adjusted the event window, estimation period and sample size.

          Comment


          • #6
            Indeed, but for those whose help you seek, it may useful to read the documentation for the code.

            The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

            With that said, can you present the output of this command from your code?
            Code:
            list company_id cumulative_abnormal_return test if dif==0
            My belief is that this output should be 37 lines long.

            Before presenting it, please review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. Note especially sections 9-12 on how to best pose your question. Note especially the preference for code, data, and output presented with CODE delimiters. Please copy your output from the Results window into a code block in the Forum editor, as explained in section 12 of the Statalist FAQ. For example, the following:

            [CODE]
            . sysuse auto, clear
            (1978 Automobile Data)

            . describe make price

            storage display value
            variable name type format label variable label
            -----------------------------------------------------------------
            make str18 %-18s Make and Model
            price int %8.0gc Price
            [/CODE]

            will be presented in the post as the following:
            Code:
            . sysuse auto, clear
            (1978 Automobile Data)
            
            . describe make price
            
                          storage   display    value
            variable name   type    format     label      variable label
            -----------------------------------------------------------------
            make            str18   %-18s                 Make and Model
            price           int     %8.0gc                Price
            In your dataex output of sample data, you omitted the closing CODE delimiter, which caused the opening CODE delimiter to have no effect.

            Comment


            • #7
              Actually, never mind the request for data. The following is quoted from the source of the code you adapted: once I read through it (I don't do event studies and hoped someone else would do so), it became clear that you misunderstood the purpose of the regression.

              Testing Across All Events

              Instead of, or in addition to, looking at the average abnormal return for each company, you probably want to calculate the cumulative abnormal for all companies treated as a group. Here's the code for that:
              Code:
              reg cumulative_abnormal_return if dif==0, robust
              The P-value on the constant from this regression will give you the significance of the cumulative abnormal return across all companies. This test preferable to a t-test because it allows you to use robust standard errors.
              So the reason that, as Carlo pointed out, there were no predictors in the regression output is because there were no independent variables in the regression command. Any regression with no independent variables will estimate just a constant term, and since R-squared measures the reduction in variance relative to a regression with just a constant term, there has been no such reduction in variance and the R-squared will accordingly be zero.

              But the documentation does not instruct you to consider the R-squared from this regression. The regression is simply a tool to calculate the P-value on the constant term, which for this regression is the significance of cumulative abnormal returns across all companies. In this case it is .138.

              Comment


              • #8
                Originally posted by William Lisowski View Post
                Actually, never mind the request for data. The following is quoted from the source of the code you adapted: once I read through it (I don't do event studies and hoped someone else would do so), it became clear that you misunderstood the purpose of the regression.



                So the reason that, as Carlo pointed out, there were no predictors in the regression output is because there were no independent variables in the regression command. Any regression with no independent variables will estimate just a constant term, and since R-squared measures the reduction in variance relative to a regression with just a constant term, there has been no such reduction in variance and the R-squared will accordingly be zero.

                But the documentation does not instruct you to consider the R-squared from this regression. The regression is simply a tool to calculate the P-value on the constant term, which for this regression is the significance of cumulative abnormal returns across all companies. In this case it is .138.
                You are right, I read it too fast. Thank you very much!

                Comment

                Working...
                X