Announcement

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

  • Time-series regression for each portfolio

    Hi, I'm currently writing my bachelor thesis. I have divided my data into 5 portfolios depending on the leverage change. I'm replicating a paper in which it says the following:

    Click image for larger version

Name:	Knipse5l.JPG
Views:	2
Size:	52.3 KB
ID:	1667405


    In my case, the i goes from 1 to 5. My data is as following:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long gvkey float(time excess_ri_port rf mktrf smb hml mom change5)
     2410 425 -5.696706 7.05 1 -.06 -.63 3.4 3
     2411 425 -7.957327 7.05 1 -.06 -.63 3.4 4
     4439 425 -5.310014 7.05 1 -.06 -.63 3.4 1
     8020 425 -5.310014 7.05 1 -.06 -.63 3.4 1
     8546 425 -5.696706 7.05 1 -.06 -.63 3.4 3
    11217 425 -5.310014 7.05 1 -.06 -.63 3.4 1
    11749 425 -5.696706 7.05 1 -.06 -.63 3.4 3
    12368 425 -4.475912 7.05 1 -.06 -.63 3.4 5
    12383 425 -5.310014 7.05 1 -.06 -.63 3.4 1
    12384 425 -7.957327 7.05 1 -.06 -.63 3.4 4
    13145 425 -5.800953 7.05 1 -.06 -.63 3.4 2
    13556 425 -7.957327 7.05 1 -.06 -.63 3.4 4
    13683 425 -5.696706 7.05 1 -.06 -.63 3.4 3
    14447 425 -5.800953 7.05 1 -.06 -.63 3.4 2
    14620 425 -5.800953 7.05 1 -.06 -.63 3.4 2
    14894 425 -5.696706 7.05 1 -.06 -.63 3.4 3
    15319 425 -5.800953 7.05 1 -.06 -.63 3.4 2
    15334 425 -5.696706 7.05 1 -.06 -.63 3.4 3
    15444 425 -5.310014 7.05 1 -.06 -.63 3.4 1
    16267 425 -5.696706 7.05 1 -.06 -.63 3.4 3
    16299 425 -5.310014 7.05 1 -.06 -.63 3.4 1
    end
    format %tm time

    Because in this example it's the same month and year, stocks with the same change5 are in the same portfolio. Therefore, they have the same excess return. What they get is the following table:
    Click image for larger version

Name:	Knffipsel.JPG
Views:	2
Size:	56.4 KB
ID:	1667406


    I tried to get these results for the 3-factor by:
    Code:
    xtset time
    Code:
    xtreg excess_ri_port mktrf smb hml i.change5
    But doing this I only get 1 alpha and also portfolio 1 is omitted:
    Click image for larger version

Name:	Knipseggl.JPG
Views:	1
Size:	94.6 KB
ID:	1667407


    Does anyone know how to perform this?

    Thanks

  • #2
    I think you should estimate five time-series regressions, one for each portfolio. It looks like your data are still at the individual level. Here is what I would try:
    1. Use collapse to calculate portfolio returns each month, which is something like collapse (mean) r, by(change5 time)
    2. Merge your portfolio returns with French's factor data and calculate portfolio excess returns
    3. Estimate the time-series regressions (i.e., CAPM, FF3, FF3+momentum) for each of your five portfolios, which is something like the following:
    Code:
    forvalues i=1/5 {
        regress exret Mkt_RF if (change5 == `i'), vce(robust)
        regress exret Mkt_RF SMB HML if (change5 == `i'), vce(robust)
        regress exret Mkt_RF SMB HML Mom if (change5 == `i'), vce(robust)
    }
    I hope this helps. Note that my collapse code in 1. above calculates equal weighted returns.

    Comment


    • #3
      Hi, thank you very much for your response. I have panel data, do I have to use regress or xtreg?

      Comment


      • #4
        Once you calculate a return for each portfolio, you should estimate a linear regression (e.g., CAPM or FF3) for each portfolio (i.e., -regress-). Asset pricing research typically estimates one regression per portfolio instead of using the panel structure of the data.

        Comment


        • #5
          Thank you very much Richard!!
          Last edited by Juan Gonzalex; 02 Jun 2022, 09:16.

          Comment

          Working...
          X