Announcement

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

  • Event Study with events on non-trading days.

    Hi there,
    I am currently conducting an event study on Stata aiming to investigate the effect of Elon Musk's tweets on the stock market. However, some tweets seem to have been posted on non-trading days. Therefore, when I compute the following commands, the tweet dates are not matched with the date of the stock returns, making my analysis invalid.

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

    I am attaching a screenshot of my data:
    1. Company (or sub-group) whose tweet was posted on a trading day
    2. Company (or sub-group) whose tweet was not posted on a trading day

    How can I overcome this issue?
    Many thanks!
    Attached Files

  • #2
    Hi Michela,

    I'm having trouble understanding what you want your code to do. I suspect you are trying to define the event and estimation windows. Here are two references that may help:

    Event Study with Stata: a Step-by-Step Guide, from the Princeton U Library

    Subhan Ullah, Ghasem Zaefarian, Rizwan Ahmed, Danson Kimani, How to apply the event study methodology in STATA: An overview and a step-by-step guide for authors,Industrial Marketing Management,Volume 99,2021

    It will also be helpful for you to consult the Forum FAQs to learn how to formulate a question so as to maximize the likelihood of getting an answer. In particular, you will want to use -dataex- to produce a data example to illustrate your question rather than posting screenshots (or attachments many folks will not open.)

    Best,
    Devra
    Devra Golbe
    Professor Emerita, Dept. of Economics
    Hunter College, CUNY

    Comment

    Working...
    X