OPEN-SOURCE SCRIPT
Updated Average Yield Inversion

Description:
This script calculates and visualizes the average yield curve spread to identify whether the yield curve is inverted or normal. It takes into account short-term yields (1M, 3M, 6M, 2Y) and long-term yields (10Y, 30Y).
Key Features:
This tool is perfect for investors, analysts, and economists who need to monitor yield curve dynamics at a glance.
This script calculates and visualizes the average yield curve spread to identify whether the yield curve is inverted or normal. It takes into account short-term yields (1M, 3M, 6M, 2Y) and long-term yields (10Y, 30Y).
- Positive values: The curve is normal, indicating long-term yields are higher than short-term yields. This often reflects economic growth expectations.
- Negative values: The curve is inverted, meaning short-term yields are higher than long-term yields, a potential signal of economic slowdown or recession.
Key Features:
- Calculates the average spread between long-term and short-term yields.
- Displays a clear graph with a zero-line reference for quick interpretation.
- Useful for tracking macroeconomic trends and potential market turning points.
This tool is perfect for investors, analysts, and economists who need to monitor yield curve dynamics at a glance.
Release Notes
Added red color for inversion and green for non inversionRelease Notes
Update: removed Chart to show the indicator onlyRelease Notes
Update: added symbol and chart for comparisonRelease Notes
Update: added titleOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.