Skip to main content

Fixed Income

The Fixed Income module is the high-level menu for the Fixed Income asset class. It contains reference rates (ESTER, SOFR, SONIA and Ameribor), central bank rates (FRED, FOMC projections and ECB key interest rates), government bonds (treasury rates for any country, us-specific rates, yield curves), corporate bonds (ICE BofA Corporate Indices, Moody's AAA and BAA Corporate Indices, Commercial Paper, Spot Rates and HQM Corporate Yield Curve) and spread (ICE BofA spreads, constant maturity spreads, and federal funds rate)

How to Use

​The examples provided below will assume that the following import block is included at the beginning of the Python script or Notebook file: ​

from openbb_terminal.sdk import openbb
import pandas as pd

​Below is a brief description of each function within the Fixed Income module:

PathTypeDescription
openbb.fixedincome.ameriborFunctionObtain data for American Interbank Offered Rate (AMERIBOR)
openbb.fixedincome.cpFunctionObtain Commercial Paper data
openbb.fixedincome.dwpcrFunctionObtain data for the Discount Window Primary Credit Rate
openbb.fixedincome.ecbFunctionObtain data for ECB interest rates
openbb.fixedincome.ecbycrvFunctionGets euro area yield curve data from ECB
openbb.fixedincome.estrFunctionObtain data for Euro Short-Term Rate (ESTR)
openbb.fixedincome.fedFunctionObtain data for Effective Federal Funds Rate
openbb.fixedincome.ffrmcFunctionGet data for Selected Treasury Constant Maturity Minus Federal Funds Rate
openbb.fixedincome.hqmFunctionObtain the HQM yield curve
openbb.fixedincome.icebofaFunctionGet data for ICE BofA US Corporate Bond Indices
openbb.fixedincome.icespreadFunctionGet data for ICE BofA US Corporate Bond Spreads
openbb.fixedincome.iorbFunctionObtain data for Interest Rate on Reserve Balances.
openbb.fixedincome.moodyFunctionGet data for Moody Corporate Bond Index
openbb.fixedincome.projectionFunctionObtain data for the Federal Reserve's projection of the federal funds rate
openbb.fixedincome.sofrFunctionObtain data for Secured Overnight Financing Rate (SOFR)
openbb.fixedincome.soniaFunctionObtain data for Sterling Overnight Index Average (SONIA)
openbb.fixedincome.spotFunctionObtain HQM spot rate data
openbb.fixedincome.tbffrFunctionGet data for Selected Treasury Bill Minus Federal Funds Rate
openbb.fixedincome.tmcFunctionGet data for 10-Year Treasury Constant Maturity Minus Selected Treasury Constant Maturity
openbb.fixedincome.treasuryFunctionObtain 3-month or 10-year treasury rates for any country
openbb.fixedincome.usratesFunctionPlot various treasury rates from the United States
openbb.fixedincome.ycrvFunctionGets yield curve data from FRED

Alternatively you can print the contents of the Fixed Income SDK with: ​

help(openbb.fixedincome)

Examples

Starting off by calling some reference rates, these can be either estr, sofr, sonia or ameribor. For example the 1 year term structure of Ameribor is plotted with openbb.fixedincome.ameribor('1_year_term_structure') as shown below, showing only the last 10 periods in this example:

AMERIBOR
2023-02-12 00:00:005.13275
2023-02-13 00:00:005.15549
2023-02-14 00:00:005.22839
2023-02-15 00:00:005.20813
2023-02-16 00:00:005.20832
2023-02-17 00:00:005.2491
2023-02-19 00:00:005.2491
2023-02-20 00:00:005.2491
2023-02-21 00:00:005.32425
2023-02-22 00:00:005.32988

The two most prominent central bank rates, those of the Federal Reserve and the European Central Bank can be obtained with openbb.fixedincome.fed and openbb.fixedincome.ecb respectively. For instance openbb.fixedincome.fed shows the monthly Federal Funds Rate, showing only the last 10 periods in this example:

FED
2022-04-01 00:00:000.33
2022-05-01 00:00:000.77
2022-06-01 00:00:001.21
2022-07-01 00:00:001.68
2022-08-01 00:00:002.33
2022-09-01 00:00:002.56
2022-10-01 00:00:003.08
2022-11-01 00:00:003.78
2022-12-01 00:00:004.1
2023-01-01 00:00:004.33

This can be accompanied with the projections, officially published by the FOMC. Here the long run expectations are plotted, which also backtracks several years, with openbb.fixedincome.projection(long_run=True), showing only the last 5 periods in this example:

Range HighCentral tendency HighMedianRange MidpointCentral tendency MidpointRange LowCentral tendency Low
2021-12-1532.52.52.52.422.3
2022-03-1632.52.42.52.422.3
2022-06-1532.52.52.52.422.3
2022-09-2132.52.52.652.42.32.3
2022-12-143.32.52.52.82.42.32.3

The European Central Bank rates can be shown with openbb.fixedincome.ecb. The ECB publishes three different rates that can be shown separately with openbb.fixedincome.ecb('deposit) for example or plotted together with openbb.fixedincome.ecb as shown below, showing only the last 10 periods in this example:

DepositLendingRefinancing
2023-02-142.53.253
2023-02-152.53.253
2023-02-162.53.253
2023-02-172.53.253
2023-02-182.53.253
2023-02-192.53.253
2023-02-202.53.253
2023-02-212.53.253
2023-02-222.53.253
2023-02-232.53.253

In terms of government bonds, any combination of short term (3 month) and long term (10 year) government bonds for any country can be plotted with openbb.fixedincome.treasury for example openbb.fixedincome.treasury(short_term=['canada', 'united_states'], long_term=['canada', 'united_states']) as shown below, showing only the last 10 periods in this example:

canada (3 month)united_states (3 month)canada (10 year)united_states (10 year)
2022-04-012.7042.751.346640.91
2022-05-012.918572.91.781891.33
2022-06-013.315453.142.247351.87
2022-07-013.043162.93.014112.5
2022-08-012.859092.93.382212.76
2022-09-013.14793.523.791933.21
2022-10-013.380533.984.230833.85
2022-11-013.166193.894.376344.46
2022-12-012.94153.624.553024.51
2023-01-012.937623.534.76384.61

For both the United States and the Eurozone, it is possible to see the current government bond yield curve. For the Eurozone, it is an aggregation of countries that match a specific credit rating, by default AAA, as shown with openbb.fixedincome.ecbycrv.

MaturityRate
00.252.61446
10.52.86441
212.97514
322.82012
432.68811
552.58939
672.57123
7102.57545
8202.55717
9302.45648

When it comes to Corporate Bonds, the major indices are included. These are the ICE BofA indices and the Moody's Aaa and Baa indices. Based on a query, specific benchmarks can be found. For example a collection of indices matching a variety of bond maturities with openbb.fixedincome.icebofa(category='duration'), showing only the last 5 periods in this example:

ICE BofA 1-3 Year US Corporate Index Effective YieldICE BofA 3-5 Year US Corporate Index Effective YieldICE BofA 5-7 Year US Corporate Index Effective YieldICE BofA 7-10 Year US Corporate Index Effective YieldICE BofA 10-15 Year US Corporate Index Effective YieldICE BofA 15+ Year US Corporate Index Effective Yield
2023-02-095.225.045.125.25.345.32
2023-02-105.275.115.215.35.435.41
2023-02-135.285.145.25.285.415.38
2023-02-145.365.235.285.325.445.39
2023-02-155.365.265.315.365.485.43
2023-02-165.385.295.355.425.545.52
2023-02-175.375.265.335.425.535.5
2023-02-205.395.275.335.425.535.5
2023-02-215.495.415.495.585.685.63
2023-02-225.495.45.485.565.655.59

The Moody's Aaa is often referred to as a great alternative to the federal ten-year Treasury bill as an indicator for interest rates and can be plotted with openbb.fixedincome.moody, showing only the last 5 periods in this example:

aaa_index
2023-02-154.59
2023-02-164.64
2023-02-174.65
2023-02-214.76
2023-02-224.71

Next to that, there are spot rates available for the High Quality Market (HQM) ranging from 1 year to a 100 years through openbb.fixedincome.spot. With this, it is also possible to plot the yield curve with openbb.fixedincome.hqm for any date in the past. For example openbb.fixedincome.hqm(date='2020-01-01') as shown below:

Maturityspot
0.51.76
11.8
21.86
31.91
52.07
72.35
102.79
203.35
303.48
503.6
753.65
1003.68

Furthermore, it is possible to see spreads between a variety of assets. For example the Emerging Markets spread can be shown with openbb.fixedincome.icespread(category='all', area='emea'). This is based on the spot treasury curve. Showing only the last 5 periods in this example:

ICE BofA EMEA Emerging Markets Corporate Plus Index Option-Adjusted Spread
2023-02-162.66
2023-02-172.75
2023-02-202.75
2023-02-212.74
2023-02-222.77

For both openbb.fixedincome.icebofa and openbb.fixedincome.icespread it is possible to see all the options with options. Find an example for openbb.fixedincome.icespread(options=True) below.

TypeCategoryAreaGradeTitle
2spreaddurationusnon_sovereignICE BofA 1-3 Year US Corporate Index Option-Adjusted Spread
6spreaddurationusnon_sovereignICE BofA 3-5 Year US Corporate Index Option-Adjusted Spread
10spreaddurationusnon_sovereignICE BofA 5-7 Year US Corporate Index Option-Adjusted Spread
14spreaddurationusnon_sovereignICE BofA 7-10 Year US Corporate Index Option-Adjusted Spread
18spreaddurationusnon_sovereignICE BofA 10-15 Year US Corporate Index Option-Adjusted Spread
22spreaddurationusnon_sovereignICE BofA 15+ Year US Corporate Index Option-Adjusted Spread
26spreadallusnon_sovereignICE BofA US Corporate Index Option-Adjusted Spread
30spreadusdushigh_yieldICE BofA US High Yield Index Option-Adjusted Spread
34spreadeureuhigh_yieldICE BofA Euro High Yield Index Option-Adjusted Spread
38spreadallex_g10non_sovereignICE BofA Emerging Markets Corporate Plus Index Option-Adjusted Spread
42spreadallex_g10private_sectorICE BofA Private Sector Financial Emerging Markets Corporate Plus Index Option-Adjusted Spread
46spreadusdex_g10non_sovereignICE BofA US Emerging Markets Corporate Plus Index Option-Adjusted Spread
50spreadeurex_g10non_sovereignICE BofA Euro Emerging Markets Corporate Plus Index Option-Adjusted Spread
54spreadusdex_g10non_sovereignICE BofA US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
58spreadusdex_g10non_financialICE BofA Non-Financial US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
62spreadusdex_g10public_sectorICE BofA Public Sector Issuers US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
66spreadallemeanon_sovereignICE BofA EMEA Emerging Markets Corporate Plus Index Option-Adjusted Spread
70spreadusdemeanon_sovereignICE BofA EMEA US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
74spreadallasianon_sovereignICE BofA Asia Emerging Markets Corporate Plus Index Option-Adjusted Spread
78spreadusdasianon_sovereignICE BofA Asia US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
82spreadalllatin_americanon_sovereignICE BofA Latin America Emerging Markets Corporate Plus Index Option-Adjusted Spread
86spreadusdlatin_americanon_sovereignICE BofA Latin America US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
90spreadallex_g10aaaICE BofA AAA-A Emerging Markets Corporate Plus Index Option-Adjusted Spread
94spreadusdex_g10aaaICE BofA AAA-A US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
98spreadallex_g10high_gradeICE BofA High Grade Emerging Markets Corporate Plus Index Option-Adjusted Spread
102spreadallex_g10bbbICE BofA BBB Emerging Markets Corporate Plus Index Option-Adjusted Spread
106spreadusdex_g10bbbICE BofA BBB US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread
110spreadallex_g10crossoverICE BofA Crossover Emerging Markets Corporate Plus Index Option-Adjusted Spread
114spreadallex_g10bbICE BofA BB Emerging Markets Corporate Plus Index Option-Adjusted Spread
118spreadallex_g10high_yieldICE BofA High Yield Emerging Markets Corporate Plus Index Option-Adjusted Spread
122spreadallex_g10bICE BofA B & Lower Emerging Markets Corporate Plus Index Option-Adjusted Spread
126spreadusdusaaaICE BofA AAA US Corporate Index Option-Adjusted Spread
130spreadusdusaaICE BofA AA US Corporate Index Option-Adjusted Spread
134spreadusdusaICE BofA Single-A US Corporate Index Option-Adjusted Spread
138spreadusdusbbbICE BofA BBB US Corporate Index Option-Adjusted Spread
142spreadusdusbbICE BofA BB US High Yield Index Option-Adjusted Spread
146spreadusdusbICE BofA Single-B US High Yield Index Option-Adjusted Spread
150spreadusduscccICE BofA CCC & Lower US High Yield Index Option-Adjusted Spread

On this page