OPEN-SOURCE SCRIPT
Real Rate Mortgage Framework [Gabremoku]

Real Rate Mortgage Framework is a macro context indicator that estimates a simplified real-rate proxy by subtracting CPI YoY from a nominal government yield series. It is designed to help users assess borrowing conditions from a broader economic perspective, rather than to predict a specific mortgage quote or lender offer.
The script currently includes preset configurations for the United States and Italy, and it also supports custom sources so the framework can be extended to additional countries without changing the core logic. This modular structure makes the indicator suitable as a reusable framework for future country presets and custom macro implementations.
To make the output easier to read, the real-rate proxy is classified into four clearly labeled regimes: Excellent Rate, Good Rate, Acceptable Rate, and High Rate. These labels are paired with a color structure that makes the current macro environment immediately visible on the chart, in the label, and in the dashboard.
A moving average is applied to inflation to reduce the stair-step effect caused by monthly CPI updates and improve visual readability. The indicator also includes a summary dashboard, optional background regime shading, alerts, and a disclaimer so users can interpret the output as informational context rather than financial advice.
This script is intended for traders and investors who want a simple cross-country real-rate framework for macro analysis, mortgage context, and future expansion to additional national datasets. If you would like a new country or a different sovereign yield / inflation pair added, feel free to message me with your request so I can consider it for a future implementation.
The script currently includes preset configurations for the United States and Italy, and it also supports custom sources so the framework can be extended to additional countries without changing the core logic. This modular structure makes the indicator suitable as a reusable framework for future country presets and custom macro implementations.
To make the output easier to read, the real-rate proxy is classified into four clearly labeled regimes: Excellent Rate, Good Rate, Acceptable Rate, and High Rate. These labels are paired with a color structure that makes the current macro environment immediately visible on the chart, in the label, and in the dashboard.
A moving average is applied to inflation to reduce the stair-step effect caused by monthly CPI updates and improve visual readability. The indicator also includes a summary dashboard, optional background regime shading, alerts, and a disclaimer so users can interpret the output as informational context rather than financial advice.
This script is intended for traders and investors who want a simple cross-country real-rate framework for macro analysis, mortgage context, and future expansion to additional national datasets. If you would like a new country or a different sovereign yield / inflation pair added, feel free to message me with your request so I can consider it for a future implementation.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。