Обновлено
Sector Rotation Indicator

Overview
Quantitative sector rotation system designed to select the ETF or market stock with the greatest relative strength using technical indicators from the OPERATIONAL CENTER. It aims to maintain exposure to the leading asset during favorable market phases and reduce risk when the stock market regime loses strength.
Operational Center
1. SYSTEMATIC RISK
The objective is to detect market conditions that may be associated with elevated macroeconomic, geopolitical, or global systemic risk. The row of “Riesgo Sistematico” component incorporates an adapted implementation of concepts and calculation logic from the Bubble Risk Model (BRM) originally developed by EdgeTools. It is not an exact replica of the original indicator and is used only as one component within this broader indicator; the author's credits are provided at the bottom of the page.
This indicator introduces its own additional condition "EXTREME RISK" category, a label that only triggers when the S&P 500 price is below its EMA80, the EMA20/EMA60 score of the consumer staples index (IXR) exceeds that of the technology index (IXT), and the Bubble Risk Model indicates High Risk (its line turns red).
Combines 4 components calculated on the SPX:
• Year-over-Year (YoY) return relative to its historical percentile.
• Persistence of positive days (63 sessions) relative to its historical percentile.
• Distance of the price to its 200 SMA in ATR units.
• Movement efficiency (return/volatility) over 63 sessions.
The Operational Center features the following categories: 🟣 Extreme Risk (dark red/purple). 🔴 High Risk (fragile model state, red). ⚪ Neutral Risk (gray). 🟢 Low Risk (healthy state, green).
Trading is permitted in low-risk, neutral-risk, and high-risk zones. The exit signal is EXTREME RISK indicated by the Operational Center, which will display a label at the top of the chart with the signal Extreme Risk Close for the last Long position. Extreme risk anticipates an imminent recoil, unless the 80-period EMA is recovered.
2. MARKET CYCLE / TREND
2.1 Market Cycle
Classifies the market phase using the position of the SP500 relative to the 21 EMA, 90 EMA, and 200 EMA. It identifies boom, expansion, crisis, and recession phases based on the index's trend structure.
🟢 Peak / Boom (EMA 1-21): The SP500 is above the 21 EMA, showing immediate strength and an uptrend.
🔵 Expansion (EMA 22-90): The price is between the 90 EMA and 21 EMA, indicating a consolidation or moderate growth phase.
🟠 Crisis (EMA 91-200): The price is between the 200 EMA and 90 EMA, reflecting a loss of strength and trend deterioration.
🔴 Recession (EMA >200): The SP500 is below the 200 EMA, indicating structural market weakness.
- Clarification: Only invest when the Market Cycle is in PEAK or EXPANSION.
2.2 Stock Market Trend
Shows the dominant market direction through the SP500 position within the calculated cycle. Serves as a context filter to determine whether the environment is bullish, neutral, or bearish.
🟢 Bullish: When the cycle is between EMA 1-21. The SP500 is above the 21 EMA, indicating strength and a positive trend.
🟡 Neutral-Bullish: When the cycle is between EMA 22-55. The price maintains a positive structure but loses momentum against the 21 EMA.
🟠 Neutral-Bearish: When the cycle is between EMA 56-90. The price approaches the 90 EMA, showing trend deterioration.
🔴 Bearish: When the cycle is above EMA 91.
3. METRICS (SPX)
- Header: Market health % is weighted (VIX 40%, RSI 30%, Amplitude 30%). The color uses:🟢 ≤35 (Good health), 36-64⚪ (Neutral), and 🔴 ≥65 High Risk. Low is Better
- VIX: Expected volatility of the SPX. ≤10 Euphoria · ≤20 Calm · ≤30 Neutral · <44 Fear · ≥44 Panic.
- RSI: Average RSI(14) of SPX. Risk increases with oversold conditions and moderately with overbought conditions, with the latter capped at 50.
- Breadth: Higher is better. Breadth Score (0-100) = 33.3% A/D Line + 33.3% New Highs/Lows + 16.7% S5TH (% > SMA200) + 16.7% S5FI (% > SMA50), with each component normalized to 0-100. Categories; Healthy ≥ 60 | Neutral 40-59 | Weak < 40
4. DOMINANCE
Represents the relative strength of the selected ETF through the weighted score of 7 indicators. The combined weighting avoids relying on a single signal and combines relative leadership, momentum, trend, and risk.
5. DOMINANCE STRENGTH
Translates the score value into an actionable operational reading: strong dominance, moderate advantage, or equilibrium. Facilitates visual interpretation of the signal intensity generated by the model.
🟢 Strong Dominance (Above 5%): The fast moving average is widely separated from the slow one. Strong and accelerated bullish momentum exists.
🟡 Moderate Advantage (Between 1% and 5%): The fast moving average leads the slow one by a narrow margin. This means there is a bullish trend, but contained, calm, or in a maturing phase without excessive euphoria. In this phase, a value closer to 1% indicates that assets are more evenly matched.
⚪ Equilibrium / Potential Rotation (Between -1% and 1%): Moving averages are virtually touching. Assets are technically tied, and a change in leadership could occur soon.
🔴 Bearish Dominance (Below -1%): The fast moving average is below the slow one, indicating clear structural weakness. Dominance should have rotated.
6. TREND CHANGE
Indicates when the system rotates its active position to another ETF because that asset has taken the lead in the score.
Factors that determine the rotation:
- Score (EMA 20 / EMA 60) → The percentage spread between a fast EMA (20) and a slow EMA (60) of each ETF. A higher score means stronger and more sustained trend momentum.
- Market Regime Filter (S&P 500 vs. SMA 200) → Defines whether the minimum score buffer is required (bullish market) or not (bearish market).
- Minimum Score Buffer → When comparing three or more ETFs, a new leader must exceed the active ETF's score by a minimum margin before the system rotates.
- Anti-Rotation Filter → Limits switches during high-risk periods, blocking rotations toward more volatile ETFs.
7. CANDLE STATE
- Objective: Facilitate chart reading by classifying and color-coding candles as bullish (cyan) or bearish (fuchsia).
- Mathematical Basis: Composite Kernel Regression model consisting of Epanechnikov, Logistic, and Wave Kernel models.
- Key Feature: Precise identification of trend direction (bullish/bearish) without needing to add structural or complementary indicators.
8. AVOIDING FALSE SIGNALS
8.1 Long Filter (EMA 90-200)
Extreme risk closes long positions in highly complex macroeconomic situations.
Furthermore, the system utilizes a regime filter based on the SP500: when the color band turns blue or red, it signals to close the position; it is most likely that the price will move from below the 80 EMA to below the 200 EMA in a short period.
- Blue Zone: When the SP500 is below the 80 EMA.
- Red Zone: When the SP500 loses the 200 EMA, indicating a higher-risk bearish regime.
8.2 Close Filter (Bollinger)
This indicator shows +1P when a candle is completely outside the Bollinger Band, providing an additional signal that may help avoid acting prematurely.
The Systematic Risk line can also provide additional context when it is far from its moving average and remains in the green zone, indicating that the current risk conditions remain favorable.
9. Upper Chart Panel
The main chart displays trades executed by the strategy:
- Long Signals → Entries into the selected ETF.
- Close Signals → Closures of previous positions.
- Early Risk signal (risk anticipation) and Extreme Risk (risk confirmation).
- Risk RSI (exceptional situations, average RSI below 23).
- Evolution of ETF rotation.
10. Lower Chart Panel
- Bands: The blue band represents the EMA below 80 periods and the red band represents the SPX EMA below 200 periods.
- The lines represent ETF strength.
- Important: Extra line representing systematic risk with three colors: green line (low risk), gray line (neutral), and red zone (high risk).
Originality and how to use
Unlike a conventional rotation indicator, this one combines, in a single panel, the macro reading of the market (regime, cycle, systematic risk, VIX, RSI and market breadth) with the specific rotation between ETFs and market stocks. This way, every rotation signal is filtered by the current risk context rather than generated in isolation.
How to use
1. Timeframe: The user can choose any timeframe they prefer. This does not affect the indicator's functionality.
2. Recommended chart: ideally, always use it on the charts of the assets you are comparing (ETF A, ETF B…), since the Long/Close signals, the Bollinger Bands and the candle coloring are drawn on the chart's asset.
Structure: macro + specific
- Macro part: market regime (SPX versus its moving averages), market cycle (Boom, Expansion, Crisis, Recession), trend, systematic risk with its labels (Extreme Risk, Early Risk, Risk RSI) and SPX metrics (VIX, average RSI and market breadth) with a composite score.
- Specific part: strength and dominance between the ETFs (EMA20/EMA60), absolute momentum filter, Long/Close signals, Bollinger Bands (+1P/-1P) and candle state via Kernel Regression.
Both parts are integrated in the "Operations Center" table, which brings together the macro context and the specific rotation signal in a single view.
3. Very Important:
- If Extreme Risk / Close A appears, the indicator is signaling that A should be closed due to risk.
- That close does not change the DOMINANCE row: it will keep showing A (as the dominant asset, is correct).
- The cell will only change when the system selects another ETF, for example B.
- The user must manually change the assets they wish to compare from the settings. The default selected assets are SP:IXT and SP:IXR. Changing these assets does not alter how the indicator works; the choice of assets is left entirely to the user's discretion. The "Extreme Risk" label/signal is not affected by the user's asset selection (ETF A–E): it is always calculated from fixed reference data (SPX, IXT and IXR).
- Configurable Alert Conditions: Extreme Risk, Early Risk, Risk RSI, Price below EMA 200, Price above EMA 200, Fast EMA above Slow EMA, Fast EMA below Slow EMA (with left click). This is what turns our indicator into an operational tool.
4. Limitations
Since the macroeconomic regime is linked exclusively to the S&P 500, it may not be representative of alternative assets that are uncorrelated with it (such as commodities or crypto-assets…). The asset comparison regime is unaffected by this, so it will continue to function correctly.
Copyright
Only the Systematic Risk component incorporates adapted concepts and calculation logic from the Bubble Risk Model (BRM) created by EdgeTools, and it is a non-exact replica of its behavior. The “Riesgo Sistematico” component is displayed as a risk-score line in the lower panel. This plot can be enabled through the "Mostrar Plot de Riesgo Sistemático" input.
The remainder of our own indicator was developed independently and constitutes original work. The indicator combines ETF rotation between assets A/B/C/D/E with relative momentum, absolute momentum, catch-up rotation, SPX market regime, Peak/Expansion/Crisis/Recession classification, EMA-based trend analysis, blue/red regime bands, RSI across different assets, VIX, market breadth, composite metrics, dominance, dominance strength, trend-change detection, Bollinger Bands, Kernel Regression, Extreme Risk, Early Risk, Risk RSI, custom alerts, a custom dashboard, an ETF entry/exit system, and custom logic supporting 2 to 5 assets.
- Bubble Risk Model: es.tradingview.com/v/gOQZGRbY/
- EdgeTools' TradingView profile: es.tradingview.com/u/EdgeTools/
Disclaimer
- This indicator is not designed to achieve any particular return. Therefore, it is up to the user to carry out their own backtesting, if they wish, to verify its reliability.
- This indicator is intended solely for educational purposes and does not constitute financial, investment, legal or business advice. Even though the tool displays buy or sell signals, any decision, interpretation, capital management and risk arising from them is the sole responsibility of the user.
- Always carry out your own analysis and manage risk responsibly.
Legacy Edition
Quantitative sector rotation system designed to select the ETF or market stock with the greatest relative strength using technical indicators from the OPERATIONAL CENTER. It aims to maintain exposure to the leading asset during favorable market phases and reduce risk when the stock market regime loses strength.
Operational Center
1. SYSTEMATIC RISK
The objective is to detect market conditions that may be associated with elevated macroeconomic, geopolitical, or global systemic risk. The row of “Riesgo Sistematico” component incorporates an adapted implementation of concepts and calculation logic from the Bubble Risk Model (BRM) originally developed by EdgeTools. It is not an exact replica of the original indicator and is used only as one component within this broader indicator; the author's credits are provided at the bottom of the page.
This indicator introduces its own additional condition "EXTREME RISK" category, a label that only triggers when the S&P 500 price is below its EMA80, the EMA20/EMA60 score of the consumer staples index (IXR) exceeds that of the technology index (IXT), and the Bubble Risk Model indicates High Risk (its line turns red).
Combines 4 components calculated on the SPX:
• Year-over-Year (YoY) return relative to its historical percentile.
• Persistence of positive days (63 sessions) relative to its historical percentile.
• Distance of the price to its 200 SMA in ATR units.
• Movement efficiency (return/volatility) over 63 sessions.
The Operational Center features the following categories: 🟣 Extreme Risk (dark red/purple). 🔴 High Risk (fragile model state, red). ⚪ Neutral Risk (gray). 🟢 Low Risk (healthy state, green).
Trading is permitted in low-risk, neutral-risk, and high-risk zones. The exit signal is EXTREME RISK indicated by the Operational Center, which will display a label at the top of the chart with the signal Extreme Risk Close for the last Long position. Extreme risk anticipates an imminent recoil, unless the 80-period EMA is recovered.
2. MARKET CYCLE / TREND
2.1 Market Cycle
Classifies the market phase using the position of the SP500 relative to the 21 EMA, 90 EMA, and 200 EMA. It identifies boom, expansion, crisis, and recession phases based on the index's trend structure.
🟢 Peak / Boom (EMA 1-21): The SP500 is above the 21 EMA, showing immediate strength and an uptrend.
🔵 Expansion (EMA 22-90): The price is between the 90 EMA and 21 EMA, indicating a consolidation or moderate growth phase.
🟠 Crisis (EMA 91-200): The price is between the 200 EMA and 90 EMA, reflecting a loss of strength and trend deterioration.
🔴 Recession (EMA >200): The SP500 is below the 200 EMA, indicating structural market weakness.
- Clarification: Only invest when the Market Cycle is in PEAK or EXPANSION.
2.2 Stock Market Trend
Shows the dominant market direction through the SP500 position within the calculated cycle. Serves as a context filter to determine whether the environment is bullish, neutral, or bearish.
🟢 Bullish: When the cycle is between EMA 1-21. The SP500 is above the 21 EMA, indicating strength and a positive trend.
🟡 Neutral-Bullish: When the cycle is between EMA 22-55. The price maintains a positive structure but loses momentum against the 21 EMA.
🟠 Neutral-Bearish: When the cycle is between EMA 56-90. The price approaches the 90 EMA, showing trend deterioration.
🔴 Bearish: When the cycle is above EMA 91.
3. METRICS (SPX)
- Header: Market health % is weighted (VIX 40%, RSI 30%, Amplitude 30%). The color uses:🟢 ≤35 (Good health), 36-64⚪ (Neutral), and 🔴 ≥65 High Risk. Low is Better
- VIX: Expected volatility of the SPX. ≤10 Euphoria · ≤20 Calm · ≤30 Neutral · <44 Fear · ≥44 Panic.
- RSI: Average RSI(14) of SPX. Risk increases with oversold conditions and moderately with overbought conditions, with the latter capped at 50.
- Breadth: Higher is better. Breadth Score (0-100) = 33.3% A/D Line + 33.3% New Highs/Lows + 16.7% S5TH (% > SMA200) + 16.7% S5FI (% > SMA50), with each component normalized to 0-100. Categories; Healthy ≥ 60 | Neutral 40-59 | Weak < 40
4. DOMINANCE
Represents the relative strength of the selected ETF through the weighted score of 7 indicators. The combined weighting avoids relying on a single signal and combines relative leadership, momentum, trend, and risk.
5. DOMINANCE STRENGTH
Translates the score value into an actionable operational reading: strong dominance, moderate advantage, or equilibrium. Facilitates visual interpretation of the signal intensity generated by the model.
🟢 Strong Dominance (Above 5%): The fast moving average is widely separated from the slow one. Strong and accelerated bullish momentum exists.
🟡 Moderate Advantage (Between 1% and 5%): The fast moving average leads the slow one by a narrow margin. This means there is a bullish trend, but contained, calm, or in a maturing phase without excessive euphoria. In this phase, a value closer to 1% indicates that assets are more evenly matched.
⚪ Equilibrium / Potential Rotation (Between -1% and 1%): Moving averages are virtually touching. Assets are technically tied, and a change in leadership could occur soon.
🔴 Bearish Dominance (Below -1%): The fast moving average is below the slow one, indicating clear structural weakness. Dominance should have rotated.
6. TREND CHANGE
Indicates when the system rotates its active position to another ETF because that asset has taken the lead in the score.
Factors that determine the rotation:
- Score (EMA 20 / EMA 60) → The percentage spread between a fast EMA (20) and a slow EMA (60) of each ETF. A higher score means stronger and more sustained trend momentum.
- Market Regime Filter (S&P 500 vs. SMA 200) → Defines whether the minimum score buffer is required (bullish market) or not (bearish market).
- Minimum Score Buffer → When comparing three or more ETFs, a new leader must exceed the active ETF's score by a minimum margin before the system rotates.
- Anti-Rotation Filter → Limits switches during high-risk periods, blocking rotations toward more volatile ETFs.
7. CANDLE STATE
- Objective: Facilitate chart reading by classifying and color-coding candles as bullish (cyan) or bearish (fuchsia).
- Mathematical Basis: Composite Kernel Regression model consisting of Epanechnikov, Logistic, and Wave Kernel models.
- Key Feature: Precise identification of trend direction (bullish/bearish) without needing to add structural or complementary indicators.
8. AVOIDING FALSE SIGNALS
8.1 Long Filter (EMA 90-200)
Extreme risk closes long positions in highly complex macroeconomic situations.
Furthermore, the system utilizes a regime filter based on the SP500: when the color band turns blue or red, it signals to close the position; it is most likely that the price will move from below the 80 EMA to below the 200 EMA in a short period.
- Blue Zone: When the SP500 is below the 80 EMA.
- Red Zone: When the SP500 loses the 200 EMA, indicating a higher-risk bearish regime.
8.2 Close Filter (Bollinger)
This indicator shows +1P when a candle is completely outside the Bollinger Band, providing an additional signal that may help avoid acting prematurely.
The Systematic Risk line can also provide additional context when it is far from its moving average and remains in the green zone, indicating that the current risk conditions remain favorable.
9. Upper Chart Panel
The main chart displays trades executed by the strategy:
- Long Signals → Entries into the selected ETF.
- Close Signals → Closures of previous positions.
- Early Risk signal (risk anticipation) and Extreme Risk (risk confirmation).
- Risk RSI (exceptional situations, average RSI below 23).
- Evolution of ETF rotation.
10. Lower Chart Panel
- Bands: The blue band represents the EMA below 80 periods and the red band represents the SPX EMA below 200 periods.
- The lines represent ETF strength.
- Important: Extra line representing systematic risk with three colors: green line (low risk), gray line (neutral), and red zone (high risk).
Originality and how to use
Unlike a conventional rotation indicator, this one combines, in a single panel, the macro reading of the market (regime, cycle, systematic risk, VIX, RSI and market breadth) with the specific rotation between ETFs and market stocks. This way, every rotation signal is filtered by the current risk context rather than generated in isolation.
How to use
1. Timeframe: The user can choose any timeframe they prefer. This does not affect the indicator's functionality.
2. Recommended chart: ideally, always use it on the charts of the assets you are comparing (ETF A, ETF B…), since the Long/Close signals, the Bollinger Bands and the candle coloring are drawn on the chart's asset.
Structure: macro + specific
- Macro part: market regime (SPX versus its moving averages), market cycle (Boom, Expansion, Crisis, Recession), trend, systematic risk with its labels (Extreme Risk, Early Risk, Risk RSI) and SPX metrics (VIX, average RSI and market breadth) with a composite score.
- Specific part: strength and dominance between the ETFs (EMA20/EMA60), absolute momentum filter, Long/Close signals, Bollinger Bands (+1P/-1P) and candle state via Kernel Regression.
Both parts are integrated in the "Operations Center" table, which brings together the macro context and the specific rotation signal in a single view.
3. Very Important:
- If Extreme Risk / Close A appears, the indicator is signaling that A should be closed due to risk.
- That close does not change the DOMINANCE row: it will keep showing A (as the dominant asset, is correct).
- The cell will only change when the system selects another ETF, for example B.
- The user must manually change the assets they wish to compare from the settings. The default selected assets are SP:IXT and SP:IXR. Changing these assets does not alter how the indicator works; the choice of assets is left entirely to the user's discretion. The "Extreme Risk" label/signal is not affected by the user's asset selection (ETF A–E): it is always calculated from fixed reference data (SPX, IXT and IXR).
- Configurable Alert Conditions: Extreme Risk, Early Risk, Risk RSI, Price below EMA 200, Price above EMA 200, Fast EMA above Slow EMA, Fast EMA below Slow EMA (with left click). This is what turns our indicator into an operational tool.
4. Limitations
Since the macroeconomic regime is linked exclusively to the S&P 500, it may not be representative of alternative assets that are uncorrelated with it (such as commodities or crypto-assets…). The asset comparison regime is unaffected by this, so it will continue to function correctly.
Copyright
Only the Systematic Risk component incorporates adapted concepts and calculation logic from the Bubble Risk Model (BRM) created by EdgeTools, and it is a non-exact replica of its behavior. The “Riesgo Sistematico” component is displayed as a risk-score line in the lower panel. This plot can be enabled through the "Mostrar Plot de Riesgo Sistemático" input.
The remainder of our own indicator was developed independently and constitutes original work. The indicator combines ETF rotation between assets A/B/C/D/E with relative momentum, absolute momentum, catch-up rotation, SPX market regime, Peak/Expansion/Crisis/Recession classification, EMA-based trend analysis, blue/red regime bands, RSI across different assets, VIX, market breadth, composite metrics, dominance, dominance strength, trend-change detection, Bollinger Bands, Kernel Regression, Extreme Risk, Early Risk, Risk RSI, custom alerts, a custom dashboard, an ETF entry/exit system, and custom logic supporting 2 to 5 assets.
- Bubble Risk Model: es.tradingview.com/v/gOQZGRbY/
- EdgeTools' TradingView profile: es.tradingview.com/u/EdgeTools/
Disclaimer
- This indicator is not designed to achieve any particular return. Therefore, it is up to the user to carry out their own backtesting, if they wish, to verify its reliability.
- This indicator is intended solely for educational purposes and does not constitute financial, investment, legal or business advice. Even though the tool displays buy or sell signals, any decision, interpretation, capital management and risk arising from them is the sole responsibility of the user.
- Always carry out your own analysis and manage risk responsibly.
Legacy Edition
Информация о релизе
A small improvement has been released: we now have a multilingual indicator supporting 14 languages: Español, English, Français, Deutsch, Italiano, Русский, 中文 (简体), Türkçe, Português, हिन्दी, বাংলা, العربية, 日本語, and 한국어. In the VIX, euphoria was replaced by a low.These changes are part of a much larger upcoming update, which doesn't have a confirmed release date yet. The indicator may be republished in the future as “Asset Rotation Indicator” to better reflect what it actually does, but the sector rotation factor will already be introduced (Risk Mode) + Introduce a new mechanism so that systematic risk and metrics are not limited to the SPX, would justify a version jump
Информация о релизе
Mistake fixes: Fixed a bug that caused the “LONG” labels to shift when the Extreme Risk signal was disabled. The cause was that the anti-rotation filter made the appearance of these signals conditional. This is now resolved: the anti-rotation filter still does its job, but without the restrictive condition that caused the shift.
Systematic risk regime expansion: The indicator has overcome one of its main limitations: the systematic risk regime can now be applied to each individual asset. Two modes have been added for this:
• Systematic Risk SPX: systematic risk regime based on the S&P 500.
• Systematic Risk Asset in Graphic: systematic risk regime based on the asset currently shown on the chart (the default setting).
The main limitation of this second mode is that it does not include the Extreme Risk category. Also, Risk RSI is configured through the Enable Risk RSI option. In Asset in Graphic mode it is disabled by default, but it can be enabled manually.
Optimization: A sophisticated indicator is of little use if it runs slowly and takes too long to load. For that reason, work has been done to optimize its performance and reduce loading times.
Next update: The RISK ON/OFF mode is planned, using the different market sectors to identify regime changes. My intention is to request the component from another creator. Otherwise, I will do it myself. Either option could take some time.
Информация о релизе
Minor improvements introduced. The code has been further optimized. The indicator's loading time has been reduced from over 10 seconds to less than 2, which is no easy feat for an indicator with more than 20 functions. The focus is on maximizing the usefulness of the tasks the indicator can perform without increasing its load, and most importantly, the optimization must not alter the results; therefore, checks are applied. This result is certainly a reason to be satisfied.
Информация о релизе
1. DISCREPANCIES OR INCONSISTENCIES
Previously, the BRM representation in SYSTEMATIC RISK did not accurately reflect all of its parameters. This has now been corrected, and all parameters established by EdgeTools are fully respected. If you wish to verify this for yourselves, you can add both indicators to the chart and compare their results and graphical representation. The only difference is the color scheme.
2. Indicator Simplification and Optimization
Unnecessary options that made the indicator more difficult to understand have been removed. Regarding loading time, it remains at two seconds or less. Apologies for the previous two points
3. NOW RISK MODEL IS SUPPORTED
It compares the weighted performance of 8 S&P 500 sectors (Technology, Financials, Consumer Discretionary, Communication Services, Industrials, Energy, Materials and Real Estate) against 3 defensive sectors (Health Care, Consumer Staples and Utilities). The difference is normalized with a 500-bar z-score and smoothed with an EMA. It reads as follows:
- ≥ +1σ: Risk-On, low-risk asset.
- Between −1σ and +1σ: neutral, a transition zone between the two regimes.
- ≤ −1σ: Risk-Off, high-risk asset.
The further the reading moves beyond +1σ or −1σ, the stronger and more decisive the signal. The risk model automatically adapts to the asset on screen. The corresponding alerts were added. The font size of the indicator can also be adjusted, in case anyone has difficulty seeing it. In the configurable panel, you will find the RISK
REPRESENTATION option, which allows you to choose between two modes for displaying risk on the chart:
1. Risk Model. (it is a general market indicator)
2. Systematic Risk (BRM). (the best option, because it does adapt to the assets, default)
Important: Risk Model an Systematic Risk (BRM) needs at least 500 daily bars (about 2 years) of history. With less data than that, the score cannot be calculated and the plot shows “NO HISTORICAL DATA”.
There is one very important point: the Z-score calculation uses the 11 fixed ETFs/sectors mentioned earlier. Therefore, it always produces the same result, regardless of which chart the user is viewing, since the calculation does not depend on the asset currently displayed on the chart.
However, there is a natural discrepancy due to time zones: once the European market closes, the indicator retains the last available closing data from that market, rather than updating with information from the U.S. trading session. When the European market reopens the following day, the indicator should automatically and instantly update with the most recent data available.
The shortest supported timeframe is 45 minutes. If the user selects a shorter timeframe, the 45-minute timeframe will be displayed instead. (I don’t think this is a limitation; I don’t think anyone will complain)
To develop this indicator, we have followed the scientific method. In other words, our results have been measured against a reference benchmark to achieve the objectivity and reliability we were aiming for. The indicator is compared against the benchmark across more than 90 time combinations, taking into account both the chart timeframe and the indicator timeframe. The data speaks for itself.
The indicator will be republished on Monday afternoon and this post will be hidden.
Maximum Error: 0.00000000000000269
Standard Deviation: 0.00000000000000033
Mean Error: -0.000000000000000010
Correlation: 1
Global Version
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.