Equity-Bond Yield Gap

Get the equity-bond yield gap of the US stock market: the earnings yield of the S&P Composite minus the 10-year Treasury yield, the comparison known as the Fed model.

The comparison of the earnings yield with the nominal bond yield became known as the Fed model after the Federal Reserve’s Humphrey-Hawkins report of July 1997, which noted that the two had moved together. Asness (2003) showed that it compares a real yield (earnings grow with inflation) with a nominal one and does not predict long-term stock returns; the Excess CAPE Yield (get_excess_cape_yield) compares with a real bond yield instead.

The earnings are those of the twelve months up to the month. The formula is as follows, with Equity Bond Yield Gap the column Equity-Bond Yield Gap:

\[\text{Earnings Yield} = \frac{\text{Earnings}}{\text{Price}}\] \[\text{Equity Bond Yield Gap} = \text{Earnings Yield} - \text{Long Interest Rate}\]

The inputs are those of get_shiller_stock_market_data: the S&P Composite’s monthly average price, its trailing twelve-month earnings (the latest months are not published yet, so they are empty) and the 10-year Treasury yield (GS10, a monthly average of bond-equivalent yields). Every value is a decimal (0.05 for 5%).

Also known as: Fed model, equity risk premium proxy, earnings yield gap, yield gap.

Example · 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_equity_bond_yield_gap:

from financetoolkit import Economics

economics = Economics(start_date='2025-01-01', end_date='2025-12-31')

economics.get_equity_bond_yield_gap()

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

How did the earnings yield of the S&P 500 compare with the 10-year Treasury yield each month in 2025?

Which returns:

Parameters

get_equity_bond_yield_gap accepts the following parameters.

ParameterTypeDescriptionExample
transformstr | list[str] | NoneTime series steps applied in order, such as “sma:12” (moving average), “pct_change”, “yoy”, “zscore:60” or “hp_cycle” (Hodrick-Prescott), before growth and the date range, on the history before the start date. Defaults to None.None
growthboolWhether to return the growth data or the actual data. Defaults to False.True
lagint | list[int]The number of periods to lag the growth data by. Defaults to 1.4
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Economics class.2
show_columnsstr | list[str] | NoneThe 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

Share