OPEN-SOURCE SCRIPT
업데이트됨 Macro Risk Regime Composite

Macro Risk Regime Composite
The Macro Risk Regime Composite is a multi-factor indicator designed to identify broad risk-on, neutral, and risk-off market environments.
The indicator combines liquidity, currency, interest-rate, credit, crypto-liquidity, and equity-market confirmation data into a single normalized score ranging from 0 to 100.
A higher score indicates a more supportive environment for risk assets, while a lower score indicates tighter financial conditions and a more defensive market regime.
COMPONENTS
1. Net USD Liquidity
Net USD liquidity is calculated as:
Federal Reserve Total Assets
− Overnight Reverse Repo
− U.S. Treasury General Account
Data source:
ECONOMICS:USCBBS − FRED:RRPONTTLD − FRED:WTREGEN
Rising net liquidity is treated as supportive for risk assets.
2. U.S. Dollar Index
Data source:
TVC:DXY
A falling U.S. dollar is treated as supportive, while a rising dollar is treated as restrictive.
3. 10-Year Real Yield
Data source:
FRED:DFII10
Falling real yields are treated as supportive for risk assets. Rising real yields increase the discount rate applied to financial assets and are treated as restrictive.
4. High-Yield Credit Spread
Data source:
FRED:BAMLH0A0HYM2
Narrowing high-yield credit spreads indicate improving risk appetite and easier financial conditions. Widening spreads indicate increasing credit stress.
5. Stablecoin Dominance
Data source:
CRYPTOCAP:USDT.D + CRYPTOCAP:USDC.D
Falling stablecoin dominance is treated as crypto risk-on, as capital is moving from stablecoins into more volatile crypto assets. Rising stablecoin dominance is treated as defensive.
6. Equity Market Confirmation
Data source:
NASDAQ:NDX / SP:SPX
Rising Nasdaq 100 relative strength versus the S&P 500 is treated as confirmation of stronger risk appetite.
CALCULATION
Each component measures its momentum over a configurable number of weeks.
The component impulse is normalized relative to its own historical distribution using a configurable normalization window. The normalized result is converted into a score between 0 and 100.
The final composite is calculated as a weighted average of all active components.
Default weights:
• Net USD Liquidity: 25%
• U.S. Dollar Index: 15%
• 10-Year Real Yield: 20%
• High-Yield Credit Spread: 20%
• Stablecoin Dominance: 10%
• NDX/SPX Confirmation: 10%
REGIME INTERPRETATION
• 65–100: Risk-On
• 35–65: Neutral
• 0–35: Risk-Off
Scores above 50 indicate that the overall macro environment is becoming more supportive. Scores below 50 indicate that financial conditions are becoming more restrictive.
The dashboard also classifies each component as:
• Supportive
• Neutral
• Restrictive
SETTINGS
Momentum Period
Defines the number of weeks used to calculate the change in each component.
Normalization Period
Defines the historical window used to normalize each component relative to its own behavior.
Smoothing
Applies additional smoothing to reduce short-term noise.
Component Weights
Allows users to change the importance of each macro factor or disable individual components.
Risk-On and Risk-Off Thresholds
Allow users to customize the regime classification levels.
USAGE
The indicator is designed primarily for weekly macro and market-cycle analysis.
It may be used as a regime filter for:
• Bitcoin and Ethereum
• Nasdaq 100 and S&P 500
• Growth stocks
• Gold and commodities
• Treasury bonds
• Other risk-sensitive assets
The composite should not be interpreted as a direct entry or exit signal. It is intended to provide context regarding the broader liquidity and financial-conditions environment.
The current weekly reading may change before the weekly candle closes because some data series continue to update during the week.
DISCLAIMER
This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, trading, or legal advice.
No macroeconomic indicator can reliably predict future market performance. Historical relationships may weaken, disappear, or reverse during different market regimes.
Users should combine this indicator with independent analysis, price structure, position sizing, and appropriate risk management.
The Macro Risk Regime Composite is a multi-factor indicator designed to identify broad risk-on, neutral, and risk-off market environments.
The indicator combines liquidity, currency, interest-rate, credit, crypto-liquidity, and equity-market confirmation data into a single normalized score ranging from 0 to 100.
A higher score indicates a more supportive environment for risk assets, while a lower score indicates tighter financial conditions and a more defensive market regime.
COMPONENTS
1. Net USD Liquidity
Net USD liquidity is calculated as:
Federal Reserve Total Assets
− Overnight Reverse Repo
− U.S. Treasury General Account
Data source:
ECONOMICS:USCBBS − FRED:RRPONTTLD − FRED:WTREGEN
Rising net liquidity is treated as supportive for risk assets.
2. U.S. Dollar Index
Data source:
TVC:DXY
A falling U.S. dollar is treated as supportive, while a rising dollar is treated as restrictive.
3. 10-Year Real Yield
Data source:
FRED:DFII10
Falling real yields are treated as supportive for risk assets. Rising real yields increase the discount rate applied to financial assets and are treated as restrictive.
4. High-Yield Credit Spread
Data source:
FRED:BAMLH0A0HYM2
Narrowing high-yield credit spreads indicate improving risk appetite and easier financial conditions. Widening spreads indicate increasing credit stress.
5. Stablecoin Dominance
Data source:
CRYPTOCAP:USDT.D + CRYPTOCAP:USDC.D
Falling stablecoin dominance is treated as crypto risk-on, as capital is moving from stablecoins into more volatile crypto assets. Rising stablecoin dominance is treated as defensive.
6. Equity Market Confirmation
Data source:
NASDAQ:NDX / SP:SPX
Rising Nasdaq 100 relative strength versus the S&P 500 is treated as confirmation of stronger risk appetite.
CALCULATION
Each component measures its momentum over a configurable number of weeks.
The component impulse is normalized relative to its own historical distribution using a configurable normalization window. The normalized result is converted into a score between 0 and 100.
The final composite is calculated as a weighted average of all active components.
Default weights:
• Net USD Liquidity: 25%
• U.S. Dollar Index: 15%
• 10-Year Real Yield: 20%
• High-Yield Credit Spread: 20%
• Stablecoin Dominance: 10%
• NDX/SPX Confirmation: 10%
REGIME INTERPRETATION
• 65–100: Risk-On
• 35–65: Neutral
• 0–35: Risk-Off
Scores above 50 indicate that the overall macro environment is becoming more supportive. Scores below 50 indicate that financial conditions are becoming more restrictive.
The dashboard also classifies each component as:
• Supportive
• Neutral
• Restrictive
SETTINGS
Momentum Period
Defines the number of weeks used to calculate the change in each component.
Normalization Period
Defines the historical window used to normalize each component relative to its own behavior.
Smoothing
Applies additional smoothing to reduce short-term noise.
Component Weights
Allows users to change the importance of each macro factor or disable individual components.
Risk-On and Risk-Off Thresholds
Allow users to customize the regime classification levels.
USAGE
The indicator is designed primarily for weekly macro and market-cycle analysis.
It may be used as a regime filter for:
• Bitcoin and Ethereum
• Nasdaq 100 and S&P 500
• Growth stocks
• Gold and commodities
• Treasury bonds
• Other risk-sensitive assets
The composite should not be interpreted as a direct entry or exit signal. It is intended to provide context regarding the broader liquidity and financial-conditions environment.
The current weekly reading may change before the weekly candle closes because some data series continue to update during the week.
DISCLAIMER
This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, trading, or legal advice.
No macroeconomic indicator can reliably predict future market performance. Historical relationships may weaken, disappear, or reverse during different market regimes.
Users should combine this indicator with independent analysis, price structure, position sizing, and appropriate risk management.
릴리즈 노트
Updated the dashboard layout.The previous vertical table in the lower-right corner has been replaced with a compact horizontal dashboard positioned at the bottom center of the indicator.
All component scores, signals, calculations, weights, and regime thresholds remain unchanged. This update only improves readability and chart visibility.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.