rates
Retrieve central bank policy, government bond yields, overnight benchmarks, and yield curves by country and date range for financial analysis.
Instructions
Interest rate data (central bank policy rates, short/long-term rates, government bond yields, ICE BofA corporate bond series, EURIBOR, ECB rates, Federal Reserve rates, official U.S. Treasury par yield curve, yield curve slope). Requires countries='United States' — use comma-separated values for multiple countries. Do NOT use tickers= for this tool. Supports start_date/end_date. Indicators with a period come at the highest frequency they are published at unless period= says otherwise (daily, else weekly, monthly, quarterly, yearly); keep the date range short for daily series. quarterly=true returns quarterly data only where a source has it (a note says when it does not). Without an API key: get_central_bank_policy_rate defaults to daily rates (BIS, around fifty central banks incl. 'Euro Area'); get_long_term_interest_rate defaults to daily 10-year yields for the United States, United Kingdom, Japan and Euro Area and to monthly otherwise; get_government_bond_yield returns monthly OECD 10-year yields (short_term=true for 3-month rates) for every OECD country; get_overnight_rate returns €STR, SONIA, TONA and SOFR (Euro Area, United Kingdom, Japan, United States) with period='daily', 'weekly' or 'monthly'. get_government_bond_yield_curve returns full government yield curves (columns per country and maturity, e.g. 3M to 30Y) for the United States, Euro Area, Germany, United Kingdom, Japan, Canada, Sweden, Norway and Australia, daily, weekly or monthly, plus the monthly 10-year yield of every other EU member (e.g. France, Italy, Spain) with period='monthly'; keep the date range short (a few weeks) or use period='monthly', since one country is up to 15 maturities per day. get_treasury_rates returns the US par yield curve and works without an API key. Curve analytics without an API key, on the curves of get_government_bond_yield_curve (the full history from start_date, so use period='monthly' for long ranges): get_zero_coupon_curve (zero-coupon rates bootstrapped from the par yields; United States, Euro Area, Germany, Japan, Canada, Sweden; countries= optional, United States by default), get_nelson_siegel_svensson (Svensson parameters Beta 0-3, Tau 1-2 and the fit error per date, svensson=false for the three-factor Nelson-Siegel level/slope/curvature; maturities='0.5,1,10,50' returns the fitted zero-coupon yields instead), get_yield_curve_principal_components (one country: level/slope/curvature loadings with the explained variance as the last row, scores=true for the scores per date, changes=false to analyze levels), get_short_rate_model (one country: Vasicek and CIR calibrated to the history of the short_rate='3M' yield, with the model's zero-coupon curve next to the market's; CIR needs a rate above zero throughout, so use short_rate='6M' or a later start_date for the US) and get_short_rate_simulation (one country: model='hull_white' (fits today's curve), 'vasicek' or 'cir'; short_rate=, years=, steps_per_year=, paths=; returns the mean and 5-95% percentiles per step). get_treasury_auctions returns US Treasury auction results (no countries needed; security_type='Bill'|'Cash Management Bill'|'Note'|'Bond'|'TIPS'|'FRN', security_term= e.g. '10-Year'; yield, bid-to-cover ratio, amounts and primary dealer/direct/indirect bidder shares, from 1979; keep the date range short). The central bank policy rate, short/long-term rate, overnight rate and yield curve slope indicators additionally support rolling=N (moving-average smoothing) and trailing=N (trailing N-period sum). Also includes get_mortgage_rate_30_year (Freddie Mac, US only, works without an API key). Inflation-linked curves without an API key, columns per country and maturity, countries= optional: get_real_yield_curve (real yields of inflation-linked government bonds: United States TIPS, United Kingdom index-linked gilts, Germany inflation-linked federal bonds at constant maturities) and get_breakeven_inflation_expectations (market-implied inflation, nominal minus real: United States incl. 5Y5Y forward, United Kingdom RPI implied inflation, Germany as the euro area proxy), both with period='daily', 'weekly' or 'monthly'; get_inflation_expectations (survey-based longer-term inflation expectations: Germany 5Y and 10Y monthly from 1989 via Consensus Economics, Euro Area 5Y from the ECB Survey of Professional Forecasters from 1999), period='monthly' or 'quarterly'. Long-history US credit series: get_hqm_corporate_bond_yield_curve (Treasury HQM corporate curve, rate='spot' for 6 months to 100 years or 'par', monthly from 1984), get_hqm_corporate_bond_spread (HQM par minus Treasury yields at 2, 5, 10 and 30 years, from 1984), get_moodys_corporate_bond_yields (Aaa and Baa, daily from 1986 or period='monthly' from 1919; spread=true for the spreads over the 10-year Treasury and Baa - Aaa) and get_excess_bond_premium (Gilchrist-Zakrajšek credit spread, excess bond premium and implied recession probability, monthly from 1973, no key needed). Also without a key: get_eiopa_risk_free_rate (EIOPA Solvency II risk-free curves for the euro and 40 other currencies, 1 to 150 years, monthly from 2023; countries= e.g. 'Euro Area,United Kingdom', curve='spot_no_va'|'spot_with_va'|'shock_up'|'shock_down'; returns the 1, 2, 5, 10, 20 and 30 year maturities unless maturity_years= lists others, e.g. '1,3,7,50'), get_bank_of_england_yield_curve (UK zero-coupon spot curve, curve='nominal'|'ois', 0.5 to 40 years, daily from 1985), get_corporate_borrowing_cost (ECB cost of bank borrowing for euro area companies, monthly from 2003), get_corporate_bond_yields (monthly corporate bond yields by country: Germany all ratings from 1957 (Bundesbank), Australia A and BBB at 3, 5, 7 and 10 years from 2005 (RBA), United States Moody's Aaa/Baa with a FRED key; spread=true for the spread over government bonds), get_rating_transition_matrix (ESMA CEREP rating migration matrix of a rating agency, agency='S&P'|'Moody's'|'Fitch'|'DBRS'|'Scope'|..., rating_type='corporate'|'sovereign'|'structured_finance'|'covered_bonds', year=, horizon= years, region= e.g. 'Europe'; probabilities, withdrawal-adjusted), get_default_rates (one-year default rates per rating per year from the agency's first reported year, ESMA CEREP; slow the first time, about 30 seconds per year), get_eiopa_symmetric_adjustment (Solvency II equity dampener and type 1/type 2 equity charges, daily from 1991) and get_financial_stress_index (ECB CISS for the euro area, its members, the UK, US and China, daily from 1980). The HQM, Moody's and ICE BofA series require a free FRED API key (get one at https://fred.stlouisfed.org/docs/api/api_key.html). The ICE BofA option-adjusted spreads are decimals like the other rates (0.0077 is 77 basis points).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lag | No | Number of periods to lag when computing growth rates. | |
| rate | No | For get_european_central_bank_rates: The rate to return. Choose between 'refinancing', 'lending' or 'deposit'. For get_federal_reserve_rates: The rate to return. For get_hqm_corporate_bond_yield_curve: "spot" for the spot rates or "par" for the par yields. Leave unset to use the default of the indicator you selected. Defaults are 'EFFR' for get_federal_reserve_rates; None for get_european_central_bank_rates; 'spot' for get_hqm_corporate_bond_yield_curve. | |
| seed | No | The random seed, None for a different simulation every time. | |
| year | No | The first year of the period. | |
| curve | No | For get_eiopa_risk_free_rate: "spot_no_va", "spot_with_va", "shock_up" or "shock_down". For get_bank_of_england_yield_curve: "nominal" or "ois". Leave unset to use the default of the indicator you selected. Defaults are 'nominal' for get_bank_of_england_yield_curve; 'spot_no_va' for get_eiopa_risk_free_rate. | |
| limit | No | The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. | |
| model | No | "hull_white", "vasicek" or "cir". | hull_white |
| paths | No | The number of simulated paths. | |
| years | No | The horizon in years. | |
| agency | No | The rating agency, e.g. "S&P", "Moody's", "Fitch", "DBRS", "Scope" or "Kroll", or the CEREP code of any registered agency. | S&P |
| growth | No | Return period-over-period growth rates instead of absolute values. | |
| period | No | Observation frequency, e.g. 'daily', 'weekly', 'monthly', 'quarterly', or 'annual' (supported values differ per method). Leave unset to use the default of the indicator you selected. Defaults differ between indicators. | |
| region | No | The area of the rated entities: "Africa", "America", "Asia", "Europe", "EU members", "International" or "Oceania". | |
| scores | No | Whether to return the value of every component per date (the scores) instead of the loadings. | |
| spread | No | For get_moodys_corporate_bond_yields: Whether to return the spreads over the 10-year Treasury yield instead of the yields. For get_corporate_bond_yields: Whether to return the spread over government bonds instead of the yield. | |
| changes | No | With series: how their changes (the 'Return' column the regressions and diagnostics use) are calculated: 'percentage' (default), 'log', 'difference' (for rates and ratios) or 'none' (the series are changes already). The series themselves are the 'Adj Close' column the unit root and cointegration tests use. | |
| country | No | The country, see `get_government_bond_yield_curve`. | United States |
| horizon | No | The length of the period in years, from 1 January of year. | |
| nominal | No | Whether to retrieve the nominal Euribor fixings or their real (inflation-adjusted) counterpart. The ECB only publishes a real Euribor for the 3-month maturity, so nominal=False returns that maturity alone and warns about any others that were requested rather than silently answering them with a... | |
| rolling | No | Rolling window size in number of periods. When set, the metric is computed over a smoothly overlapping trailing window across the full history (e.g. period='monthly' and rolling=6 gives a rolling 6-month value) instead of one value per period, or (for economics indicators) a simple moving average used to smooth the raw series. | |
| end_date | No | End of the date range in YYYY-MM-DD format. | 2026-10-27 |
| maturity | No | Whether to return the maturity total return or the rating total return. | |
| svensson | No | Whether to fit the Svensson model (True) or the Nelson-Siegel model (False). | |
| trailing | No | Trailing window size in number of periods. Sums the raw values over the trailing N periods (e.g. trailing=4 on quarterly data gives a trailing-4-quarter / TTM-style sum) instead of returning one value per period. | |
| countries | No | Country names, comma-separated or as a list, e.g. 'United States,Germany,Japan'. | |
| indicator | Yes | Name of the specific metric to calculate, one of the listed values. Required — search_metrics finds the indicator (and its tool) for a metric by name. | |
| quarterly | No | Return quarterly data instead of annual when True. | |
| components | No | The number of components. | |
| maturities | No | Comma-separated maturities, e.g. '1M,3M,6M,1Y'. | |
| short_rate | No | The maturity of the yield used as the short rate, such as "1M", "3M" or "6M". | 3M |
| short_term | No | Whether to return the short-term interest rate. This means that the long-term interest rate will be returned. | |
| start_date | No | Start of the date range in YYYY-MM-DD format. | 2021-10-28 |
| gmdb_source | No | Use the Global Macro Database as the data source when True, rather than the OECD. The two are independent providers with different country and period coverage; both return rates and ratios as decimal fractions. | |
| rating_type | No | "corporate", "sovereign", "structured_finance" or "covered_bonds". | corporate |
| standardize | No | Return the Z-Score (standard score) instead of the raw values, i.e. how many standard deviations each value is from the mean of its own series. When combined with growth=True, the growth values are standardized instead of the raw values. | |
| show_columns | No | Comma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage. | |
| probabilities | No | Whether to return the share of ratings per row instead of the number. | |
| security_term | No | The term as the Treasury writes it, such as "13-Week", "10-Year" or "30-Year". | |
| security_type | No | The kind of security: "Bill", "Cash Management Bill", "Note", "Bond", "TIPS" or "FRN", or several (a list or a comma-separated string). | |
| gmdb_forecasts | No | Set to true to include the years the Global Macro Database projects (IMF World Economic Outlook, up to five years ahead); by default a yearly series ends with its last observation. | |
| maturity_years | No | Comma-separated maturities in years to return, e.g. '1,2,5,10,20,30'. Leave unset to use the default of the indicator you selected. Defaults are [1, 2, 5, 10, 20, 30] for get_eiopa_risk_free_rate. | |
| steps_per_year | No | The steps per year. | |
| include_withdrawals | No | Whether to keep the ratings withdrawn during the period as a "Withdrawals" column. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |