Announcement

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

  • Annual returns, Equally weighted and Value weighted portfolio returns with some accounting or finance experience

    Dear All
    Just a simple question, I need equally weighted portfolio returns and value weighted portfolio returns where the weighting is by the market capitalization (market value; mv).
    ***to calculate annual returns from monthly returns, I use the following code:
    gen month_id=mofd(date)
    label var month_id "numberical date variable; monthly frequency"
    xtset permno month_id
    gen annual_ret= (1+f1.ret)* (1+f2.ret)*(1+f3.ret)*(1+f4.ret)*(1+f5.ret)*(1+f6. ret)*(1+f7.ret)*(1+f8.ret)*(1+f9.ret)*(1+f10.ret)* (1+f11.ret)*(1+f12.ret)-1



    **In further steps , I keep only annual_ret reported at the end of the fiscal year, then I create portfolios using the following code:

    egen NYSE_portfolio = xtile(op2WA) , by(yr) p(10(10)90) // where op2WA is the ranking variable // this code rebalances portfolios every year

    ** In order to calculate portfolio equally weighted returns for the holding period (month 1 to 12) and post holding period (month 12 -24 and 24-36)

    sort firmid yr

    gen f12_24_annual_ret=f.annual_ret

    gen f22_36_annual_ret=f2.annual_ret


    egen portret=mean(annual_ret), by (All_portfolio yr) // this is holding return

    egen f12_24_portret= mean (f12_24_annual_ret), by (All_portfolio yr)
    egen f24_36_portret= mean (f12_24_ annual _ret), by (All_portfolio yr)


    ** In order to calculate portfolio value weighted returns where the MV is weighting variable:

    egen mvweight_return = wtmean(portret), weight(crmv) by(All_portfolio yr)


    1- Unfortunately, the equally weighted portfolio is identical to value weighted portfolio mean which might suggest I am doing something incorrect here
    2- Can anyone spot any problems in these codes , probably also from an accounting or finance perspective , if returns are calculated the correct way ?



    Thanks
    Ahmed

  • #2
    Ahmed I found the same snippet of code or commands on the internet, however the f. operator is in our context wrong you have to lag the ranking variable if you want the, return of e.g. portfolio10 in this month. Meaning that what fama and French are reporting are the portfolio returns for the respective months, but if you take f#.return you will take the return from the future to time t. I hope I made myself clear

    Comment


    • #3
      Thomas, sorry but I am not sure if I understand what you mean. You may clarify with a code please. I haven't used this code from the internet, I tried to work it out, as the one in the internet is based on a momentum strategy which is not what I am doing right now. Also, note that annual_ret in my code is cummulated over the next12 months, hence if the mean of this annual return for the posrtfolio is the portfolio equally weighted return (holding return). The postholding return starts after one year , which is f12_24_portret .
      In this case, holding return is observed after the characteristic is reported , i.e.the variable op2WA is reported and then I observe the annual return for the next 12 month (holding return).
      I think this should be fine?
      I encourage all people here to comment on this please, and how I can create value weighted portfolio mean ?
      Ahmed

      Comment


      • #4
        To be more precise the annual-return here will be the one year ahead return.

        Comment

        Working...
        X