OPEN-SOURCE SCRIPT
Global Debt-to-GDP Dashboard

I've created this macro indicator to monitor world debt. The Global Debt-to-GDP Dashboard helps you to track, compare, and analyze sovereign and private debt levels across 20 major economies.
It provides institutional-grade debt analysis, allowing traders, long term investors and macro investors to identify systemic risks, divergences from global norms, and accelerating debt trends that could signal future economic instability or opportunities.
What It Does
This indicator transforms complex macroeconomic data into actionable insights to understand country leverage by:
Key Features
Three Divergence Analysis Modes
Use Cases
For Macro Traders
For Long-Term Investors
How to Use
Table Risk Scores:
๐ด๐ด๐ด Extreme Risk: Divergence > +100pp above average
๐ด๐ด High Risk: Divergence > +50pp above average
๐ Moderate Risk: Divergence > 0pp above average
๐ข Low Risk: Divergence > -50pp below average
๐ข๐ข Very Low Risk: Divergence < -50pp below average
NOTE: "Low Risk" and low-debt might also mean that a country is unable to finance through the issuance of government debt. This is not necessarily a good thing and might not correspond to low risk.
Velocity Indicators:
โฌ๏ธโฌ๏ธโฌ๏ธ Rapid Acceleration: +5pp or more per period
โฌ๏ธโฌ๏ธ Strong Acceleration: +2 to +5pp per period
โฌ๏ธ Moderate Increase: +0.5 to +2pp per period
โก๏ธ Stable: -0.5 to +0.5pp per period
โฌ๏ธ Moderate Decrease: -2 to -0.5pp per period
โฌ๏ธโฌ๏ธ Strong Deceleration: -5 to -2pp per period
โฌ๏ธโฌ๏ธโฌ๏ธ Rapid Deceleration: -5pp or less per period
Important Notes
Let me know if you have comments or suggestions.
Truly yours, Henrique Centieiro
It provides institutional-grade debt analysis, allowing traders, long term investors and macro investors to identify systemic risks, divergences from global norms, and accelerating debt trends that could signal future economic instability or opportunities.
What It Does
This indicator transforms complex macroeconomic data into actionable insights to understand country leverage by:
- Tracking Dual Debt Metrics: Monitors both government debt-to-GDP and private debt-to-GDP ratios for 20 countries. This provides a complete picture of total leverage in each economy.
- Divergence Analysis: Compares each country's debt levels against the world average (calculated from selected countries), instantly highlighting which economies are over-leveraged or under-leveraged relative to global norms.
- Velocity Tracking: Calculates the rate of change in debt divergence, identifying which countries are rapidly increasing or decreasing their debt burden.
- Risk Assessment: Automatically categorizes countries by risk level using color-coded visual indicators
Key Features
- 20 Major Economies: USA, China, Japan, Germany, UK, France, Italy, Canada, Spain, Australia, South Korea, Brazil, India, Mexico, Switzerland, Singapore, Norway, Saudi Arabia, Russia, and Turkey
- Simultaneous Visualization: Plot all selected countries on a single chart with unique color coding for easy identification
- Dynamic Country Selection: Enable/disable countries to focus on specific regions or economic blocs
Three Divergence Analysis Modes
- Government Only: Analyze sovereign debt divergence from government debt average
- Private Only: Focus exclusively on private sector leverage (excludes countries without private debt data)
- Total (Gov + Private): Comprehensive view of total economy-wide debt burden [DEFAULT]
Use Cases
For Macro Traders
- Identify Sovereign Risk: Spot countries with unsustainable debt trajectories before credit events
- Currency Pairs: Correlate debt divergence with currency strength/weakness
- Bond Markets: Anticipate yield spread movements based on relative debt positions
- Risk-On/Risk-Off: Use global debt velocity as a systemic risk indicator
For Long-Term Investors
- Country Allocation: Make informed decisions about geographic exposure
- Risk Management: Avoid over-exposure to high-debt economies
- Opportunity Identification: Find under-leveraged economies with growth potential
- Portfolio Rebalancing: Use debt trends as signals for portfolio adjustments
How to Use
- Initial Setup: Select the countries you want to monitor from the Settings panel
- Choose Divergence Type: Select Government Only, Private Only, or Total debt analysis
- Configure Display: Adjust table position, text size, and sorting preferences
- Set Alerts (Optional): Define your alert thresholds and enable notifications
Table Risk Scores:
๐ด๐ด๐ด Extreme Risk: Divergence > +100pp above average
๐ด๐ด High Risk: Divergence > +50pp above average
๐ Moderate Risk: Divergence > 0pp above average
๐ข Low Risk: Divergence > -50pp below average
๐ข๐ข Very Low Risk: Divergence < -50pp below average
NOTE: "Low Risk" and low-debt might also mean that a country is unable to finance through the issuance of government debt. This is not necessarily a good thing and might not correspond to low risk.
Velocity Indicators:
โฌ๏ธโฌ๏ธโฌ๏ธ Rapid Acceleration: +5pp or more per period
โฌ๏ธโฌ๏ธ Strong Acceleration: +2 to +5pp per period
โฌ๏ธ Moderate Increase: +0.5 to +2pp per period
โก๏ธ Stable: -0.5 to +0.5pp per period
โฌ๏ธ Moderate Decrease: -2 to -0.5pp per period
โฌ๏ธโฌ๏ธ Strong Deceleration: -5 to -2pp per period
โฌ๏ธโฌ๏ธโฌ๏ธ Rapid Deceleration: -5pp or less per period
Important Notes
- Data Availability: Some countries lack private debt data (e.g., China, India, Brazil).
- World Average Calculation: The world average is dynamically calculated based on your selected countries, not a fixed global figure. This allows for custom peer group comparisons.
- Percentage Points vs Percentages: All divergence values are in percentage points (pp), representing the absolute difference from the average, not a relative percentage change.
Let me know if you have comments or suggestions.
Truly yours, Henrique Centieiro
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.
Hedge Fund Manager at Maverick Capital | Wealth Educator | 20+ yrs investing | Stocks, ETFs & Crypto alerts | Join Henrique Wealth Academy for trade alerts & indicators โ skool.com/be-limitless/
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.
Hedge Fund Manager at Maverick Capital | Wealth Educator | 20+ yrs investing | Stocks, ETFs & Crypto alerts | Join Henrique Wealth Academy for trade alerts & indicators โ skool.com/be-limitless/
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.