Announcement

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

  • Fama MacBeth model - factor loadings: asreg with fmb omits coefficients

    Dear all,

    I would like to get the loadings of various factors (i.e. their beta coefficients) influencing returns of a fund. My dependent variable is excess_ret_nr (return of a fund), and my explanatory variables are sp_logret size_spread_factor msci_logret bmf csf ptfsbd ptfsfx ptfscom (returns of various indices, bonds etc.).
    I have an unbalanced panel data with around 480'000 observations, 6200 units and time periods of length up to 228 months.

    I would like to use the asreg command with fmb option, preferably also with newey correction. However, when I use this, the coefficients and other statistics of my independent variables get omitted for some reason (see screenshot). I have tried to use various combinations of the code, but nothing seems to work, even if I use only one explanatory variable, the outcome is always the same (i.e. the constant value and its t-stat). The code I am trying to use is:

    Code:
    bysort id: asreg excess_ret_nr sp_logret size_spread_factor msci_logret bmf csf ptfsbd ptfsfx ptfscom , fmb

    I have also tried the xtfmb command, reportedly very similar to asreg, but its computation is very slow and still running for me currently.


    Can you please provide me with some advice on how to fix this? Thanks a lot!



    KC



    Click image for larger version

Name:	Omitted.PNG
Views:	1
Size:	251.4 KB
ID:	1488626

  • #2
    I have little experience with FMB, but I suspect your problem results from prefixing your command with bysort id:

    The Fama-MacBeth model depends on using cross-sectional data, but your prefix cause each id (which I assume is the fund identifier you have used to xtset your data) to be treated separately, so there is no ability to estimate the cross-sectional component. The examples shown in the output of help asreg (examples 12-15) and help xtfmb do not use the prefix. For what reason do you feel your problem is different and requires the prefix?
    Last edited by William Lisowski; 17 Mar 2019, 10:01.

    Comment


    • #3
      Dear William, thank you for your reply. However, the command without the bysort option results in exactly the same outcome as with it, unfortunately.

      I suspect the problem may be in the fact that all of my independent variables are various indices or interest rate levels, and therefore they are the same in the cross-sectional dimension (e.g. the value sp_logret is the same for all IDs in time 1, then takes a different value in time 2, but this value is again the same for all IDs). Nevertheless, I would say this problem has to arise naturally in case of Fama-French (also CAPM etc.) model, and I thought it will be alright with the 2-step FMB regression?

      Comment


      • #4
        So try running asreg without the bysort prefix and adding the first option. My expectation is that you are going to see a series of first-stage regression results with very poor results, which would strongly suggest that your understanding of and expectations for FMB modeling are incorrect.

        Here is a made-up example that yields poor results similar to yours.
        Code:
        . * use reaslistic data
        . webuse grunfeld, clear
        
        . drop if year<1940
        (50 observations deleted)
        
        . asreg invest mvalue kstock, fmb first
        First stage Fama-McBeth regression results
        
              +------------------------------------------------------------+
              | _TimeVar   _obs       _R2   _b_mva~e   _b_kst~k      _Cons |
              |------------------------------------------------------------|
              |     1940     10   .839255    .095399    .202291   -27.0471 |
              |     1941     10   .856215    .114764    .177465   -16.5195 |
              |     1942     10   .857307    .142825    .071024   -17.6183 |
              |     1943     10   .842064     .11861    .105412   -22.7638 |
              |     1944     10   .875515    .118164    .072207   -15.8281 |
              |     1945     10   .906797    .108471    .050221   -10.5197 |
              |     1946     10   .894752    .137948    .005413   -5.99066 |
              |     1947     10   .891239    .163927   -.003707   -3.73249 |
              |     1948     10   .788823    .178667   -.042556    8.53881 |
              |     1949     10   .863257    .161596   -.036965    5.17829 |
              |     1950     10   .857714    .176217   -.022096   -12.1747 |
              |     1951     10   .873773    .183141   -.112057    26.1382 |
              |     1952     10   .846122    .198921   -.067495    7.29284 |
              |     1953     10   .889261    .182674    .098753   -50.1525 |
              |     1954     10    .89845    .134512    .331375   -133.393 |
              |------------------------------------------------------------|
         Mean |     1947     10    .86537    .147722    .055286   -17.9061 |
              +------------------------------------------------------------+
        
        Fama-MacBeth (1973) Two-Step procedure           Number of obs     =       150
                                                         Num. time periods =        15
                                                         F(  2,    14)     =    315.76
                                                         Prob > F          =    0.0000
                                                         avg. R-squared    =    0.8654
        ------------------------------------------------------------------------------
                     |            Fama-MacBeth
              invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              mvalue |   .1477223   .0083671    17.66   0.000     .1297766     .165668
              kstock |   .0552857   .0301458     1.83   0.088    -.0093707    .1199421
               _cons |  -17.90612   9.443551    -1.90   0.079    -38.16052    2.348281
        ------------------------------------------------------------------------------
        
        . * replace data so independent variables are constant across firms
        . bysort year (company): replace mvalue = mvalue[1]
        (135 real changes made)
        
        . bysort year (company): replace kstock = kstock[1]
        (135 real changes made)
        
        . asreg invest mvalue kstock, fmb first
        First stage Fama-McBeth regression results
        
              +---------------------------------------------------------+
              | _TimeVar   _obs       _R2   _b_mva~e   _b_kst~k   _Cons |
              |---------------------------------------------------------|
              |     1940     10   8.7e-33     .02439          0       0 |
              |     1941     10         0    .030699          0       0 |
              |     1942     10   7.6e-33    .037812          0       0 |
              |     1943     10         0    .029057          0       0 |
              |     1944     10         0    .027613          0       0 |
              |     1945     10         0    .025648          0       0 |
              |     1946     10         0    .032924          0       0 |
              |     1947     10         0    .041723          0       0 |
              |     1948     10         0      .0473          0       0 |
              |     1949     10         0    .037631          0       0 |
              |     1950     10   2.1e-32    .040223          0       0 |
              |     1951     10         0    .041296          0       0 |
              |     1952     10   1.0e-32     .04549          0       0 |
              |     1953     10         0    .044152          0       0 |
              |     1954     10         0    .048945          0       0 |
              |---------------------------------------------------------|
         Mean |     1947     10   3.1e-33    .036994          0       0 |
              +---------------------------------------------------------+
        
        Fama-MacBeth (1973) Two-Step procedure           Number of obs     =       150
                                                         Num. time periods =        15
                                                         F(  2,    14)     =    312.51
                                                         Prob > F          =    0.0000
                                                         avg. R-squared    =    0.0000
        ------------------------------------------------------------------------------
                     |            Fama-MacBeth
              invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              mvalue |   .0369936   .0020926    17.68   0.000     .0325054    .0414818
              kstock |          0  (omitted)
               _cons |          0  (omitted)
        ------------------------------------------------------------------------------
        
        .
        Added in edit: You can see that within each year a cross-sectional model is fit. But the independent variables are identical for each firm, so they are all collinear with each other and with the constant.
        Last edited by William Lisowski; 17 Mar 2019, 11:00.

        Comment


        • #5
          I see what you mean, thank you. The fact that factors are constant in the cross-section indeed causes trouble here.

          What I do not understand completely is that the factors should by invariant in the cross-section quite often (CAPM, more factor models etc.). Therefore, I thought this in-built command will work. However, it seems to me that I have at first manually for each fund regress return on factors (everything varies during the time series and I obtain n sets of betas), and then use these n sets of betas as independent variables for cross-section of fund returns in each period T (again, nothing is constant). I obtain T sets of gammas (coefficients of betas), which I then take average of. But this is the very definition of FMB if I am not mistaken. Thank you.

          Comment

          Working...
          X