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).

 

For further details, please contact us at:

attaullah.shah@imsciences.edu.pk

Stata.Professor@gmail.com

Page tags: Stata Codes for Fama and French (1993); Stata Codes for Fama and French (1991); Stata Codes for Fama and French (2015); Stata Codes for Fama and French 3 Factors model; Stata Codes for Fama and French Five Factors Model; Application of Fama and French model in Stata; Estimation of Fama and French Model in Stata; Eviews; SPSS; R; SAS; 


References

  1. Christie, W. G., & Huang, R. D. (1995). Following the pied piper: Do individual returns herd around the market?. Financial Analysts Journal, 51(4), 31-37.
  2. Chang, E. C., Cheng, J. W., & Khorana, A. (2000). An examination of herd behavior in equity markets: An international perspective. Journal of Banking & Finance, 24(10), 1651-1679.