OPEN-SOURCE SCRIPT
2-Year Real Rate

The 2-year real rate is the inflation-adjusted yield on a 2-year U.S. Treasury—essentially the market’s expectation for short-term “true” interest rates after subtracting expected inflation (often approximated as nominal 2Y yield – breakeven inflation).
It matters because it reflects the actual cost of capital and is one of the cleanest gauges of the Fed’s effective stance: rising real rates mean tightening financial conditions, falling real rates mean loosening. In trading, the 2Y real rate is a powerful macro risk-on/risk-off indicator—equities, long-duration tech, crypto, and EM FX generally weaken when real rates rise, while USD and front-end rate-sensitive trades tend to strengthen. Watching inflections in the 2Y real rate helps you time shifts in liquidity, gauge how aggressively the market is pricing Fed moves, and position for cross-asset trends driven by changes in real funding conditions.
It matters because it reflects the actual cost of capital and is one of the cleanest gauges of the Fed’s effective stance: rising real rates mean tightening financial conditions, falling real rates mean loosening. In trading, the 2Y real rate is a powerful macro risk-on/risk-off indicator—equities, long-duration tech, crypto, and EM FX generally weaken when real rates rise, while USD and front-end rate-sensitive trades tend to strengthen. Watching inflections in the 2Y real rate helps you time shifts in liquidity, gauge how aggressively the market is pricing Fed moves, and position for cross-asset trends driven by changes in real funding conditions.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.