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.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.