Announcement

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

  • Fama-French regression with different portfolios

    Dear Statalists,
    I have 11 stock portfolios (0-10) sorted by R&D ratio. The value-weighted returns of the firms in the portfolio form the time series of returns for each portfolio. To test the Fama-French 3-factor model, the time series of returns for each portfolio should be regressed on the time series of returns for the market excess return and the HML and SMB factors. I tried this for portfolio 1 using the command reg pfrt MktRF SMB HML if pf==1. Unfortunately, I don't get the same results as the paper that I am trying to replicate.
    Please find a data extract:
    Click image for larger version

Name:	1.JPG
Views:	1
Size:	52.0 KB
ID:	1448628


    Furthermore, I have no clue how to produce a table like this:
    Click image for larger version

Name:	2.JPG
Views:	1
Size:	61.7 KB
ID:	1448629


    Can someone please give me some advice on this?

    Best,
    Alex

  • #2
    Edit:
    I can't install dataex ("cannot write in directory U:\Documents\Stata\plus\d"). I use an university license on my own PC. I am trying to solve this, but until then I can only post screenshots. Or is there any alternative?
    The code I used for the time series regression is:
    Code:
    reg pfrt MktRF SMB HML if pf==1
    Please ignore my second question regarding the table.

    Comment


    • #3
      Note that dataex comes preinstalled on up-to-date Stata 14 and higher. If you are running an older or out-of-date Stata, you are still most likely able to write to some directories; otherwise you would be very constrained in what you can do. You can use the net command to indicate where you want programs from SSC installed. For example, to install dataex to Stata's current directory:
      Code:
      net set ado .
      ssc install dataex

      Comment


      • #4
        Okay thank you. It worked. I created an output with dataex, but it looks weird to me. Nevertheless, I hope that's the format that you need.

        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input double lpermco long datadate float(pf pfrt) double(MktRF SMB HML)
        22219 -3288 1 0  5.54  1.49  7.23
        20103 -3288 1 0  5.54  1.49  7.23
        22405 -3288 1 0  5.54  1.49  7.23
        21172 -3257 1 0   5.7  1.73  3.72
        22202 -3257 1 0   5.7  1.73  3.72
        22219 -2923 1 0  3.33 -2.25 -1.56
        22405 -2923 1 0  3.33 -2.25 -1.56
        22202 -2892 1 0  1.45  -.61  1.54
        21172 -2892 1 0  1.45  -.61  1.54
        22405 -2557 1 0  2.93 -1.48   .18
        22219 -2557 1 0  2.93 -1.48   .18
        22202 -2526 1 0  -.34  3.58  1.32
        21172 -2526 1 0  -.34  3.58  1.32
        22405 -2192 1 0   .03  -.84 -2.84
        20103 -2192 1 0   .03  -.84 -2.84
        end
        format %d datadate

        Comment


        • #5
          Now there could be multiple reasons for not getting somewhat similar results, it could be because of how portfolios are formed e.g. when we form portfolios based on size we take the june market capitalization (this is explained in this video), so it is difficult to conclude without seeing the code that is used to generate these portfolios.

          Comment

          Working...
          X