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.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.