Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.27.0
title: US Treasury Yield Curve Spread
emoji: π
colorFrom: purple
colorTo: indigo
sdk: gradio
sdk_version: 4.44.0
python_version: '3.10'
app_file: app.py
pinned: true
license: cc-by-4.0
short_description: 2Y vs 10Y Treasury β recession indicator.
datasets:
- iizy/calcfi-open-data
tags:
- finance
- treasury
- yield-curve
- recession
- federal-reserve
- data-viz
- open-data
- gradio
US Treasury Yield Curve Spread
Visualize the 2-year vs 10-year Treasury yield spread alongside the Federal Funds Rate. When the 10Y drops below the 2Y, the curve inverts β historically a leading indicator of US recessions with a 12-24 month lead time.
Why these series matter
The 2s/10s yield curve has inverted before every US recession since 1955, with a single false signal in the mid-1960s. The inversion itself is not the cause; it is the bond market pricing in expected Fed rate cuts in response to slowing growth. The lead time from inversion to recession averages 14 months but has ranged from 6 to 24 months. Pair this with the Federal Funds Rate to see how Fed policy itself drives the front end of the curve.
A library of free, primary-source-cited financial calculators that use these macro indicators as inputs is available at calcfi.app.
Methodology
- Federal Funds Rate (Effective) β Federal Reserve via FRED, series
DFFβ https://fred.stlouisfed.org/series/DFF - 2-Year Treasury Constant Maturity β US Treasury via FRED, series
DGS2β https://fred.stlouisfed.org/series/DGS2 - 10-Year Treasury Constant Maturity β US Treasury via FRED, series
DGS10β https://fred.stlouisfed.org/series/DGS10
No smoothing, no imputation, no seasonal adjustment. Each observation passes through verbatim from the primary source. Provenance headers are preserved in the underlying CalcFi Open Data dataset.
Data source
The Space loads data live from the CalcFi Open Data dataset on Hugging Face:
iizy/calcfi-open-data.
The same dataset is mirrored with permanent DOIs at:
- Figshare: 10.6084/m9.figshare.32332290
- Zenodo (CERN-backed): 10.5281/zenodo.20302283
- OSF: 10.17605/OSF.IO/PUMKT
- Kaggle: 10.34740/kaggle/dsv/16356447
- Mendeley Data: 10.17632/jsnwhy6vjn.1
Related Spaces
Part of a small collection of CalcFi Open Data interactive explorers:
- US Mortgage Rate Explorer
- Inflation vs Wage Growth Tracker
- US Treasury Yield Curve Spread
- Fed Funds Rate Cycle Explorer
- Oil and Gas Price Tracker
Citation & DOIs
This Space visualizes data from the CalcFi Open Data project. Source rate series are archived under CC-BY 4.0 across multiple persistent registries.
2026-06-06 snapshot DOIs (Zenodo community):
- Methodology paper: 10.5281/zenodo.20567975
- Live rate snapshot: 10.5281/zenodo.20567971
- Calculator registry: 10.5281/zenodo.20567964
- Full 37-record Zenodo archive: https://zenodo.org/communities/calcfi
Multi-registry mirror:
- OSF: 10.17605/OSF.IO/2J45Q (methodology paper)
- Harvard Dataverse: 10.7910/DVN/2LJXZM
Discovery surfaces:
- Full research index: https://calcfi.app/research
- Author ORCID: 0009-0000-0916-8684
- Methodology and provenance: https://calcfi.app/about
Related work
Other HF Spaces in this set (10 total):
- calcfi-mortgage-rate-explorer β 30Y, 15Y mortgage + 10Y Treasury
- calcfi-inflation-wage-tracker β CPI + PCE + hourly earnings
- calcfi-yield-curve-spread β Fed Funds + 2Y + 10Y, inversion shading
- calcfi-fed-funds-cycle β Fed Funds + Prime + credit-card APR
- calcfi-oil-gas-tracker β WTI + Brent + US gasoline
- calcfi-fx-history β USD/EUR + USD/GBP + USD/JPY
- calcfi-commodity-inflation β Copper + corn + CPI
- calcfi-gdp-per-capita β US + Eurozone GDP per capita
- calcfi-labor-market β Unemployment + LFP
- calcfi-consumer-credit β Credit card APR + personal loan rate
Long-form Observable notebooks built on the same dataset:
- Mortgage Spread Over Treasury (50 years)
- Yield Curve Recession Indicator (2s/10s)
- Inflation vs Fed Target (2% History)
CodePen calculator demos (vanilla JS, MIT) β view all 6 in collection:
- Compound Interest Calculator
- Mortgage Amortization Chart
- Inflation-Adjusted Returns
- 30Y Mortgage Rate History (FRED Data)
- Retirement Corpus Projection
- CPI vs Wages Tracker
Static dataset documentation:
- GitLab Pages site β catalog, methodology, citation guide
- Hugging Face dataset card
Author profiles (Person entity graph):
- ORCID 0009-0000-0916-8684
- Academia.edu β Jere K Salmisto
- GitLab β jere.salmisto
- CodePen β Jere-S
Live tools at calcfi.app: 300+ free personal-finance calculators built on the same primary-source data layer (FRED, BLS, Freddie Mac, US Treasury).
Citation
Salmisto, J. (2026). CalcFi Open Data: 34 Free CC-BY Financial and Macro Time Series Mirrored from Primary Sources [Dataset]. Figshare. https://doi.org/10.6084/m9.figshare.32332290
ORCID: 0009-0000-0916-8684
Companion surfaces
- Free calculators (300+): calcfi.app β every tool cited to a primary source
- Underlying dataset: CalcFi Open Data on Hugging Face β 34 CC-BY series
- Live SQL endpoint (Datasette): calcfi-open-data.vercel.app
- Python client:
pip install calcfidata(PyPI Β· Anaconda) - Documentation: calcfidata.readthedocs.io
- Query mirrors: data.world Β· DoltHub (versioned) Β· MotherDuck (cloud DuckDB)
- Other visualizations: 10 HF Spaces Β· 3 Observable notebooks Β· 6 CodePen demos
- Permanent DOIs: Figshare Β· Zenodo Β· OSF Β· Kaggle Β· Mendeley
Built by Jere Salmisto β founder of calcfi.app.
Distribution mesh β also available on
Static landing pages (8 mirrors):
- GitLab Pages (canonical)
- GitHub Pages
- Cloudflare Pages
- Codeberg Pages (EU)
- Surge.sh
- Netlify
- AWS S3
- Datasette (live SQL)
Permanent DOIs (5):
- Figshare 10.6084/m9.figshare.32332290
- Zenodo 10.5281/zenodo.20302283 (CERN)
- OSF 10.17605/OSF.IO/PUMKT
- Kaggle 10.34740/kaggle/dsv/16356447
- Mendeley Data 10.17632/jsnwhy6vjn.1
Packages: PyPI calcfidata Β· npm calcfidata Β· Anaconda Β· Go pkg Β· Julia Β· dbt Β· Read the Docs
Data catalogs / warehouses: BigQuery Public Β· data.world Β· DoltHub Β· MotherDuck
Repos: GitLab Β· GitHub Β· Codeberg
Companion website: calcfi.app β free personal-finance calculators built on this dataset.
Author: Jere Salmisto Β· ORCID 0009-0000-0916-8684
License: CC BY 4.0 (data) Β· MIT (code)