Announcement

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

  • event study

    Hi to everyone!

    I am writing an article with use of event study. Unfortunately I am new to Stata and experience a lot of difficulties with this program.
    I ve used this link https://dss.princeton.edu/online_hel...udy.html#clean as benchmark.

    So what I have. Let's say that I have trial for 20 companies at first. So everything goes right with estimation if returns and event windows.
    The problem (or I would better say my lack of knowledge) arises in testing market model.
    As far as I am concerned I need market returns for such procedure. I ve downloaded S&P500. But I am kind of lost about how should I match it to my data. I mean every firm have their own date set.
    Of course I can do it by hands and fit copy.past by firm individually but it seems really inefficient when my sample will go much more larger than just 20 firms.
    Can anyone give me an advice?

    I am really sorry if this question is super stupid, but I am so lost at my Stata skills that I do not know what else should I do.

    I am attaching my current code

    *format
    format date %td
    format edate %td

    *calculating event windows
    sort company_id date
    by company_id: gen datenum=_n
    by company_id: gen target=datenum if date==edate
    egen td=min(target), by(company_id)
    drop target
    gen dif=datenum-td


    by company_id: gen event_window=1 if dif>=-5 & dif<=5
    egen count_event_obs=count(event_window), by(company_id)
    by company_id: gen estimation_window=1 if dif<-30 & dif>=-60
    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<5
    tab company_id if count_est_obs<30

    drop if count_event_obs < 2
    drop if count_est_obs < 30


    so next step should probably be normal returns - so I wonder how to match market return with firms id.

  • #2
    thanks in advance

    Comment


    • #3
      Hi Katerina and welcome to Statalist!

      Sorry for the quote response below, but I had recently answered a similar question here (note that the first link in #2 is the dss.princeton,edu site that you list in your original post.

      Originally posted by David Benson View Post

      1) So if you have access to WRDS, you can use their EVENTUS tool to do the event study for you (and return all the test statistics). There is another external event study calculator here, although I have never used it.

      2) To calculate it yourself in Stata, take a look here, here, here, and here.

      3) There are also several modules available on SSC for running stock market event studies in Stata, including eventstudy and eventstudy2 (findit eventstudy). There is also a 2018 Stata Journal article on using the community-contributed command estudy here.

      Hope that helps!
      --David

      Comment

      Working...
      X