OPEN-SOURCE SCRIPT
업데이트됨 FX Yield Spread

FX & Futures Yield Spread (2Y & 10Y)
FX & Futures Yield Spread (2Y & 10Y) is a macro-driven indicator designed to measure the interest rate differential between two currencies using their respective 2-year and 10-year government bond yields.
It automatically detects the base and quote currencies from:
Major CME FX futures (standard and micro contracts)
Forex pairs
Crypto pairs (when applicable)
🔎 What It Does
The indicator:
Retrieves 2-year and 10-year sovereign yield data for both currencies in the pair
Calculates the yield spread:
2Y Spread = Base 2Y Yield − Quote 2Y Yield
10Y Spread = Base 10Y Yield − Quote 10Y Yield
Plots the spreads in a separate pane
Includes an optional zero line for directional clarity
📊 Why It Matters
Yield spreads are a key macro driver of currency valuation.
A rising spread typically favors the base currency
A falling spread typically favors the quote currency
The 2Y spread often reflects short-term monetary policy expectations
The 10Y spread reflects longer-term growth and inflation outlook
This makes the indicator especially useful for:
Macro FX traders
Futures traders
Intermarket analysis
Policy divergence tracking
⚙️ Customization Options
Toggle 2Y and 10Y spreads independently
Enable or disable the zero reference line
Adjust the yield data timeframe (Daily, Weekly, etc.)
Add a custom exchange prefix for yield tickers if required by your data feed
🛡️ Stability & Safety
Includes strict currency detection logic
Uses safe security calls to prevent chart errors
Displays warning labels if yield data is missing
In short, this indicator helps traders align currency price action with underlying rate differentials — one of the most powerful long-term drivers in FX markets.
FX & Futures Yield Spread (2Y & 10Y) is a macro-driven indicator designed to measure the interest rate differential between two currencies using their respective 2-year and 10-year government bond yields.
It automatically detects the base and quote currencies from:
Major CME FX futures (standard and micro contracts)
Forex pairs
Crypto pairs (when applicable)
🔎 What It Does
The indicator:
Retrieves 2-year and 10-year sovereign yield data for both currencies in the pair
Calculates the yield spread:
2Y Spread = Base 2Y Yield − Quote 2Y Yield
10Y Spread = Base 10Y Yield − Quote 10Y Yield
Plots the spreads in a separate pane
Includes an optional zero line for directional clarity
📊 Why It Matters
Yield spreads are a key macro driver of currency valuation.
A rising spread typically favors the base currency
A falling spread typically favors the quote currency
The 2Y spread often reflects short-term monetary policy expectations
The 10Y spread reflects longer-term growth and inflation outlook
This makes the indicator especially useful for:
Macro FX traders
Futures traders
Intermarket analysis
Policy divergence tracking
⚙️ Customization Options
Toggle 2Y and 10Y spreads independently
Enable or disable the zero reference line
Adjust the yield data timeframe (Daily, Weekly, etc.)
Add a custom exchange prefix for yield tickers if required by your data feed
🛡️ Stability & Safety
Includes strict currency detection logic
Uses safe security calls to prevent chart errors
Displays warning labels if yield data is missing
In short, this indicator helps traders align currency price action with underlying rate differentials — one of the most powerful long-term drivers in FX markets.
릴리즈 노트
FX & Futures Yield Spread (2Y & 10Y)FX & Futures Yield Spread (2Y & 10Y) is a macro-driven indicator designed to measure the interest rate differential between two currencies using their respective 2-year and 10-year government bond yields.
It automatically detects the base and quote currencies from:
Major CME FX futures (standard and micro contracts)
Forex pairs
Crypto pairs (when applicable)
🔎 What It Does
The indicator:
Retrieves 2-year and 10-year sovereign yield data for both currencies in the pair
Calculates the yield spread:
2Y Spread = Base 2Y Yield − Quote 2Y Yield
10Y Spread = Base 10Y Yield − Quote 10Y Yield
Plots the spreads in a separate pane
Includes an optional zero line for directional clarity
📊 Why It Matters
Yield spreads are a key macro driver of currency valuation.
A rising spread typically favors the base currency
A falling spread typically favors the quote currency
The 2Y spread often reflects short-term monetary policy expectations
The 10Y spread reflects longer-term growth and inflation outlook
This makes the indicator especially useful for:
Macro FX traders
Futures traders
Intermarket analysis
Policy divergence tracking
⚙️ Customization Options
Toggle 2Y and 10Y spreads independently
Enable or disable the zero reference line
Adjust the yield data timeframe (Daily, Weekly, etc.)
Add a custom exchange prefix for yield tickers if required by your data feed
🛡️ Stability & Safety
Includes strict currency detection logic
Uses safe security calls to prevent chart errors
Displays warning labels if yield data is missing
In short, this indicator helps traders align currency price action with underlying rate differentials — one of the most powerful long-term drivers in FX markets.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.