Announcement

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

  • Need help with fixing my database to run Ibbotson RATS model

    I have the following data:
    - all share repurchase announcements of American firms 1990-2000
    - all monthly holding period returns on shares of American firms 1990-2000

    What I want to do:
    - The regression will look like: security excess return = c + b1 * market excess return (+ other control variables)
    - the constant c would be my variable of interest (the coefficient of the constant is the abnormal return)
    - I call the event month (month in which the repurchase is announced) j=0, and I need to do this regression for all firms in the database at moments j=1,...,48 , so from the share repurchase announcement up and until 48 months later.
    - So my output would consist of 48 regressions in total. And the output of the regression for j=1 would give me the average abnormal return in the 1st month after announcing a share repurchase for all American firms in the period 1990-2000. This way I can compute the cumulative abnormal return in the 1,2,3,...,48 months after a share repurchase announcement.

    How I want to do it:
    - I created a new variable "j" in my dataset in STATA that now has value 0 at every repurchase announcement and currently still has missing values at all other places
    - Instead of missing values I need the values 1,...,48 at all the other places (this way I can use the code "regress security market if j==0", up and until "if j==48")

    My problem:
    - I don't know how to tell STATA to replace the missing values with the right values out of 1,...,48. In order to do this STATA needs to recognize that for every combination of a firm-identifier (CUSIP in my data file) and the date (month), that there has been an announcement for the same CUSIP somewhere in the data file (where j=0), and then it should calculate the difference in months for that CUSIP and give the right value based on that. For example: if somewhere in my data file there is a j=0 for company A in January 1995, then for the monthly return of company A in February 1995 somehwere else in my data file STATA should put a j=1 there.

    I need to do all this because I need to use the Ibbotson's RATS-model (returns across time and securities). I am also open to suggestions to do this in another way.
Working...
X