Spaces:
Sleeping
Sleeping
|
Download README.md from iizy/calcfi-yield-curve-spread: direct link, hf CLI and curl.
- Browser
- Download file 11.8 kB
-
https://huggingface.co/spaces/iizy/calcfi-yield-curve-spread/resolve/main/README.md
- Command line
-
hf download hf://spaces/iizy/calcfi-yield-curve-spread/README.md
-
curl -L -o README.md https://huggingface.co/spaces/iizy/calcfi-yield-curve-spread/resolve/main/README.md
11.8 kB
| 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 | |
| [](https://doi.org/10.6084/m9.figshare.32332290) | |
| [](https://doi.org/10.5281/zenodo.20302283) | |
| [](https://creativecommons.org/licenses/by/4.0/) | |
| 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](https://calcfi.app). | |
| ## Methodology | |
| - **Federal Funds Rate (Effective)** — Federal Reserve via FRED, series `DFF` — [https://fred.stlouisfed.org/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](https://fred.stlouisfed.org/series/DGS2) | |
| - **10-Year Treasury Constant Maturity** — US Treasury via FRED, series `DGS10` — [https://fred.stlouisfed.org/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](https://huggingface.co/datasets/iizy/calcfi-open-data) dataset. | |
| ## Data source | |
| The Space loads data live from the CalcFi Open Data dataset on Hugging Face: | |
| [`iizy/calcfi-open-data`](https://huggingface.co/datasets/iizy/calcfi-open-data). | |
| The same dataset is mirrored with permanent DOIs at: | |
| - Figshare: [10.6084/m9.figshare.32332290](https://doi.org/10.6084/m9.figshare.32332290) | |
| - Zenodo (CERN-backed): [10.5281/zenodo.20302283](https://doi.org/10.5281/zenodo.20302283) | |
| - OSF: [10.17605/OSF.IO/PUMKT](https://doi.org/10.17605/OSF.IO/PUMKT) | |
| - Kaggle: [10.34740/kaggle/dsv/16356447](https://doi.org/10.34740/kaggle/dsv/16356447) | |
| - Mendeley Data: [10.17632/jsnwhy6vjn.1](https://doi.org/10.17632/jsnwhy6vjn.1) | |
| ## Related Spaces | |
| Part of a small collection of CalcFi Open Data interactive explorers: | |
| - [US Mortgage Rate Explorer](https://huggingface.co/spaces/iizy/calcfi-mortgage-rate-explorer) | |
| - [Inflation vs Wage Growth Tracker](https://huggingface.co/spaces/iizy/calcfi-inflation-wage-tracker) | |
| - [US Treasury Yield Curve Spread](https://huggingface.co/spaces/iizy/calcfi-yield-curve-spread) | |
| - [Fed Funds Rate Cycle Explorer](https://huggingface.co/spaces/iizy/calcfi-fed-funds-cycle) | |
| - [Oil and Gas Price Tracker](https://huggingface.co/spaces/iizy/calcfi-oil-gas-tracker) | |
| ## Citation & DOIs | |
| This Space visualizes data from the [CalcFi Open Data project](https://calcfi.app/). Source rate series are archived under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/) across multiple persistent registries. | |
| **2026-06-06 snapshot DOIs (Zenodo community):** | |
| - Methodology paper: [10.5281/zenodo.20567975](https://doi.org/10.5281/zenodo.20567975) | |
| - Live rate snapshot: [10.5281/zenodo.20567971](https://doi.org/10.5281/zenodo.20567971) | |
| - Calculator registry: [10.5281/zenodo.20567964](https://doi.org/10.5281/zenodo.20567964) | |
| - Full 37-record Zenodo archive: https://zenodo.org/communities/calcfi | |
| **Multi-registry mirror:** | |
| - OSF: [10.17605/OSF.IO/2J45Q](https://doi.org/10.17605/OSF.IO/2J45Q) (methodology paper) | |
| - Harvard Dataverse: [10.7910/DVN/2LJXZM](https://doi.org/10.7910/DVN/2LJXZM) | |
| **Discovery surfaces:** | |
| - Full research index: https://calcfi.app/research | |
| - Author ORCID: [0009-0000-0916-8684](https://orcid.org/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](https://huggingface.co/spaces/iizy/calcfi-mortgage-rate-explorer) — 30Y, 15Y mortgage + 10Y Treasury | |
| - [calcfi-inflation-wage-tracker](https://huggingface.co/spaces/iizy/calcfi-inflation-wage-tracker) — CPI + PCE + hourly earnings | |
| - [calcfi-yield-curve-spread](https://huggingface.co/spaces/iizy/calcfi-yield-curve-spread) — Fed Funds + 2Y + 10Y, inversion shading | |
| - [calcfi-fed-funds-cycle](https://huggingface.co/spaces/iizy/calcfi-fed-funds-cycle) — Fed Funds + Prime + credit-card APR | |
| - [calcfi-oil-gas-tracker](https://huggingface.co/spaces/iizy/calcfi-oil-gas-tracker) — WTI + Brent + US gasoline | |
| - [calcfi-fx-history](https://huggingface.co/spaces/iizy/calcfi-fx-history) — USD/EUR + USD/GBP + USD/JPY | |
| - [calcfi-commodity-inflation](https://huggingface.co/spaces/iizy/calcfi-commodity-inflation) — Copper + corn + CPI | |
| - [calcfi-gdp-per-capita](https://huggingface.co/spaces/iizy/calcfi-gdp-per-capita) — US + Eurozone GDP per capita | |
| - [calcfi-labor-market](https://huggingface.co/spaces/iizy/calcfi-labor-market) — Unemployment + LFP | |
| - [calcfi-consumer-credit](https://huggingface.co/spaces/iizy/calcfi-consumer-credit) — Credit card APR + personal loan rate | |
| **Long-form Observable notebooks built on the same dataset:** | |
| - [Mortgage Spread Over Treasury (50 years)](https://observablehq.com/@iizy/mortgage-spread-over-treasury-50-years) | |
| - [Yield Curve Recession Indicator (2s/10s)](https://observablehq.com/@iizy/yield-curve-recession-indicator-2s-10s) | |
| - [Inflation vs Fed Target (2% History)](https://observablehq.com/@iizy/inflation-vs-fed-target-2-percent-history) | |
| **CodePen calculator demos (vanilla JS, MIT)** — [view all 6 in collection](https://codepen.io/collection/BawbdB): | |
| - [Compound Interest Calculator](https://codepen.io/Jere-S/pen/LEbyJQe) | |
| - [Mortgage Amortization Chart](https://codepen.io/Jere-S/pen/zxowJaw) | |
| - [Inflation-Adjusted Returns](https://codepen.io/Jere-S/pen/pvNPOZg) | |
| - [30Y Mortgage Rate History (FRED Data)](https://codepen.io/Jere-S/pen/emBWLLg) | |
| - [Retirement Corpus Projection](https://codepen.io/Jere-S/pen/ByQROqg) | |
| - [CPI vs Wages Tracker](https://codepen.io/Jere-S/pen/qEqmMQo) | |
| **Static dataset documentation:** | |
| - [GitLab Pages site](https://calcfi-open-data-4a2bc1.gitlab.io/) — catalog, methodology, citation guide | |
| - [Hugging Face dataset card](https://huggingface.co/datasets/iizy/calcfi-open-data) | |
| **Author profiles (Person entity graph):** | |
| - [ORCID 0009-0000-0916-8684](https://orcid.org/0009-0000-0916-8684) | |
| - [Academia.edu — Jere K Salmisto](https://independent.academia.edu/JereS6) | |
| - [GitLab — jere.salmisto](https://gitlab.com/jere.salmisto) | |
| - [CodePen — Jere-S](https://codepen.io/Jere-S) | |
| **Live tools at [calcfi.app](https://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](https://orcid.org/0009-0000-0916-8684) | |
| <!-- calcfi-mesh-footer-v2026-05-21 --> | |
| --- | |
| ## Companion surfaces | |
| - **Free calculators (300+):** [calcfi.app](https://calcfi.app) — every tool cited to a primary source | |
| - **Underlying dataset:** [CalcFi Open Data on Hugging Face](https://huggingface.co/datasets/iizy/calcfi-open-data) — 34 CC-BY series | |
| - **Live SQL endpoint (Datasette):** [calcfi-open-data.vercel.app](https://calcfi-open-data.vercel.app/) | |
| - **Python client:** `pip install calcfidata` ([PyPI](https://pypi.org/project/calcfidata/) · [Anaconda](https://anaconda.org/jeresalmisto/calcfidata)) | |
| - **Documentation:** [calcfidata.readthedocs.io](https://calcfidata.readthedocs.io/) | |
| - **Query mirrors:** [data.world](https://data.world/jerehere/calcfi-open-data) · [DoltHub (versioned)](https://www.dolthub.com/repositories/jerehere/calcfi-open-data) · [MotherDuck (cloud DuckDB)](https://app.motherduck.com/share/92e4b6ab-46e0-42f4-8ebb-9e7ab22eae00) | |
| - **Other visualizations:** [10 HF Spaces](https://huggingface.co/iizy) · [3 Observable notebooks](https://observablehq.com/@iizy) · [6 CodePen demos](https://codepen.io/collection/BawbdB) | |
| - **Permanent DOIs:** [Figshare](https://doi.org/10.6084/m9.figshare.32332290) · [Zenodo](https://doi.org/10.5281/zenodo.20302283) · [OSF](https://doi.org/10.17605/OSF.IO/PUMKT) · [Kaggle](https://doi.org/10.34740/kaggle/dsv/16356447) · [Mendeley](https://doi.org/10.17632/jsnwhy6vjn.1) | |
| > Built by [Jere Salmisto](https://orcid.org/0009-0000-0916-8684) — founder of [calcfi.app](https://calcfi.app). | |
| --- | |
| ## Distribution mesh — also available on | |
| **Static landing pages (8 mirrors):** | |
| - [GitLab Pages (canonical)](https://calcfi-open-data-4a2bc1.gitlab.io/) | |
| - [GitHub Pages](https://jeresalmisto.github.io/calcfi-open-data/) | |
| - [Cloudflare Pages](https://calcfi-open-data.pages.dev/) | |
| - [Codeberg Pages (EU)](https://jerehere.codeberg.page/calcfi-open-data/) | |
| - [Surge.sh](https://calcfi-open-data.surge.sh/) | |
| - [Netlify](https://calcfi-open-data.netlify.app/) | |
| - [AWS S3](https://calcfi-open-data.s3.us-east-1.amazonaws.com/index.html) | |
| - [Datasette (live SQL)](https://calcfi-open-data.vercel.app/) | |
| **Permanent DOIs (5):** | |
| - [Figshare 10.6084/m9.figshare.32332290](https://doi.org/10.6084/m9.figshare.32332290) | |
| - [Zenodo 10.5281/zenodo.20302283](https://doi.org/10.5281/zenodo.20302283) (CERN) | |
| - [OSF 10.17605/OSF.IO/PUMKT](https://doi.org/10.17605/OSF.IO/PUMKT) | |
| - [Kaggle 10.34740/kaggle/dsv/16356447](https://doi.org/10.34740/kaggle/dsv/16356447) | |
| - [Mendeley Data 10.17632/jsnwhy6vjn.1](https://doi.org/10.17632/jsnwhy6vjn.1) | |
| **Packages:** [PyPI `calcfidata`](https://pypi.org/project/calcfidata/) · [npm `calcfidata`](https://www.npmjs.com/package/calcfidata) · [Anaconda](https://anaconda.org/jeresalmisto/calcfidata) · [Go pkg](https://pkg.go.dev/gitlab.com/jere.salmisto/calcfi-open-data/go) · [Julia](https://github.com/jeresalmisto/CalcFiData.jl) · [dbt](https://github.com/jeresalmisto/dbt-calcfi-open-data) · [Read the Docs](https://calcfidata.readthedocs.io/) | |
| **Data catalogs / warehouses:** [BigQuery Public](https://console.cloud.google.com/bigquery/analytics-hub/discovery/projects/1099067620437/locations/us/dataExchanges/calcfi_open_data_exchange/listings/calcfi_open_data) · [data.world](https://data.world/jerehere/calcfi-open-data) · [DoltHub](https://www.dolthub.com/repositories/jerehere/calcfi-open-data) · [MotherDuck](https://app.motherduck.com/share/92e4b6ab-46e0-42f4-8ebb-9e7ab22eae00) | |
| **Repos:** [GitLab](https://gitlab.com/jere.salmisto/calcfi-open-data) · [GitHub](https://github.com/jeresalmisto/calcfi-open-data) · [Codeberg](https://codeberg.org/jerehere/calcfi-open-data) | |
| **Companion website:** [calcfi.app](https://calcfi.app) — free personal-finance calculators built on this dataset. | |
| **Author:** [Jere Salmisto](https://calcfi.app/about) · ORCID [0009-0000-0916-8684](https://orcid.org/0009-0000-0916-8684) | |
| License: CC BY 4.0 (data) · MIT (code) | |