Dear mkeniz, I have difficulty to understand the generated output by sas program. I would like to compute the following BHAR: Buy and Hold Abnormal return= ((1+return(m1))(1+return(m2))----(1+return(m12)) - (1+marketreturn(m1)(1+marketreturn(m2))---(1+marketreturn(m12)), where m1=closemonth-11, m2=closemonth-10, m3=closemonth-9, m4=closemonth-8, m5=closemonth-7, --- m12=closemonth As shown in the excel sheet, the computed values in three different ways are different. computed value by original definition above: 0.052 computed value by log and exponential: 0.023 computed value by current sas program: 0.388 It will be highly appreciative if you can give an idea how to fix program to generate computed value by original definition (0.052). data c4; ** Generate 12-month rolling benchmark returns ** ** Do this only once and save in an array **; if _n_=1 then do until (end_of_benchmark); set benchmark end=end_of_benchmark; array bmrk_ret {1990:2019,1:12} _temporary_ ; array logplusone {12} _temporary_; y=year(date); m=month(date); logplusone{m}=log(1+vwretd); if n(of logplusone{*})=12 then bmrk_ret{y,m}=exp(sum(of logplusone{*})); end; set ch2; by permno; if first.permno then call missing(of logplusone{*}); m=month(date); y=year(date); logplusone{m}=log(1+ret); if closemonth^=.; if n(of logplusone{*})=12 then bhar=exp(sum(of logplusone{*})- bmrk_ret{y,m}); run;
... View more