OPEN-SOURCE SCRIPT

Yield Curve (1-10yr)

Yield curve of the 1-10 year US Treasury Bonds, with over 60 years of history.

The Yield Curve is the interest rate on the 10 year bond minus the 1 year bond.

When it inverts (crosses under 0) a recession usually follows 6-12 months later.
It's a great leading indicator to identify risk in the macroeconomic environment.

Yield curves can be constructed on varying durations. Using a 1-year as the short-term bond provides a slightly faster response than the 2-year bond; and the 1-year has more historical data on TradingView.
bondscurveeconomyFundamental AnalysisinterestmacroratesrecessionS&P 500 (SPX500)yield

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer