Government Bond Yield Curve
Retrieves the government bond yield curve of a variety of countries: the yield of every maturity a country’s government borrows at, from treasury bills to bonds of 30 years and more.
The yield curve is the basis for discounting cash flows and pricing bonds, and its shape is one of the most watched signals in markets: an inverted curve, with short rates above long rates, has preceded most recessions.
Every curve comes from the official source:
- United States: the U.S. Department of the Treasury’s par yield curve, 1 month to 30 years, from 1990.
- Euro Area: the yield curve the European Central Bank estimates from the bonds of all euro area central governments, 3 months to 30 years, from 2004, as zero-coupon (spot) rates of a Svensson model, continuously compounded.
- Germany: the term structure the Deutsche Bundesbank estimates from listed federal securities, 1 to 30 years, as zero-coupon (spot) rates of a Svensson model, continuously compounded.
- United Kingdom: the Bank of England’s nominal par yields of gilts, 5, 10 and 20 years.
- Japan: the Ministry of Finance’s Japanese government bond yields, 1 to 40 years, from 1974.
- Canada: the Bank of Canada’s treasury bill yields (1 month to 1 year, weekly) and benchmark bond yields (2 to 30 years).
- Sweden: the Riksbank’s treasury bill and government bond yields, 1 month to 10 years.
- Norway: Norges Bank’s generic government bond yields, 3 to 10 years.
- Australia: the Reserve Bank of Australia’s government bond yields interpolated to 2, 3, 5 and 10 years, from 2013.
With monthly data, every other European Union member, such as France, Italy, Spain, the Netherlands and Poland, is included with its 10-year yield, the long-term interest rate for convergence purposes the ECB publishes monthly. For other countries, see get_government_bond_yield for the monthly 3-month and 10-year rates of around forty countries from the OECD. Only the requested countries are retrieved, and only the days that are not cached yet.
The yields are returned as decimal fractions per annum (0.0419 for 4.19%), with one column per country and maturity, sorted from the shortest to the longest maturity. Each curve is returned as its source publishes it: the Euro Area and Germany curves are continuously compounded zero-coupon rates, while the other countries publish par or benchmark bond yields, which compound with the coupon frequency of their bonds. The two are not interchangeable: a continuously compounded zero rate r equals an annually compounded zero rate of exp(r) - 1, and a par yield is the coupon rate at which a bond prices at par, which differs from the zero rate of the same maturity whenever the curve is not flat. Weekly and monthly periods take the yields on the last trading day of each period (weeks end on Friday).
Also known as: yield curve, term structure of interest rates, sovereign curve, treasury curve, bund curve, gilt curve, JGB curve.
Example · United States, Germany · 2026
Install the Finance Toolkit with pip install financetoolkit -U, then call get_government_bond_yield_curve:
from financetoolkit import FixedIncome
fixedincome = FixedIncome(start_date='2026-09-28', end_date='2026-10-01')
yield_curve = fixedincome.get_government_bond_yield_curve(
countries=['United States', 'Germany']
)
yield_curve['Germany'][['1Y', '2Y', '5Y', '10Y', '20Y', '30Y']]
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
What were Germany's government bond yields at 1, 2, 5, 10, 20 and 30 years on each day from 28 September to 1 October 2026?
Which returns:
| Item | 1Y | 2Y | 5Y | 10Y | 20Y | 30Y |
|---|---|---|---|---|---|---|
| 2026-09-28 | 0.0310 | 0.0332 | 0.0344 | 0.0369 | 0.0393 | 0.0401 |
| 2026-09-29 | 0.0307 | 0.0329 | 0.0341 | 0.0368 | 0.0394 | 0.0403 |
| 2026-09-30 | 0.0304 | 0.0324 | 0.0336 | 0.0364 | 0.0390 | 0.0399 |
| 2026-10-01 | 0.0302 | 0.0321 | 0.0335 | 0.0366 | 0.0394 | 0.0403 |
4 rows
Parameters
get_government_bond_yield_curve accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
countries | list[str] | str | None | The countries to retrieve, from “United States”, “Euro Area”, “Germany”, “United Kingdom”, “Japan”, “Canada”, “Sweden”, “Norway” and “Australia”, and with monthly data any European Union member. Defaults to None, which retrieves every country. | ["United States", "Germany"] |
period | str | The frequency of the data. Options are: “daily”, “weekly”, “monthly”. Defaults to “daily”. | "weekly" |
rounding | int | None | The number of decimals to round the results to. Defaults to None. | 2 |
growth | bool | Whether to return the growth data or the actual data. Defaults to False. | True |
lag | int | The number of periods to lag the data by. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
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 |