Hi all,
I am new to Stata and I have the following problem.
I have to conduct an event study for 1,500 US firms, having different event dates, i.e. announcement of activism campaign.
I have the following data:
- For each firm, I have the series of returns in the 250 days before the announcement, paired (in the next column) with the corresponding date
- For each of the 4 Fama French Carhart factors, I have the series of returns paired with the corresponding dates, which cover the entire of range of dates of the returns of the firms.
As far as I am concerned, the first step would be to estimate a time series regression of the returns of a firm on the returns 4 Fama-French-Carhart factors in the 250 days before the announcement. This time series regression should be repeated for each firm in the sample, so:
- The y variable (i.e. returns of the firm) should be different in each of the 1,500 time series regressions;
- The dependent variables are the same for each regression (FFC factors)
- The 250 dates are different for each regression
I was thinking to build a "loop" that for each company should automatically regress its returns on the 4 FFC Factors, automatically selecting only 250 the relevant dates for the FFC factors.
Did I explain sufficiently clearly my problem?
Any suggestions on how to do it?
Related Posts with Loop of time series regression
Calculating days elapsed between dates in Panel dataHello guys, I am trying to calculate days elapsed for each 'episode' between x and y values. For ex…
Correlating random effects to study interhospital variationHi All, Using data from ~2000 hospitals, I have identified patients who underwent 1 of 3 operations…
Fixed Effects Regression - Binary Variable Can Only Equal 1 OnceDear all, I am working with a dataset looking at employee departures across a group of firms. The d…
ImportError after specifying set python_exec in Python integrationHello If I set a certain environment's executable for python, initialize it and import a package in…
Unable to find detailed parameters for variablesHello everyone, I am using Stata /SE 17.0 working with the Pollock 2012 data set states.dta. I am ha…
Subscribe to:
Post Comments (Atom)
0 Response to Loop of time series regression
Post a Comment