Announcement

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

  • #31
    May be there has been some miscommunication from my side. Well, the correct definitions are as follows:

    SMB = (vw_mean_rt_SH + vw_mean_rt_SL + vw_mean_rt_SM)/3 - (vw_mean_rt_BH + vw_mean_rt_BL + vw_mean_rt_BM)/3 i.e., simple average of three small size groups minus the simple average of two big size groups.

    HML = (vw_mean_rt_BH + vw_mean_rt_SH)/2 - (vw_mean_rt_BL + vw_mean_rt_SL)/2 i.e., simple average two high bmr groups minus the simple average of two low bmr groups.

    Hope that makes it clear enough.

    Comment


    • #32
      Now I am completely confused. We have two mcap groups and three bmr groups. So there cannot be an average of "three small/big size groups" because there are only two size groups in the first place.

      I think it will help me if you don't use this terminology to describe what you want here. Instead speak specifically about mcap halves 1 (mcap < median) and 2 (mcap >= median), and bmr groups 1 (bmr < 30th %ile), 2 (bmr from 30th to 70th %ile), and 3 (bmr > 70th %ile) so I'll know exactly what you're referring to.

      Comment


      • #33
        I think you mean like this:

        SMB = [(1,3) + (1,1) + (1,2)]/3 - [(2,3) + (2,1) + (2,2)]/3

        HML = [(2,3) + (1,3)]/2 - [(2,1) + (1,1)]/2

        These (_ _) are intersection groups. The first in the each parenthesis represents mcap and the second is bmr.

        Hope it is clear enough.

        Comment


        • #34
          Yes, very clear now. So assuming at that point your data set has one observation for each date, with variables june_mcap_group, march_bmr_group, and vw_mean_rt (change those variable names as needed for your actual data):
          Code:
          by date: egen S = mean(cond(june_mcap_group == 1, vw_mean_rt, .))
          by date: egen B = mean(cond(june_mcap_group == 2, vw_mean_rt, .))
          gen SMB = S - B
          
          by date: egen H = mean(cond(march_bmr_group == 3, vw_mean_rt, .))
          by date: egen L = mean(cond(march_bmr_group == 1, vw_mean_rt, .))
          gen HML = H - L

          Comment

          Working...
          X