Hi
i'm doing a 'market model' style event study. I'm looking at the effects of a Fed announcement upon a currency.
As i have no market returns to compute abnormal returns, I will be calculating the theoretical variation in the currency over the preceding 300 days before the event. i will use the mean variation during the estimation window. Theoretical variation (over 300 days, estimation window) = SUM (t=300) [ Variation ]/300.
I have currently undertaken the following steps in preparation for my event study (from do file):
gen ret = ln(px_last[_n+1] / px_last[_n]) destring date, ignore("/") replace gen day_cnt = _n gen target_day = day_cnt if date==20092017 egen max_target_day = max(target_day) gen evday = day_cnt-max_target_day drop day_cnt target_day max_target_day sort evday gen evt_window=1 if evday>=-10 & evday<=10 gen est_window=1 if evday<=302 & evday>=-2
My dataset originally had the exchange rate(px_last) and the date. What commands would i use to compute the daily theoretical variation, and then the mean variation over the 300 day estimation window???
(I'm a stata newbie, but i believe that 'gen window floor (day_cnt/300)' would be a command i may use. but i dont know how to get further.)
Thank you
Related Posts with Event Study help
Can PPML be used beyond gravity models?Dear All, I am helping a friend with some Stata coding. I am myself not an expert. They have a cou…
Replace if value is a dateHi, I am trying to replace the value of one variable when the condition holds (the condition is that…
How I can egen a variable to capture the sum value of numbers in the different columnsDear Stata users, I am working on a dataset with many dummy variables. What I want to achieve is eg…
Identifying sequences in string variables across observationsHello. I have string data in the format described below. I want to generate a new variable "Pregnanc…
vce(cluster var1 var2) varlist not allowed r(101)Hi!, I am trying to run fixed effect with two-way clustering. For instance: reghdfe capx x1 x2, abs…
Subscribe to:
Post Comments (Atom)
0 Response to Event Study help
Post a Comment