Rolling Correlation & Breakdown Detector
Feb 16, 2026

The Rolling Correlation & Breakdown Detector is an advanced trading indicator built specifically for statistical arbitrage and pairs trading strategies. It acts as a real-time relationship monitor between two assets, helping traders determine whether a mean-reversion trading strategy is statistically valid or if the pair has entered a structural breakdown. Instead of generating direct buy or sell signals, this tool works as a powerful decision filter that protects traders from correlation regime shifts and failed spread trades.
How to Use the Rolling Correlation & Breakdown Detector in a Trading Strategy
This trading indicator is designed to be used alongside spread-based models such as Z-Score indicators, price ratio charts, or custom statistical arbitrage systems. Its primary purpose is to validate whether the relationship between two correlated assets remains stable enough to justify a mean-reversion trade.
Pairs trading and statistical arbitrage rely on one core assumption: two assets move together over time. When that relationship weakens or breaks, traditional mean-reversion signals can become traps. This indicator helps you avoid those traps.
The script continuously evaluates two critical components:
- The raw Pearson rolling correlation
- The stability of that correlation over time
By combining these two factors, the indicator functions as a “trust meter” for your pairs trading setup.
The Three-State Market Regime System
The Rolling Correlation & Breakdown Detector categorizes the relationship between two assets into three clear, color-coded states:
-
Healthy (Green):
Correlation is strong and stable. This is the optimal environment for statistical arbitrage and mean-reversion strategies. Spread divergences are more likely to revert. -
Warning (Orange):
Correlation is weakening or becoming volatile. The relationship may be unstable. New trades should be taken cautiously, and existing positions should use tighter risk management. -
Breakdown (Red):
The correlation has collapsed or become erratic. The assets are no longer moving in tandem. In this regime, mean-reversion signals should be ignored, as one asset may be repricing independently due to structural or macro changes.
This three-state framework makes it easy to visually assess whether your trading strategy has a statistical edge at any given moment.
Filtering Statistical Arbitrage Trades
This trading indicator works best as a filter layered on top of your spread model.
-
Valid Trade Setup:
Your spread indicator shows an extreme (e.g., Z-Score > 2)
AND the detector is in the Green (Healthy) state. -
Invalid Trade Setup:
Your spread shows an extreme, but the detector is Red (Breakdown).
This suggests a structural regime shift, where traditional mean-reversion logic is no longer reliable.
By applying this filter, traders can avoid the classic “divergence trap” — where a spread widens not because of temporary imbalance, but because the economic relationship between the two assets has fundamentally changed.
Why Correlation Stability Matters in Pairs Trading
Most traders focus only on the absolute correlation value. However, high correlation alone does not guarantee tradability.
A pair with:
- Moderate but stable correlation
can be more reliable for statistical arbitrage
than a pair with:
- High correlation that is rapidly collapsing
This trading indicator introduces Correlation Stability as a core metric. It calculates the standard deviation of the rolling correlation over a defined Stability Window. If correlation fluctuates excessively, the stability metric spikes, triggering a Warning or Breakdown state.
This mechanism acts as a built-in “circuit breaker” for your trading strategy, helping protect against:
- Macro-driven divergences
- Earnings-related repricing
- Structural news events
- Regime shifts in sector or market behavior
When correlation becomes unstable, the probability of mean reversion decreases significantly. This tool makes that risk visible before it impacts your P&L.
Indicator Calculation Details
The Rolling Correlation & Breakdown Detector combines:
- Rolling Pearson Correlation over a configurable lookback period
- Standard Deviation of Correlation over a separate Stability Window
If:
- Correlation drops below the Breakdown Threshold
- OR stability volatility exceeds the Stability Threshold
the indicator transitions from Healthy to Warning or Breakdown.
This dual-layer logic ensures that both structural decay and erratic correlation behavior are captured — something traditional correlation overlays fail to address.
Settings Explained
General Settings
-
Asset B:
The secondary symbol to compare against the current chart symbol. -
Correlation Length:
The rolling lookback window used to calculate Pearson correlation. -
Stability Window:
The lookback window used to measure correlation volatility (standard deviation).
Adjusting these inputs allows traders to tailor the indicator for short-term intraday statistical arbitrage or longer-term swing-based pairs trading strategies.
Breakdown Detection Thresholds
-
Healthy Threshold:
Minimum correlation required to maintain a Healthy state. -
Breakdown Threshold:
Correlation level below which the relationship is considered structurally broken. -
Stability Threshold:
Maximum allowed correlation volatility before triggering Warning or Breakdown.
These thresholds let you control how strict the filter is. Lower thresholds create more trade opportunities but higher risk. Stricter thresholds reduce trade frequency while improving statistical reliability.
Dashboard Controls
-
Dashboard Toggle:
Enables or disables the real-time on-screen information table. -
Position / Size:
Adjusts the location and scale of the dashboard for optimal chart layout.
The dashboard provides immediate insight into the current regime, correlation value, and stability metrics, helping traders make fast, data-driven decisions.
Who Should Use This Trading Indicator?
This tool is ideal for:
- Statistical arbitrage traders
- Pairs trading specialists
- Market-neutral hedge strategies
- Quantitative trading systems
- Spread and ratio-based strategies
It is particularly valuable for traders who already use Z-Score models, spread bands, or custom arbitrage logic and want to improve risk control by validating correlation health.
FAQ
What is the Rolling Correlation & Breakdown Detector used for?
It is a trading indicator designed to monitor the health and stability of the relationship between two assets. It helps statistical arbitrage and pairs traders determine whether mean-reversion strategies are statistically valid or if the correlation has broken down.
Is this a standalone entry signal indicator?
No. It functions as a decision filter. It should be combined with spread indicators, Z-Score models, or other statistical trading strategies.
Why is correlation stability important?
A stable correlation indicates a persistent relationship between assets. If correlation becomes volatile or collapses, the probability of successful mean reversion decreases significantly, increasing the risk of failed trades.
How do I access the Rolling Correlation & Breakdown Detector?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.comTradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, CoinAPI. CBOE BZX real-time US equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

