OPEN-SOURCE SCRIPT
KT_Global Bond Yields by Country

Global Bond Yields Indicator Summary
The Global Bond Yields by Country indicator, developed for Trading View (Pine Script v5), provides a comprehensive tool for visualizing and analyzing government bond yields across multiple countries and maturities. Below are its key features:
Features
Country Selection: Choose from 20 countries, including the United States, China, Japan, Germany, United Kingdom, and more, to display their respective bond yields.
Multiple Maturities: Supports 18 bond maturities ranging from 1 month to 40 years, allowing users to analyze short-term to long-term yield trends.
Customizable Display:
Toggle visibility for each maturity (1M, 3M, 6M, 1Y, 2Y, 3Y, 4Y, 5Y, 6Y, 7Y, 8Y, 9Y, 10Y, 15Y, 20Y, 25Y, 30Y, 40Y) individually.
Option to show or hide all maturities with a single toggle for streamlined analysis.
10Y-2Y Yield Spread: Plots the difference between 10-year and 2-year bond yields, a key indicator of yield curve dynamics, with an option to enable/disable.
Zero Line Reference: Displays a dashed grey horizontal line at zero for clear visual reference.
Color-Coded Plots: Each maturity is plotted with a distinct color, ranging from lighter shades (short-term) to darker shades (long-term), for easy differentiation.
Country Label: Displays the selected country's name as a large, prominent label on the chart for quick identification.
Error Handling: Alerts users if an invalid country is selected, ensuring robust operation.
Data Integration: Fetches bond yield data from Trading View's database (e.g., TVC:US10Y) with support for ignoring invalid symbols to prevent errors.
This indicator is ideal for traders and analysts monitoring global fixed-income markets, yield curve shapes, and cross-country comparisons.
The Global Bond Yields by Country indicator, developed for Trading View (Pine Script v5), provides a comprehensive tool for visualizing and analyzing government bond yields across multiple countries and maturities. Below are its key features:
Features
Country Selection: Choose from 20 countries, including the United States, China, Japan, Germany, United Kingdom, and more, to display their respective bond yields.
Multiple Maturities: Supports 18 bond maturities ranging from 1 month to 40 years, allowing users to analyze short-term to long-term yield trends.
Customizable Display:
Toggle visibility for each maturity (1M, 3M, 6M, 1Y, 2Y, 3Y, 4Y, 5Y, 6Y, 7Y, 8Y, 9Y, 10Y, 15Y, 20Y, 25Y, 30Y, 40Y) individually.
Option to show or hide all maturities with a single toggle for streamlined analysis.
10Y-2Y Yield Spread: Plots the difference between 10-year and 2-year bond yields, a key indicator of yield curve dynamics, with an option to enable/disable.
Zero Line Reference: Displays a dashed grey horizontal line at zero for clear visual reference.
Color-Coded Plots: Each maturity is plotted with a distinct color, ranging from lighter shades (short-term) to darker shades (long-term), for easy differentiation.
Country Label: Displays the selected country's name as a large, prominent label on the chart for quick identification.
Error Handling: Alerts users if an invalid country is selected, ensuring robust operation.
Data Integration: Fetches bond yield data from Trading View's database (e.g., TVC:US10Y) with support for ignoring invalid symbols to prevent errors.
This indicator is ideal for traders and analysts monitoring global fixed-income markets, yield curve shapes, and cross-country comparisons.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.