The description of portfolios’ construction given in various Fama and Fench papers is usually confusing for many researchers, especially those who are new to asset pricing models. The typical language used in Fama and French papers reads like this

The size breakpoint for year t is the median NYSE market equity at the end of June of year t. BE/ME for June of year t is the book equity for the last fiscal year end in t-1 divided by ME for December of t-1.

This blog post aims at explaining the above paragraph with some examples.

## Break-points for Portfolio Construction

### The size-breakpoints

As mentioned in the above paragraph, the size-breakpoints are based on the market capitalization of firms at the end of June of the current year. This means while making two groups of firms:

1. First, we need to reduce the data to keep the market capitalization of each firm at the end of June.
2. Also, we need to further reduce the data to keep only firms listed at the NYSE stock exchange.

### The BE/ME-breakpoints

The BE/ME variable uses lagged values of the book equity and market equity. However, the way the lagged values are obtained for both the variables differs from one another. The book equity is the last fiscal year’s available book equity. Since the assumption is that the financial year ends in June, therefore, the last June’s book equity is called book equity for the last fiscal year end in t-1

Consider the following monthly data where we have observations for a single firm over three years period. The variable year represents the calendar year that starts in January and ends in December. The variable fyear represents the fiscal year, that starts in July and ends in June.

From these observations, we need ME in December of yeat t-1. In our dataset, the first December appears in the calendar year 2016. The ME on that date is 958. For the calendar year 2006, the corresponding BE value for the fiscal year is 467, that is the book equity for the last fiscal year end in t-1
We are able to calculate the BE/ME ratio in June 2017 as = 467 / 958. This value will be used for finding the breakpoints and making the three BE/ME portfolios, which are then held from July of year t to June of year t+1, as shown in the following snapshot.

### The Yearly Portfolios

The portfolios for July of year t to June of t+1 include all NYSE, AMEX, and NASDAQ stocks for which we have market equity data for December of t-1 and June of t, and (positive) book equity data for t-1.

### How to Do it Programmatically?

There are more than a dozen steps to fully implement the Fama and French model. Entry-level researchers might try to do all these steps in MS Excel. However, doing these steps in Excel is not only cumbersome but also prone to errors. Further, the process is manual, therefore, it cannot be easily replicated.

We have developed codes in Stata to construct the three factors of the Fama and French model as well as the 25 RHS (right-hand side) portfolios. Our codes generate factors that have over 97% correlation with the Fama and French factors.

### Why buy codes for Fama and French Model?

There are several reasons that you should consider using the codes of a professional. These reasons include but are not limited to the accuracy of the code, quick learning, replicability of the codes in the same project or other projects, and validation of your own code if you have written a code yourself.

$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 Package 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 Package 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 Package 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

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.