OPEN-SOURCE SCRIPT
已更新 Composite Risk Indicator

The Composite Risk Indicator is a financial tool designed to assess market risk by analyzing the spreads between various asset classes. This indicator synthesizes information across six key spreads, normalizing each on a scale from 0 to 100 where higher values represent higher perceived risk. It provides a single, comprehensive measure of market sentiment and risk exposure.
Key Components of the CRI:
1. Stock Market to Bond Market Spread (SPY/BND): Measures the performance of stocks relative to bonds. Higher values indicate stronger stock performance compared to bonds, suggesting increased market optimism and higher risk.
2. Junk Bond to Treasury Bond Spread (HYG/GOVT): Assesses the performance of high-yield (riskier) bonds relative to government (safer) bonds. A higher ratio indicates increased appetite for risk.
3. Junk Bond to Investment Grade Bond Spread (HYG/LQD): Compares high-yield bonds to investment-grade corporate bonds. This ratio sheds light on the risk tolerance within the corporate bond market.
4. Growth to Value Spread (VUG/VTV): Evaluates the performance of growth stocks against value stocks. A higher value suggests a preference for growth stocks, often seen in risk-on environments.
5. Tech to Staples Spread (XLK/XLP): Measures the performance of technology stocks relative to consumer staples. This ratio highlights the market’s risk preference within equity sectors.
6. Small Cap Growth to Small Cap Value Spread (SLYG/SLYV): Compares small-cap growth stocks to small-cap value stocks, providing insight into risk levels in smaller companies.
Utility:
This indicator is particularly useful for investors and traders looking to gauge market sentiment, identify shifts in risk appetite, and make informed decisions based on a broad assessment of market conditions. The CRI can serve as a valuable addition to investment analysis and risk management strategies.
Key Components of the CRI:
1. Stock Market to Bond Market Spread (SPY/BND): Measures the performance of stocks relative to bonds. Higher values indicate stronger stock performance compared to bonds, suggesting increased market optimism and higher risk.
2. Junk Bond to Treasury Bond Spread (HYG/GOVT): Assesses the performance of high-yield (riskier) bonds relative to government (safer) bonds. A higher ratio indicates increased appetite for risk.
3. Junk Bond to Investment Grade Bond Spread (HYG/LQD): Compares high-yield bonds to investment-grade corporate bonds. This ratio sheds light on the risk tolerance within the corporate bond market.
4. Growth to Value Spread (VUG/VTV): Evaluates the performance of growth stocks against value stocks. A higher value suggests a preference for growth stocks, often seen in risk-on environments.
5. Tech to Staples Spread (XLK/XLP): Measures the performance of technology stocks relative to consumer staples. This ratio highlights the market’s risk preference within equity sectors.
6. Small Cap Growth to Small Cap Value Spread (SLYG/SLYV): Compares small-cap growth stocks to small-cap value stocks, providing insight into risk levels in smaller companies.
Utility:
This indicator is particularly useful for investors and traders looking to gauge market sentiment, identify shifts in risk appetite, and make informed decisions based on a broad assessment of market conditions. The CRI can serve as a valuable addition to investment analysis and risk management strategies.
發行說明
Composite Risk Indicator (CRI)The Composite Risk Indicator is a sophisticated tool designed to assess market risk by analyzing the spreads between various asset classes, now including key currency pairs. This indicator synthesizes information from multiple domains—equities, bonds, and currencies—normalizing each on a scale from 0 to 100, where higher values represent higher perceived risk. It provides a comprehensive measure of market sentiment and risk exposure.
Key Components of the CRI:
Equities and Bonds:
Stock Market to Bond Market Spread (SPY/BND): Measures the performance of stocks relative to bonds, indicating market optimism and risk levels.
Junk Bond to Treasury Bond Spread (HYG/GOVT) and Junk Bond to Investment Grade Bond Spread (HYG/LQD): Reflect the market's risk tolerance within the bond sector.
Growth to Value Spread (VUG/VTV): Evaluates the preference for growth stocks versus value stocks.
Tech to Staples Spread (XLK/XLP): Highlights risk preferences within equity sectors.
Small Cap Growth to Small Cap Value Spread (SLYG/SLYV): Provides insight into risk levels in smaller companies.
Currencies:
Australian Dollar to Japanese Yen (FXA/FXY): This spread offers insights into risk sentiment between growth-oriented and safe-haven currencies.
Australian Dollar to US Dollar (FXA/UUP): Measures the performance of a growth-linked currency against the world's reserve currency, reflecting broader economic trends.
Utility:
This indicator is particularly useful for investors and traders looking to gauge overall market sentiment, identify shifts in risk appetite, and make informed decisions based on a broad assessment of market conditions. It serves as a valuable addition to investment analysis and risk management strategies, offering insights not just from traditional stocks and bonds but also from the forex market.
發行說明
Added a High Beta to Low Beta spread component.發行說明
Added the following to the index:SPY/VIX spread
AUD(FXA)/JPY(FXY)
AUD(FXA)/USD(UUP)
發行說明
Removed SLYG/SLV ratioAdded IWM/SPY ratio
Added XLY/XLP ratio
Added IYT/DIA ratio
發行說明
Added grid lines on the index chart to show areas of Extreme Risk Off 0-25
Risk Off 25-45
Neutral 45-55
Risk On 55-75
Extreme Risk On 75-100
發行說明
Removed due to redundancy in data-XLK/XLP
-XLY/XLP
Converted FX pairs to respective currency pairs and not the proxy ETFs
From FXA/FXY to AUDJPY
From FXA/UUP to AUDUSD
發行說明
Minor code fix發行說明
Removed any asset pair with a correlation threshold < .3Which included
(IWM/SPY)
(IYT/DIA)
(RSP/SPY)
The elimination of "noisy" asset pairs improves the reliability of the indicator for visualizing "Risk On" vs. "Risk Off" periods.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。