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.
- Importing different files from Excel
- Reshaping the data to a long format
- Merging different datasets
- 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.
- Factors are then constructed from these 18 portfolios.
- 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. - Time-series regressions are then estimated by regressing the LHS 25-portfolios returns
on the 4 factors. - Result tables are constructed in Excel using the commonly used format of Fama and French papers.
- 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
- Source Code
- Example Data
- Email Support
Gold
- Source Code
- Complete Data Handling
- Email Support
Bronze
- 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
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
- 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.
- 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.