U.S. Treasury Par Yield Curve
Retrieves the daily U.S. Treasury par yield curve rates as officially published by the U.S. Department of the Treasury, covering every maturity from 1 Month through 30 Year in a single dataset. This is the official, risk-free curve widely used as the discount curve for bond valuation and as the benchmark for credit spreads.
No API key is needed: with a FinancialModelingPrep API key the rates come from FinancialModelingPrep, and without one, or when the key’s plan does not include them, from the U.S. Department of the Treasury directly, which gives the same figures.
These are par yields: the coupons at which a new Treasury of each maturity would price at par, interpolated by the Treasury from the most recently auctioned securities. Discounting individual cash flows needs zero-coupon (spot) rates bootstrapped from them; on a steep curve the two differ by several basis points at long maturities. The 10-year minus 2-year and 10-year minus 3-month spreads from this curve are the most watched recession indicators.
Also known as: the Treasury yield curve, the risk-free curve.
U.S. Treasury Par Yield Curve in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_treasury_rates as shown below.
from financetoolkit import FixedIncome
fixedincome = FixedIncome(start_date='2024-01-01', end_date='2024-01-15')
fixedincome.get_treasury_rates()
Or, after setting up the Finance Toolkit MCP, ask:
What were the US Treasury par yields from 1 month to 30 years on each trading day from 1 to 15 January 2024?
Which returns:
| Date | 1 Month | 2 Month | 3 Month | 6 Month | 1 Year | 2 Year | 3 Year | 5 Year | 7 Year | 10 Year | 20 Year | 30 Year |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2024-01-02 | 0.0555 | 0.0554 | 0.0546 | 0.0524 | 0.048 | 0.0433 | 0.0409 | 0.0393 | 0.0395 | 0.0395 | 0.0425 | 0.0408 |
| 2024-01-03 | 0.0554 | 0.0554 | 0.0548 | 0.0525 | 0.0481 | 0.0433 | 0.0407 | 0.039 | 0.0392 | 0.0391 | 0.0421 | 0.0405 |
| 2024-01-04 | 0.0556 | 0.0548 | 0.0548 | 0.0525 | 0.0485 | 0.0438 | 0.0414 | 0.0397 | 0.0399 | 0.0399 | 0.043 | 0.0413 |
| 2024-01-05 | 0.0554 | 0.0548 | 0.0547 | 0.0524 | 0.0484 | 0.044 | 0.0417 | 0.0402 | 0.0404 | 0.0405 | 0.0437 | 0.0421 |
| 2024-01-08 | 0.0554 | 0.0548 | 0.0549 | 0.0524 | 0.0482 | 0.0436 | 0.0411 | 0.0397 | 0.0399 | 0.0401 | 0.0433 | 0.0417 |
| 2024-01-09 | 0.0553 | 0.0546 | 0.0547 | 0.0524 | 0.0482 | 0.0436 | 0.0409 | 0.0397 | 0.04 | 0.0402 | 0.0433 | 0.0418 |
| 2024-01-10 | 0.0553 | 0.0546 | 0.0546 | 0.0523 | 0.0482 | 0.0437 | 0.041 | 0.0399 | 0.0401 | 0.0404 | 0.0435 | 0.042 |
| 2024-01-11 | 0.0554 | 0.0547 | 0.0546 | 0.0522 | 0.0475 | 0.0426 | 0.0402 | 0.039 | 0.0395 | 0.0398 | 0.0432 | 0.0418 |
| 2024-01-12 | 0.0555 | 0.0547 | 0.0545 | 0.0516 | 0.0465 | 0.0414 | 0.0392 | 0.0384 | 0.0391 | 0.0396 | 0.0432 | 0.042 |
Parameters
get_treasury_rates accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
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 |