PROTECTED SOURCE SCRIPT

FX vs Yield-Spread Oscillator

21
Follow me at for more guidance on how to use the indicator:
instagram.com/volumina.x/

The FX vs Yield-Spread Oscillator measures how an exchange rate’s movement compares with changes in its corresponding interest-rate differential. It quantifies whether a currency pair is moving in line with, or diverging from, the bond-market forces that normally drive it.
At its core, the indicator tracks the relative performance between:
  • The price change of the selected FX pair, and
  • The change in the yield spread between the base country’s and quote country’s government bonds (e.g., US02Y − JP02Y for USDJPY).


Concept of Indicator

Currencies tend to strengthen when their domestic yields rise faster than their counterpart’s—reflecting higher expected returns or tighter monetary policy. This indicator visualizes that relationship dynamically.
When the oscillator rises, the FX pair is outperforming what the yield spread implies (the currency is stronger than rates alone justify).
When it falls, the pair is underperforming the spread (rates are favorable, but the currency lags).
Key Features
  1. Auto-mapping: Detects the chart’s base and quote currencies and automatically selects their corresponding bond yields from TradingView’s TVC database.
  2. Tenor Control: Choose bond maturity (1-month to 10-year) to match your trading horizon.
  3. Mode Selection: Compare moves using percentage change or basis-point (bps) spread delta.
  4. Rescaled Oscillator: Normalized between −100 and +100, highlighting relative extremes over a chosen look-back window.
  5. Visual Alerts: Shaded background marks strong positive (overperformance) and negative (underperformance) zones.
  6. Manual Override: Manually specify yield symbols if your data plan uses different tickers (e.g., DE02Y for EUR).
  7. Alerts: Optional signals when the oscillator crosses zero or predefined upper/lower thresholds.

Interpretation
  1. Above +75 / below −75: FX price has deviated sharply from yield-spread behavior—potential exhaustion or continuation zone.
  2. Crossing 0: Realignment between FX movement and yield differential; often coincides with regime or sentiment shifts.
  3. Persistent divergence: May indicate risk-sentiment decoupling (safe-haven flows, intervention expectations, or commodity-price effects).

Typical Uses
  1. Intraday or swing-trading confirmation of rate-driven impulses.
  2. Identifying when currencies are over- or under-reacting to bond-market repricing.
  3. Cross-checking macro trades (e.g., carry trades, policy-expectation trades).
  4. Early warning when price diverges from fundamental yield direction.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.