Announcement

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

  • Factor Spanning Test

    Hello! I am currently trying to test a new factor in the Fama-French model. My dataset consists of the known variables MKt SMB HML CMA RMW and my new factor PVS. I want to perform a factor spanning test, but i do not know how to perform this in stata. I have panel data for over 600 months, and more than 2.000.000 observations. Could someone specify the code for running this test.

  • #2
    I'm not familiar with the term "factor spanning test". A bit of light reading suggests that this is a technique from finance that is closely associated with the Fama-French model - whatever that might be. Several sources suggest that you can conduct a factor spanning test by iteratively regressing each factor on every other factor one by one. I'm not aware of a single command that will do these regressions for you and build a table like this automatically, but it should be fairly straightforward to regress each variable on the others. Seems like you want something like this:

    Code:
    regress MKt SMB HML CMA RMW PVS
    regress SMB MKt HML CMA RMW PVS
    regress HML MKt SMB CMA RMW PVS
    regress CMA MKt SMB HML RMW PVS
    regress RMW MKt SMB HML CMA PVS
    regress PVS MKt SMB HML CMA RMW
    ​​​​​​Alternatively, here is a generic algorithm for a list of variables of any size:

    Code:
    local variable_list = "MKt SMB HML CMA RMW PVS"
    forv i = 1/`=wordcount("`variable_list'")'{
        local dependent = word("`variable_list'", `i')
        forv j = 1/`=wordcount("`variable_list'")'{
            if `i' != `j'{
                local next = word("`variable_list'", `j')
                local independent = "`independent' `next'"
            }
        }
        regress `dependent'`independent'
        local independent = ""
    }
    That should give you all of the relevant information for the analysis.

    Comment


    • #3
      Thanks!

      Comment

      Working...
      X