Fama-French Cost of Equity
Calculate the cost of equity of the Fama and French three-factor model: the return each company’s exposure to the market, size and value factors requires.
Where the Capital Asset Pricing Model of get_weighted_average_cost_of_capital prices only the market risk, Fama and French (1997) estimate industry costs of equity from the loadings on all three factors times their long-run premiums. Small companies and value companies load positively on the size (SMB) and value (HML) factors and get a higher cost of equity than their market beta alone gives; large growth companies a lower one.
The regression runs over the window months up to the period end. The premium \(\lambda_{F}\) of each factor F is its average monthly return \(R_{F , m}\) over the N months from the start of the factor file (July 1963) up to the period end, times 12.
The formula is as follows:
\[R_{i} - R_{f} = \alpha + \beta_{M} \cdot (R_{M} - R_{f}) + \beta_{\text{SMB}} \cdot \text{SMB} + \beta_{\text{HML}} \cdot \text{HML} + \epsilon\] \[\lambda_{F} = \frac{12 \cdot \sum_{m=1}^{N} R_{F,m}}{N}\] \[\text{Cost of Equity} = \text{Risk Free Rate} + \beta_{M} \cdot \lambda_{M} + \beta_{\text{SMB}} \cdot \lambda_{\text{SMB}} + \beta_{\text{HML}} \cdot \lambda_{\text{HML}}\]The monthly returns are compounded from the daily returns of the stock and of the factors of Kenneth French’s data library (the market’s total return and the one-month Treasury bill rate compounded apart, their difference the market factor). The risk-free rate is the Toolkit’s risk-free rate (the 10-year Treasury yield unless set otherwise) at the fiscal period end, as in the Cost of Equity of the CAPM. The cost of equity is a yearly rate.
Also known as: three-factor cost of equity, Fama-French cost of capital, FF3 required return.
Example · AAPL, MSFT, KO, XOM · 2016 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_fama_french_cost_of_equity:
from financetoolkit import Toolkit
toolkit = Toolkit(
["AAPL", "MSFT", "KO", "XOM"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2016-01-01",
end_date="2025-12-31",
)
toolkit.models.get_fama_french_cost_of_equity().xs("Cost of Equity", level=1).loc[:, "2021":]
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
What cost of equity did the Fama-French three-factor model give for Apple, Microsoft, Coca-Cola and ExxonMobil from 2021 to 2025, with data from 2016?
Which returns:
| Item | 2021 | 2022 | 2023 | 2024 | 2025 |
|---|---|---|---|---|---|
| AAPL | 0.0801 | 0.0986 | 0.1146 | 0.1065 | 0.1005 |
| KO | 0.0682 | 0.0835 | 0.0850 | 0.0984 | 0.0838 |
| MSFT | 0.0603 | 0.0739 | 0.0815 | 0.0883 | 0.0882 |
| XOM | 0.1274 | 0.1584 | 0.1426 | 0.1496 | 0.1246 |
4 rows
Parameters
get_fama_french_cost_of_equity accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
window | int | The number of months of returns the loadings are estimated on, up to each period end; a period with fewer than 24 months of returns is NaN. Defaults to 60, five years as in Fama and French (1997). | 20 |
region | str | The region whose factors to use. Options are: “United States”, “Developed”, “Developed ex US”, “Europe”, “Japan”, “Asia Pacific ex Japan”, “North America”. Every region’s factors are U.S. dollar returns. Defaults to “United States”. | "Europe" |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the values. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
transform | str | list[str] | None | Time series steps applied in order, such as “sma:12” (moving average), “ema:12”, “std:12”, “zscore:60”, “percentile:120”, “yoy”, “pct_change:3,annualize:3”, “log”, “diff”, “cumsum” or “hp_trend” and “hp_cycle” (Hodrick-Prescott), before growth. A window needs that many periods of history, so the first periods can be empty. Defaults to None. | None |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
References
- Paper Fama, E. F. and French, K. R. (1993). Common Risk Factors in the Returns on Stocks and Bonds. Journal of Financial Economics, 33(1), 3-56.
- Paper Fama, E. F. and French, K. R. (1997). Industry Costs of Equity. Journal of Financial Economics, 43(2), 153-193.