Earnings Yield
Calculate the earnings yield ratio, a valuation ratio that measures the earnings per share relative to the market price per share.
The earnings yield ratio is a valuation metric that provides insights into how much a company’s earnings contribute to its stock price. It compares the earnings per share to the market price per share, helping investors understand the earnings potential of the company relative to its current market value
The formula is as follows:
\[\text{Earnings Yield Ratio} = \text{Earnings per Share} / \text{Share Price}\]Also known as: E/P ratio, inverse PE ratio.
Earnings Yield in Python
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_earnings_yield as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
earnings_yield_ratio = toolkit.ratios.get_earnings_yield()
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| AAPL | 0.0316 | 0.047 | 0.0319 | 0.0243 | 0.0275 |
| TSLA | 0.0046 | 0.0294 | 0.0173 | 0.005 | 0.0024 |
Parameters
The function accepts the following parameters:
- show_daily (bool, optional): Whether to show daily data. Defaults to False.
- include_dividends (bool, optional): Whether to include dividends in the calculation. Defaults to False.
- diluted (bool, optional): Whether to use diluted shares in the calculation. Defaults to True.
- rounding (int, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the ratios. Defaults to False.
- lag (int | str, optional): The lag to use for the growth calculation. Defaults to 1.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
- trailing (int): Defines whether to select a trailing period. E.g. when selecting 4 with quarterly data, the TTM is calculated.