Announcement

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

  • Financial Event Study with more than one event per company

    Dear StataList members,
    I wish you all a happy new year and may this forum get bigger and richer with years.
    I am conducting a financial event study (seasoned equity offerings).
    I used the Princeton University document as a primary assistance and I found it very helpful. Here is the URL: http://dss.princeton.edu/online_help...ydataprep.html
    The commands in the mentioned document are shaped based on the following: Event dates along with company identifiers have one file. Stock returns, market returns and matching company identifiers have another file.
    I am stuck in the stage of managing data, and not the stage of conducting the actual analysis.
    Their commands are customized given that each company has only one event. However, several companies in my data have more than one event.
    They mention in their explanation that "In some situations one may wish to examine more than one event date for each company. In multiple observations per company, it is necessary to create a duplicate set of observations for each event date/company combination. You need a full set of stock observations to examine each event."
    So, I need to know the command which can create a full set of stock returns for each event separately.
    Please let me know if any part of my explanation is ambiguous.
    I have tagged members who I have read their posts/replies and I believe they can help me on this topic. I am truly grateful for any help you provide.
    Thank you all very much in advance.
    Best regards

  • #2
    Mostafa:
    you might have inadvertently posted the same query four times.
    However, this will hardly increase your chance to get helpful replies.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      hello Carlo,
      thank you for pointing this out. I did this by mistake and I added a new post asking how to delete them.
      Yet, no clear answer.
      If you know how please let me know.
      Of course I didn't add four posts in order to increase chances (at least I would have added them in different days)
      Best Regards

      Comment


      • #4
        Hello, Mostafa,

        Maybe (and I say, maybe) if you present the data in an abridged version and (visually) explain your aims, maybe you would find a "helping hand".

        By experience, mostly as a spectator, I've seen how many "helping hands" there are here.

        The main obstacles for no reply are: sometimes people don't know much about a specific field; sometimes people don't understand what is the real situation.

        Kind regards,

        Marcos
        Best regards,

        Marcos

        Comment


        • #5
          Originally posted by Marcos Almeida View Post
          Hello, Mostafa,

          Maybe (and I say, maybe) if you present the data in an abridged version and (visually) explain your aims, maybe you would find a "helping hand".

          By experience, mostly as a spectator, I've seen how many "helping hands" there are here.

          The main obstacles for no reply are: sometimes people don't know much about a specific field; sometimes people don't understand what is the real situation.

          Kind regards,

          Marcos
          Thanks Marcos, in what follows I will try to be brief:
          I have two files: File1 contains ID's and event dates. File2 contains daily stock returns for each one of the ID's.
          In case where each ID has only one event date, there is no problem. However, the problem rises when some of the ID's have more than one event date. Why? Because this require each event date to have a full separate set of stock returns.

          For example, let's assume that the number of working days in the year is 240 days. This makes each year have 240 stock returns, per ID.
          Now, British Airways have 2 events. This require each event date to have its own full set of daily stock returns (its own 240 stock returns). So, event1 will have 240 returns and event2 will have the same 240 returns. Hence, I need a command which merges both file and expand the stock returns over the different event days (each event date gets its own 240 stock return observations).

          Finally, I found it very difficult to post something visual. I hope that members will get my point.

          Thank you all.
          Mostafa

          Comment


          • #6
            I'm not entirely sure I understand what you want, but have you tried

            Code:
            use File1
            joinby ID using File2

            Comment


            • #7
              Originally posted by Clyde Schechter View Post
              I'm not entirely sure I understand what you want, but have you tried

              Code:
              use File1
              joinby ID using File2
              Dr Schechter it worked. Thank you very much
              I was stuck with the "merge" command and I totally ignored the "joinby" command.
              Thanks again.
              Warm Regards,
              Mostafa

              Comment


              • #8
                Mostafa:
                I was confident that you posted your query several times inadvertently,
                My remark focused on the fact that, as a consequence of your inadvertently posting the same query several times, you did not increase your chance of getting useful advices.
                I did not mean that you deliberately reposted the same thread for this purpose.
                Anyway, I'm happy with hearing that making things clearer allows you to obtain helpful replies.
                Kind regards,
                Carlo
                (Stata 18.0 SE)

                Comment


                • #9
                  Originally posted by Carlo Lazzaro View Post
                  Mostafa:
                  I was confident that you posted your query several times inadvertently,
                  My remark focused on the fact that, as a consequence of your inadvertently posting the same query several times, you did not increase your chance of getting useful advices.
                  I did not mean that you deliberately reposted the same thread for this purpose.
                  Anyway, I'm happy with hearing that making things clearer allows you to obtain helpful replies.
                  Carlo, maybe I over explained and this made me appear in a defensive position (and I wasn't). Again I thank you for your comment and I acknowledge that you are one of the seniors here, which means that you are much more experienced than new members like me.
                  A big thanks to StataList, which is making our lives easier.
                  Regards,
                  Mostafa

                  Comment


                  • #10
                    Mostafa:
                    the substantive thing is that Clyde's code is what you were after.
                    As far as my alleged seniority on the list is concerned, quoting a Nick Cox's sentence that appeared on the list some years ago (urely written in a better English): "We are all beginners; some of us are simply more experienced". I do feel that way.
                    I'm sure you will enjoy your posting and contributing to this forum.
                    Kind regards,
                    Carlo
                    (Stata 18.0 SE)

                    Comment


                    • #11
                      Originally posted by Carlo Lazzaro View Post
                      Mostafa:
                      the substantive thing is that Clyde's code is what you were after.
                      As far as my alleged seniority on the list is concerned, quoting a Nick Cox's sentence that appeared on the list some years ago (urely written in a better English): "We are all beginners; some of us are simply more experienced". I do feel that way.
                      I'm sure you will enjoy your posting and contributing to this forum.
                      Sir, I truly respect the humble person in you.
                      Lately, Nick Cox invaded ​my econometrics books shelf. He does things in a simple and a smart way, I really like his approach.
                      Yes, I am enjoying the forum and I am happy that I am part of it.
                      We'll be in touch Carlo.
                      Regards,
                      Mostafa

                      Comment

                      Working...
                      X