OPEN-SOURCE SCRIPT
US Treasury Yield Spread Viewer

**Title:**
US Treasury Yield Spread (Customizable)
**Description:**
A flexible tool for analyzing the spread between any two US Treasury yields. Compare any combination of maturities from 1-month to 30-year bonds to monitor yield curve dynamics.
**Features:**
• Fully customizable — select any two Treasury maturities for comparison
• Color-coded spread line (green for positive, red for negative/inverted)
• Visual highlighting during yield curve inversion periods
• Real-time info panel displaying current yields and spread values
• Customizable colors and line thickness
**Available Maturities:**
1M, 3M, 6M, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 20Y, 30Y
**Common Use Cases:**
• 10Y-2Y spread: The most widely watched recession indicator
• 30Y-2Y spread: Long-term vs short-term rate comparison
• 10Y-3M spread: Federal Reserve's preferred curve measure
**How to Use:**
Open settings to select your preferred yield maturities. The spread is calculated as Long Side minus Short Side. Negative values (inversion) are often considered early warning signals for economic slowdowns.
US Treasury Yield Spread (Customizable)
**Description:**
A flexible tool for analyzing the spread between any two US Treasury yields. Compare any combination of maturities from 1-month to 30-year bonds to monitor yield curve dynamics.
**Features:**
• Fully customizable — select any two Treasury maturities for comparison
• Color-coded spread line (green for positive, red for negative/inverted)
• Visual highlighting during yield curve inversion periods
• Real-time info panel displaying current yields and spread values
• Customizable colors and line thickness
**Available Maturities:**
1M, 3M, 6M, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 20Y, 30Y
**Common Use Cases:**
• 10Y-2Y spread: The most widely watched recession indicator
• 30Y-2Y spread: Long-term vs short-term rate comparison
• 10Y-3M spread: Federal Reserve's preferred curve measure
**How to Use:**
Open settings to select your preferred yield maturities. The spread is calculated as Long Side minus Short Side. Negative values (inversion) are often considered early warning signals for economic slowdowns.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。