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.
הערות שחרור
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 ratio

Added 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 < .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

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?


גם על:

כתב ויתור