OPEN-SOURCE SCRIPT

Composite Risk Indicator

Aggiornato
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.
Note di rilascio
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.
Note di rilascio
Added a High Beta to Low Beta spread component.
Note di rilascio
Added the following to the index:

SPY/VIX spread
AUD(FXA)/JPY(FXY)
AUD(FXA)/USD(UUP)
Note di rilascio
Removed SLYG/SLV ratio

Added IWM/SPY ratio
Added XLY/XLP ratio
Added IYT/DIA ratio
Note di rilascio
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
Note di rilascio
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
Note di rilascio
Minor code fix
Note di rilascio
Removed any asset pair with a correlation threshold < .3
Which 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.
sentimentstatisticsVolatility

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?


Anche su:

Declinazione di responsabilità