Operating Profitability
Calculate the operating profitability of Fama and French (2015), the measure behind the profitability factor RMW (robust minus weak) of their five-factor model: the operating profit after interest that a company earns on its book equity.
Fama and French find that companies with a robust operating profitability earn higher returns than those with a weak one, also after controlling for value, size and investment. Book equity follows their definition: the stockholders’ equity (without minority interest) plus the balance sheet deferred taxes, minus the preferred stock.
The formula is as follows:
\[\text{Operating Profitability} = (\text{Revenue} - \text{Cost of Goods Sold} - \text{Selling},\; \text{General and Administrative Expenses} - \text{Research and Development Expenses} - \text{Interest Expense}) / \text{Book Equity}\] \[\text{Book Equity} = \text{Total Shareholder Equity} + \text{Deferred Tax Liabilities} - \text{Preferred Stock}\]The selling, general and administrative expenses of Compustat (XSGA), which Fama and French use, include research and development, while the statements here report it separately, so both are deducted. The book equity is that at the end of the fiscal year, the same date as the profit (a point in time, not averaged), and a book equity of zero or less has no value (NaN), as Fama and French leave those companies out. Operating profitability is an annual measure, so with quarterly data the profit is that of the trailing twelve months by default.
Also known as: OP, RMW, robust minus weak, Fama-French profitability.
Operating Profitability in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_operating_profitability as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["JNJ", "PFE", "MRK", "ABBV"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.ratios.get_operating_profitability()
Or, after setting up the Finance Toolkit MCP, ask:
What was the operating profitability of Johnson & Johnson, Pfizer, Merck and AbbVie, relative to their book equity, from 2021 to 2025?
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| ABBV | 0.6533 | 0.6413 | 0.5861 | 0.8289 | 3.614 |
| JNJ | 0.2547 | 0.2567 | 0.3145 | 0.2894 | 0.2788 |
| MRK | 0.3033 | 0.3703 | 0.0631 | 0.4123 | 0.4095 |
| PFE | 0.292 | 0.4188 | 0.0774 | 0.1897 | 0.2206 |
Parameters
get_operating_profitability accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
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 ratios. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
compound | bool | Whether the growth is the compound annual growth rate over the lag (e.g. lag=5 for the five-year CAGR) instead of the total change. Defaults to False. | False |
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 |
trailing | int | The number of periods to sum the income statement items over; the book equity stays that at the end of the last period. Defaults to None, which uses the trailing twelve months (4 quarters) with quarterly data and single years with annual data. | 4 |