OPEN-SOURCE SCRIPT
๐ Reinhart-Rogoff Financial Instability Index (RR-FII)

Overview
The Reinhart-Rogoff Financial Instability Index (RR-FII) is a multi-factor indicator that consolidates historical crisis patterns into a single risk score ranging from 0 to 100. Drawing from the extensive research in "This Time is Different: Eight Centuries of Financial Crises" by Carmen M. Reinhart and Kenneth S. Rogoff, the RR-FII translates nearly a millennium of crisis data into practical insights for financial markets.
What It Does
The RR-FII acts like a real-time financial weather forecast by tracking four key stress indicators that historically signal the build-up to major financial crises. Unlike traditional indicators based only on price, it takes a broader view, examining the global market's interconnected conditions to provide a holistic assessment of systemic risk.
The Four Crisis Components
- Capital Flow Stress (Default weight: 25%)
- Data analyzed: Volatility (ATR) and price movements of the selected asset.
- Detects abrupt volatility surges or sharp price falls, which often precede debt defaults due to sudden stops in capital inflow.
- Commodity Cycle (Default weight: 20%)
- Data analyzed: US crude oil prices (customizable).
- Watches for significant declines from recent highs, since commodity price troughs often signal looming crises in emerging markets.
- Currency Crisis (Default weight: 30%)
- Data analyzed: US Dollar Index (DXY, customizable).
- Flags if the currency depreciates by more than 15% in a year, aligning with historical criteria for currency crashes linked to defaults.
- Banking Sector Health (Default weight: 25%)
- Data analyzed: Performance of financial sector ETFs (e.g., XLF) relative to broad market benchmarks (SPY).
- Monitors for underperformance in the financial sector, a strong indicator of broader financial instability.
Risk Scale Interpretation
- 0-20: Safe โ Low systemic risk, normal conditions.
- 20-40: Moderate โ Some signs of stress, increased caution advised.
- 40-60: Elevated โ Multiple risk factors, consider adjusting positions.
- 60-80: High โ Significant probability of crisis, implement strong risk controls.
- 80-100: Critical โ Several crisis indicators active, exercise maximum caution.
Visual Features
- The main risk line changes color with increasing risk.
- Background colors show different risk zones for quick reference.
- Option to view individual component scores.
- A real-time status table summarizes all component readings.
- Crisis event markers appear when thresholds are breached.
- Customizable alerts notify users of changing risk levels.
How to Use
- Apply as an overlay for broad risk management at the portfolio level.
- Adjust position sizes inversely to the crisis index score.
- Use high index readings as a warning to increase vigilance or reduce exposure.
- Set up alerts for changes in risk levels.
- Analyze using various timeframes; daily and weekly charts yield the best macro insights.
Customizable Settings
- Change the weighting of each crisis factor.
- Switch commodity, currency, banking sector, and benchmark symbols for customized views or regional focus.
- Adjust thresholds and visual settings to match individual risk preferences.
Academic Foundation
Rooted in rigorous analysis of 66 countries and 800 years of data, the RR-FII uses empirically validated relationships and thresholds to assess systemic risk. The indicator embodies key findings: financial crises often follow established patterns, different types of crises frequently coincide, and clear quantitative signals often precede major events.
Best Practices
- Use RR-FII as part of a comprehensive risk management strategy, not as a standalone trading signal.
- Combine with fundamental analysis for complete market insight.
- Monitor for differences between component readings and the overall index.
- Favor higher timeframes for a broader macro view.
- Adjust component importance to suit specific market interests.
Important Disclaimers
- RR-FII assesses risk using patterns from past crises but does not predict future events.
- Historical performance is not a guarantee of future results.
- Always employ proper risk management.
- Consider this tool as one element in a broader analytical toolkit.
- Even with high risk readings, markets may not react immediately.
Technical Requirements
- Compatible with Pine Script v6, suitable for all timeframes and symbols.
- Pulls data automatically for USOIL, DXY, XLF, and SPY.
- Operates without repainting, using only confirmed data.
The RR-FII condenses centuries of financial crisis knowledge into a modern risk management tool, equipping investors and traders with a deeper understanding of when systemic risks are most pronounced.
The Reinhart-Rogoff Financial Instability Index (RR-FII) is a multi-factor indicator that consolidates historical crisis patterns into a single risk score ranging from 0 to 100. Drawing from the extensive research in "This Time is Different: Eight Centuries of Financial Crises" by Carmen M. Reinhart and Kenneth S. Rogoff, the RR-FII translates nearly a millennium of crisis data into practical insights for financial markets.
What It Does
The RR-FII acts like a real-time financial weather forecast by tracking four key stress indicators that historically signal the build-up to major financial crises. Unlike traditional indicators based only on price, it takes a broader view, examining the global market's interconnected conditions to provide a holistic assessment of systemic risk.
The Four Crisis Components
- Capital Flow Stress (Default weight: 25%)
- Data analyzed: Volatility (ATR) and price movements of the selected asset.
- Detects abrupt volatility surges or sharp price falls, which often precede debt defaults due to sudden stops in capital inflow.
- Commodity Cycle (Default weight: 20%)
- Data analyzed: US crude oil prices (customizable).
- Watches for significant declines from recent highs, since commodity price troughs often signal looming crises in emerging markets.
- Currency Crisis (Default weight: 30%)
- Data analyzed: US Dollar Index (DXY, customizable).
- Flags if the currency depreciates by more than 15% in a year, aligning with historical criteria for currency crashes linked to defaults.
- Banking Sector Health (Default weight: 25%)
- Data analyzed: Performance of financial sector ETFs (e.g., XLF) relative to broad market benchmarks (SPY).
- Monitors for underperformance in the financial sector, a strong indicator of broader financial instability.
Risk Scale Interpretation
- 0-20: Safe โ Low systemic risk, normal conditions.
- 20-40: Moderate โ Some signs of stress, increased caution advised.
- 40-60: Elevated โ Multiple risk factors, consider adjusting positions.
- 60-80: High โ Significant probability of crisis, implement strong risk controls.
- 80-100: Critical โ Several crisis indicators active, exercise maximum caution.
Visual Features
- The main risk line changes color with increasing risk.
- Background colors show different risk zones for quick reference.
- Option to view individual component scores.
- A real-time status table summarizes all component readings.
- Crisis event markers appear when thresholds are breached.
- Customizable alerts notify users of changing risk levels.
How to Use
- Apply as an overlay for broad risk management at the portfolio level.
- Adjust position sizes inversely to the crisis index score.
- Use high index readings as a warning to increase vigilance or reduce exposure.
- Set up alerts for changes in risk levels.
- Analyze using various timeframes; daily and weekly charts yield the best macro insights.
Customizable Settings
- Change the weighting of each crisis factor.
- Switch commodity, currency, banking sector, and benchmark symbols for customized views or regional focus.
- Adjust thresholds and visual settings to match individual risk preferences.
Academic Foundation
Rooted in rigorous analysis of 66 countries and 800 years of data, the RR-FII uses empirically validated relationships and thresholds to assess systemic risk. The indicator embodies key findings: financial crises often follow established patterns, different types of crises frequently coincide, and clear quantitative signals often precede major events.
Best Practices
- Use RR-FII as part of a comprehensive risk management strategy, not as a standalone trading signal.
- Combine with fundamental analysis for complete market insight.
- Monitor for differences between component readings and the overall index.
- Favor higher timeframes for a broader macro view.
- Adjust component importance to suit specific market interests.
Important Disclaimers
- RR-FII assesses risk using patterns from past crises but does not predict future events.
- Historical performance is not a guarantee of future results.
- Always employ proper risk management.
- Consider this tool as one element in a broader analytical toolkit.
- Even with high risk readings, markets may not react immediately.
Technical Requirements
- Compatible with Pine Script v6, suitable for all timeframes and symbols.
- Pulls data automatically for USOIL, DXY, XLF, and SPY.
- Operates without repainting, using only confirmed data.
The RR-FII condenses centuries of financial crisis knowledge into a modern risk management tool, equipping investors and traders with a deeper understanding of when systemic risks are most pronounced.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.