Real Yield Curve (TIPS)
Get the daily real (TIPS-implied) U.S. Treasury yield curve from FRED – the Market Yield on Treasury Inflation-Protected Securities at Constant Maturity, for the 5, 7, 10, 20 and 30-Year maturities.
This is genuine market-observed data, as distinct from fixedincome.get_breakeven_inflation_rate, which is a pure formula applied to a hand-specified sample curve rather than real TIPS market data. Use this together with get_breakeven_inflation_expectations to get the market-implied (Q-measure) inflation expectation at each maturity.
Yields are daily, returned as a decimal fraction per annum (0.0174 for 1.74%) and not seasonally adjusted. FRED publishes them in percentage points; they are rescaled here so this curve is on the same decimal scale as fixedincome.get_treasury_rates and can be differenced against it directly. The 20-Year series starts in July 2004 and the 30-Year in February 2010, so earlier dates are NaN for those two maturities.
Requires a free FRED API key, see the fred_api_key parameter of the Economics class.
See definition: https://fred.stlouisfed.org/series/DFII10
Also known as: TIPS yield curve, real Treasury yield curve.
Real Yield Curve (TIPS) in Python
get_real_yield_curve is part of the Economics module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_real_yield_curve as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2024-01-01', end_date='2024-01-15', fred_api_key='FRED_API_KEY')
economics.get_real_yield_curve()
Which returns:
| Date | 5 Year | 7 Year | 10 Year | 20 Year | 30 Year |
|---|---|---|---|---|---|
| 2024-01-02 | 0.0176 | 0.0175 | 0.0174 | 0.0184 | 0.0191 |
| 2024-01-03 | 0.0173 | 0.0171 | 0.0171 | 0.0181 | 0.0189 |
| 2024-01-04 | 0.0179 | 0.0178 | 0.0177 | 0.0188 | 0.0196 |
| 2024-01-05 | 0.0183 | 0.0183 | 0.0183 | 0.0194 | 0.0202 |
| 2024-01-08 | 0.0178 | 0.0179 | 0.0179 | 0.019 | 0.0198 |
Parameters
get_real_yield_curve accepts the following parameters:
- rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
- trailing (int, optional): The trailing window size to use for summing the data over trailing periods. Defaults to None.
- growth (bool, optional): Whether to return the growth data or the actual data.
- lag (int, optional): The number of periods to lag the data by.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.