Computes the credit spread of high quality US corporate bonds per maturity: the Treasury’s High Quality Market (HQM) corporate par yield minus the Treasury constant maturity yield, at 2, 5, 10 and 30 years, monthly from 1984. Both legs are par yields averaged over the month, so they are directly comparable. The spread is what investors demand for the default and liquidity risk of investment grade companies, and its shape across maturities, usually wider for longer maturities, shows how that compensation grows with time.

Unlike the ICE BofA option-adjusted spreads (see get_ice_bofa_option_adjusted_spread), of which FRED only carries the last three years, this spread covers four decades, long enough to calibrate how credit spreads behave through several business cycles.

The data comes from FRED, so a free FRED API key is required. The spreads are returned as decimal fractions (0.0079 for 0.79 percentage points).

Also known as: corporate credit spread curve, credit spread term structure, investment grade spread.

HQM Corporate Bond Spread in Python

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_hqm_corporate_bond_spread as shown below.

from financetoolkit import FixedIncome

fixedincome = FixedIncome(start_date='2026-03-01', end_date='2026-08-31')

fixedincome.get_hqm_corporate_bond_spread()

Which returns:

  2Y 5Y 10Y 30Y
2026-03 0.0048 0.006 0.0078 0.0091
2026-04 0.0042 0.0053 0.0071 0.0084
2026-05 0.0037 0.005 0.007 0.0082
2026-06 0.0035 0.0049 0.0071 0.0083
2026-07 0.0035 0.0053 0.0075 0.0092
2026-08 0.0036 0.0056 0.0079 0.0095

Parameters

The function accepts the following parameters:

  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.
  • growth (bool, optional): Whether to return the growth data or the actual data. Defaults to False.
  • lag (int, optional): The number of periods to lag the growth data by. 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.
Share