OPEN-SOURCE SCRIPT
FX Rate Bias US vs EU 2Y

FX Rate Bias – US vs EU (2Y)
This indicator implements a rate-differential based macro bias model using the 2-year government bond yield spread between the United States and Germany.
The methodology focuses on the short end of the yield curve, which primarily reflects central bank expectations rather than long-term inflation or risk premiums.
By applying light smoothing and a zero-line regime framework, the script classifies market conditions into USD rate advantage or EUR rate advantage states.
Calculation logic:
Retrieves daily 2Y sovereign yields for the US and Germany
Computes the yield differential (US − DE)
Applies optional smoothing to reduce noise
Uses the zero line as a regime boundary to define relative monetary bias
Practical use:
This tool is designed to provide directional macro context for FX analysis, particularly for EURUSD.
It helps traders align technical setups with prevailing interest rate expectations, and is not intended as a standalone signal or timing indicator.
This indicator implements a rate-differential based macro bias model using the 2-year government bond yield spread between the United States and Germany.
The methodology focuses on the short end of the yield curve, which primarily reflects central bank expectations rather than long-term inflation or risk premiums.
By applying light smoothing and a zero-line regime framework, the script classifies market conditions into USD rate advantage or EUR rate advantage states.
Calculation logic:
Retrieves daily 2Y sovereign yields for the US and Germany
Computes the yield differential (US − DE)
Applies optional smoothing to reduce noise
Uses the zero line as a regime boundary to define relative monetary bias
Practical use:
This tool is designed to provide directional macro context for FX analysis, particularly for EURUSD.
It helps traders align technical setups with prevailing interest rate expectations, and is not intended as a standalone signal or timing indicator.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.