dharmatech

[dharmatech] U.S. Treasury Yield Curve

dharmatech Updated   
This indicator displays the U.S. Treasury Securities Yield Curve.

This is a fork of the US Treasury Yield Curve indicator by @longflat. Thank you for sharing your work!

There are already so many yield curve indicators on TradingView.
What makes this one different?

Update to version 5 of Pine Script
Add RRP%
Add 4 month
Add 20 year
Show previous day's yield curve
Options for prior yield curves

The thick red line shows the latest yield curve.

The yellow line shows the yield curve 1 bar ago.

So, if your timeframe is set to 1 day, the yellow line will show yesterday's yield curve.
Release Notes:
Hardcoded timeframe of securities to 1D.
Without this, RRP doesn't load at lower timeframes.
Also, without this, at lower timeframes, the yield curve difference is sometimes hardly noticeable.

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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?