Issuer Spreads
Compares the credit spreads of bond issuers at the same maturities: the G-Spread (yield to maturity minus the Treasury par yield) of each issuer at, for example, 2, 5 and 10 years, interpolated between the issuer’s own bonds from get_bond_universe. Picking one bond per issuer by hand compares bonds of different maturities, and spreads rise with maturity; at the same maturity the difference is the credit.
The formula is as follows:
\[\text{Spread} (\text{issuer},\; T) = s(a) + (s(b) - s(a)) \cdot (T - a) / (b - a)\]Where a and b are the years to maturity of the issuer’s bonds closest below and above T and s their G-Spreads (see get_bond_universe). Bonds of the same maturity count with their average spread, and a maturity outside the range of the issuer’s bonds has no spread, as a spread curve is not extrapolated.
Also known as: issuer spread curve, credit curve, spread at a maturity, interpolated G-spread, credit spread comparison.
Issuer Spreads in Python
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_issuer_spreads as shown below.
from financetoolkit import FixedIncome
fixedincome = FixedIncome(api_key="FINANCIAL_MODELING_PREP_KEY")
fixedincome.get_issuer_spreads(issuer="APPLE INC,BOEING,INTEL", maturity_years="2,5,10")
Which returns:
| Issuer | 2Y | 5Y | 10Y | Bonds | Shortest | Longest |
|---|---|---|---|---|---|---|
| APPLE INC | 0.0017 | 0.0029 | 0.0052 | 43 | 1.2473 | 35.7473 |
| BOEING CO | 0.0062 | 0.0083 | 0.0093 | 20 | 1.2283 | 37.4779 |
| INTEL CORPORATION | 0.0081 | 0.0112 | 0.0149 | 35 | 1.2527 | 36.2527 |
Parameters
get_issuer_spreads accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
issuer | list[str] | str | None | The issuers, each kept by the text its name contains (case-insensitive), e.g. “APPLE,BOEING”. Defaults to None, every issuer in the funds. | None, every issuer in the funds |
maturity_years | list[float] | str | float | None | The maturities in years, as a list or comma-separated, e.g. “2,5,10”. Defaults to None, which uses 2, 3, 5, 7, 10, 20 and 30 years. | [1, 5, 10, 30] |
etfs | list[str] | str | None | The bond ETFs to read the bonds from (see get_bond_universe). Defaults to None, LQD, IGSB and USHY. | None, LQD, IGSB and USHY |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the class. | 2 |
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 |