Announcement

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

  • Buy and hold returns

    Dear stata users,

    I am wondering if you can help me with a problem. I have to make buy and hold returns for bank i and period s, starting from time t, computed as BHRi,t = (1+Ri,t+1)*(1+Ri,t+2)*...*(1+Ri,t+s)-1. I want to compute these BHRs from CRSP monthly holding period returns for all banks in my sample, and over the period july 2007 to december 2008. Thereby I have to normalize the BHR to zero in july 2007. So I keep one observation for the BHRs for each bank and each month. I put two banks (of the 18) in the data below for the illustration of my data:

    permno date ticker comnam cusip ret rp1
    10375 31jul2007 TCB T C F FINANCIAL CORP 87227510 -.106744573 .8932554
    10375 31aug2007 TCB T C F FINANCIAL CORP 87227510 .02765353 1.027654
    10375 28sep2007 TCB T C F FINANCIAL CORP 87227510 .036011074 1.036011
    10375 31oct2007 TCB T C F FINANCIAL CORP 87227510 -.1209893 . 8790107
    10375 30nov2007 TCB T C F FINANCIAL CORP 87227510 -.147562608 .8524374
    10375 31dec2007 TCB T C F FINANCIAL CORP 87227510 -.076249331 .9237506
    10375 31jan2008 TCB T C F FINANCIAL CORP 87227510 .199107617 1.199108
    10375 29feb2008 TCB T C F FINANCIAL CORP 87227510 -.124235265 .8757647
    10375 31mar2008 TCB T C F FINANCIAL CORP 87227510 -.037076868 .9629231
    10375 30apr2008 TCB T C F FINANCIAL CORP 87227510 -.01506699 .984933
    10375 30may2008 TCB T C F FINANCIAL CORP 87227510 -.050574664 .9494253
    10375 30jun2008 TCB T C F FINANCIAL CORP 87227510 -.271791816 .7282082
    10375 31jul2008 TCB T C F FINANCIAL CORP 87227510 .080631778 1.080632
    10375 29aug2008 TCB T C F FINANCIAL CORP 87227510 .235294119 1.235294
    10375 30sep2008 TCB T C F FINANCIAL CORP 87227510 .142857149 1.142857
    10375 31oct2008 TCB T C F FINANCIAL CORP 87227510 -.000555568 .9994444
    10375 28nov2008 TCB T C F FINANCIAL CORP 87227510 -.058624521 .9413755
    10375 31dec2008 TCB T C F FINANCIAL CORP 87227510 -.182035968 . 817964
    10825 31jul2007 TSFG SOUTH FINL GROUP INC 83784110 -.039752647 .9602473
    10825 31aug2007 TSFG SOUTH FINL GROUP INC 83784110 .064471304 1.064471
    10825 28sep2007 TSFG SOUTH FINL GROUP INC 83784110 -.00915037 .9908496
    10825 31oct2007 TSFG SOUTH FINL GROUP INC 83784110 -.08355321 .9164468
    10825 30nov2007 TSFG SOUTH FINL GROUP INC 83784110 -.132623419 .8673766
    10825 31dec2007 TSFG SOUTH FINL GROUP INC 83784110 -.127790183 .8722098
    10825 31jan2008 TSFG SOUTH FINL GROUP INC 83784110 .117722362 1.117722
    10825 29feb2008 TSFG SOUTH FINL GROUP INC 83784110 -.164930567 .8350694
    10825 31mar2008 TSFG SOUTH FINL GROUP INC 83784110 .029798985 1.029799
    10825 30apr2008 TSFG SOUTH FINL GROUP INC 83784110 -.580753684 .4192463
    10825 30may2008 TSFG SOUTH FINL GROUP INC 83784110 -.087748304 .9122517
    10825 30jun2008 TSFG SOUTH FINL GROUP INC 83784110 -.288566262 .7114338
    10825 31jul2008 TSFG SOUTH FINL GROUP INC 83784110 .540816367 1.540816
    10825 29aug2008 TSFG SOUTH FINL GROUP INC 83784110 .127694845 1.127695
    10825 30sep2008 TSFG SOUTH FINL GROUP INC 83784110 .077941135 1.077941
    10825 31oct2008 TSFG SOUTH FINL GROUP INC 83784110 -.206002727 .7939973
    10825 28nov2008 TSFG SOUTH FINL GROUP INC 83784110 -.256454349 .7435457
    10825 31dec2008 TSFG SOUTH FINL GROUP INC 83784110 0 1

    Ret means return and this variable i retrieved from crsp.
    Then I made the following variable rp1 with the command: gen rp1 = ret +1 for calculating the compounded returns. Now I face the problem how I make for every bank each month the buy and hold return.

    In the following links I read similar question, but not the answers I could solve my problem.
    http://www.statalist.org/forums/foru...ounding-effect
    http://www.statalist.org/forums/foru...annual-returns

    Is there anyone how could help me out? A lot of thanks of me and my groupmates.

    With kind regards,

    Rex Rutte


  • #2
    This is actually a fairly straightforward question, yet it has sat around for hours with no response. That is probably because you have posted your sample data in a form that is almost maximally unusable (a screen shot would have been even worse, but...). Run -ssc install dataex- to install the -dataex- command, and then run -help dataex- to get the simple instructions for its use. Then use it to re-post your data in a way that will be helpful to people who want to help you. I bet you'll get a quick response if you do that.

    Comment

    Working...
    X