Q-Factor Model of Hou, Xue, and Zhang (2015)


The Q-factor model of Hou, Xue, and Zhang (2015) is based on the q-theory of investment. This model proposes that the expected return of an asset in excess of the risk-free rate is described by the sensitivities of its returns to 4 factors: the market excess return, the difference between the return on a portfolio of small size stocks and the return on a portfolio of big size stocks, the difference between the return on a portfolio of low investment stocks and the return on a portfolio of high investment stocks, and the difference between the return on a portfolio of high profitability stocks and the return on a portfolio of low profitability stocks.


Our Stata Code


We have developed codes in the Stata language for constructing the risk factors and for testing the model. Specifically, the code performs the following activities.

  1. Importing different files from Excel
  2. Reshaping the data to a long format
  3. Merging different datasets
  4. Forming 18 portfolios by taking the intersections of the 2 size, 3 I/A (investment), and 3 ROE groups. Then monthly value-weighted portfolio returns are calculated.
  5. Factors are then constructed from these 18 portfolios.
  6. To test the model, 25 portfolios are then developed from the intersection of size and book-to-market
    ratio. Excess returns on these portfolios are then used as dependent variables.
  7. Time-series regressions are then estimated by regressing the LHS 25-portfolios returns
    on the 4 factors.
  8. Result tables are constructed in Excel using the commonly used format of Fama and French papers.
  9. GRS-tests can be optionally added to the above at a fee of $50. Besides the GRS tests, we also provide various statistics on model performance, for details of these statistics, please see Table 5 of Fama and French (2015).


Are comments included?


We have developed easy to use yet robust codes for the above steps. The codes need just a basic understanding of Stata. Further, our comments on each line of code will surely help you in running the code as well as in understanding the process more clearly. We normally share all Stata files, the raw data files, and Stata codes with comments. The purpose is to help researchers to learn and apply these codes on their own. We also try to answer questions that might arise at a later stage when the researcher applies these codes.


Pricing


The code is available with three options (see details in the following table).

Silver

$149
  • Source Code
  • Example Data
  • Email Support

Gold

$199
  • Source Code
  • Complete Data Handling
  • Email Support

Bronze

$99
  • Source Code
  • No Data
  • Email Support

Silver Details:


Under the Silver option, you shall get the source code, that is well-commented. You shall also get an example dataset that is useful in seeing the code in action as all the variable names in the example dataset match the code. You shall also have email support in case you have any question.   Gold Details:


The primary feature of the Gold option is that we take your raw data file, clean them, merge them, and make them ready for running the code. At the end, you shall get the source code of the data processing steps along with comments. You shall also get the source code of the main model. You shall also have email support in case you have any question.   Bronze Details:


Under the Bronze option, you shall get the source code, that is well-commented. You shall also have email support in case you have any question.

 

For further details, please contact us at:

attaullah.shah@imsciences.edu.pk

Stata.Professor@gmail.com

 

See our full list of completed projects