Hi there,

I calculated the abnormal returns of german federal state bonds as well as I plotted them with their left- and right hand side confidence intervals into a graph, on which I had success doing it.
Unfortunately, it is not working the same way, it did yesterday. As i tried to run the regression this morning again, I obtained on every dummy a right hand side confidence interval of the value of 0 instead of a positive one. Since I did not changed anything in my do file ( i just ran the regression for a second time) I really would need your guidance on that!

Many thanks in advance
Freddy

here my do file ( shortened to just two bonds as well as one regression)

clear

cd "G:\GAST\Praktikanten\Frederik Witzemann\Stata intro\NRW floating"

local bonds NR2008FR0538S BRCPN040740

foreach x in `bonds'{
clear
import excel nrwbrd_final.xlsx, sheet("`x'")
drop if _n<5
ren A date
ren B bp_`x'
destring bp_`x', replace ignore("NA")

save bp_`x', replace
}
clear
use bp_NR2008FR0538S

local bonds BRCPN040740


foreach x in `bonds'{
merge 1:1 date using bp_`x'.dta
drop _merge*

}

gen date2 = date(date, "MDY")
format date2 %td
gen event_date = date("5/15/2017", "MDY")
gen date3 = date(date, "MDY")

sort date2

tsset date2

local bonds NR2008FR0538S BRCPN040740


foreach i in `bonds'{
gen r_`i'=(bp_`i'- bp_`i'[_n-1])/ bp_`i'[_n-1]

}


gen dif = event_date - date3

gen event_window=0
replace event_window=1 if dif>=-10 & dif<=10
egen count_event_obs=count(event_window),
gen estimation_window=1 if dif<45 & dif>-45
egen count_est_obs=count(estimation_window),
replace event_window=0 if event_window==.
replace estimation_window=0 if estimation_window==.



forval i = 0(1)20{
gen dummy_`i' = 1 if dif>`i'-11 & dif<`i'+-9
replace dummy_`i'=0 if dummy_`i'==.

}

reg r_NR2008FR0538S r_BRCPN040740 dummy_0 dummy_1 dummy_2 dummy_3 dummy_4 dummy_5 dummy_6 dummy_7 dummy_8 dummy_9 dummy_10 dummy_11 dummy_12 dummy_13 dummy_14 dummy_15 dummy_16 dummy_17 dummy_18 dummy_19 dummy_20 if estimation_window==1


here my regression with the value of 0 on the right hand confidence intervals:


> ------
r_NR20~0538S Coef. Std. Err. t P>t [95% Conf. Int
> erval]

> ------
r_BRC~040740 .0153346 .0077454 1.98 0.054 -.000256 .0
> 309252
dummy_0 -.0022093 .0004813 -4.59 0.000 -.0031781 -.0
> 012406
dummy_1 -.0003903 .0004772 -0.82 0.418 -.0013508 .0
> 005702
dummy_2 -.000165 .0004772 -0.35 0.731 -.0011256 .0
> 007956
dummy_3 -.0000542 .0004811 -0.11 0.911 -.0010225 .0
> 009142
dummy_4 0 (omitted)
dummy_5 0 (omitted)
dummy_6 -.0001159 .0004781 -0.24 0.809 -.0010783 .0
> 008465
dummy_7 -.0002397 .0004787 -0.50 0.619 -.0012033 .0
> 007238
dummy_8 -.0001289 .0004845 -0.27 0.791 -.0011041 .0
> 008464
dummy_9 -.0004905 .00048 -1.02 0.312 -.0014568 .0
> 004757
dummy_10 .0000395 .0004893 0.08 0.936 -.0009455 .0
> 010244
dummy_11 0 (omitted)
dummy_12 0 (omitted)
dummy_13 -.0001012 .0004823 -0.21 0.835 -.001072 .0
> 008696
dummy_14 .0001426 .0004796 0.30 0.768 -.0008228 .0
> 011079
dummy_15 -.0002955 .0004811 -0.61 0.542 -.0012638 .0
> 006728
dummy_16 -.0001507 .0004773 -0.32 0.754 -.0011116 .0
> 008101
dummy_17 .0001299 .0004795 0.27 0.788 -.0008352 .
> 001095
dummy_18 0 (omitted)
dummy_19 0 (omitted)
dummy_20 -.0005231 .0004787 -1.09 0.280 -.0014868 .0
> 004406
_cons .0001736 .0000682 2.55 0.014 .0000364 .0
> 003108

> ------





here my regression with positive values on the right hand confidence intervals:
Coef. Std. Err. t P>t [95% Conf. Interval]
.0153346 .0077454 Jan 98 0.054 -.000256 .0309252
-.0022093 .0004813 -4.59 0.000 -.0031781 -.0012406
-.0003903 .0004772 -0.82 0.418 -.0013508 .0005702
-.000165 .0004772 -0.35 0.731 -.0011256 .0007956
-.0000542 .0004811 -0.11 0.911 -.0010225 .0009142
-.0001159 .0004781 -0.24 0.809 -.0010783 .0008465
-.0002397 .0004787 -0.50 0.619 -.0012033 .0007238
-.0001289 .0004845 -0.27 0.791 -.0011041 .0008464
-.0004905 .00048 -1.02 0.312 -.0014568 .0004757
.0000395 .0004893 0.08 0.936 -.0009455 .0010244
-.0001012 .0004823 -0.21 0.835 -.001072 .0008696
.0001426 .0004796 0.30 0.768 -.0008228 .0011079
-.0002955 .0004811 -0.61 0.542 -.0012638 .0006728
-.0001507 .0004773 -0.32 0.754 -.0011116 .0008101
.0001299 .0004795 0.27 0.788 -.0008352 .001095
-.0005231 .0004787 -1.09 0.280 -.0014868 .0004406
.0001736 .0000682 Feb 55 0.014 .0000364 .0003108