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

  • How to code to calculate Buy-and-hold Abnormal Return (BHAR)

    I need to calculate peer-adjusted BHARs to measure long-run performance effects. Peer firms with similar market capitalization and equity's book-to-market ratio perform well in randomized samples.

    For each loan-announcing firm, I need to select a peer firm that resembles the sample firm except for the announcement of loan financing. I need to compute each firm's subsequent holding period return (HPR) as

    HPRi = (∏Ti t=1 (1+Rit) - 1 ] X 100%,

    where Rit is the rth firm's stock return on the rth day, and Ti is the number of trading days in the three-year period following the loan announcement.

    In my data, "sprtrn" (Return on the S & P) represents Rit. How can I write the STATA code to calculate HPRi?

    After calculating HPR for each sample firm and for its matching firm, I need to evaluate the difference, a stylized investor's BHAR as follows: How can I write the STATA code to calculate BHAR?

    BHAR = HPREvent - HPRPeer

    I used the following code. But it does not align with the above formula. How can I fix it?
    egen firm=group(permno)
    gen date=substr(date,1,4)
    gen day=20 gen

    tempdate = date
    gen date2 = date(date,"YMD")
    format date2 %td
    drop year month day tempdate

    gen month=mofd(date2)

    xtset firm date

    gen adj_it = ret - sprtrn
    gen compound = (1 + adj_it) * (1 + l.adj_it)
    forvalues i=2/11 {
    replace compound = compound * (1 + l`i'.adj_it)

    gen bhar = compound - 1
    drop compound
    Last edited by Eun Um; 15 Aug 2019, 16:57.