Spot-Vol Correlation

Spot-Vol Correlation Script Guide


This TradingView script measures the correlation between percentage changes in the spot price (e.g., for SPY, an ETF that tracks the S&P 500 index) and the changes in volatility (e.g., as indicated by the VIX, the Volatility Index). Its primary objective is to discern whether the relationship between spot price and volatility behaves as expected ("normal" condition) or diverges from the expected pattern ("abnormal" condition).

Normal vs. Abnormal Correlation:

Normal Correlation: Historically, the VIX (or volatility) and the spot price of major indices like the S&P 500 have an inverse relationship. When the spot price of the index goes up, the VIX tends to go down, indicating lower volatility. Conversely, when the index drops, the VIX generally rises, signaling increased volatility.

Abnormal Correlation: There are instances when this inverse relationship doesn't hold, and both the spot price and the VIX move in the same direction. This is considered an "abnormal" condition and might indicate unusual market dynamics, potential uncertainty, or impending shifts in market sentiment.

Using the Script:


  • First Symbol: This is set by default to VIX, representing volatility. However, users can input any other volatility metric they prefer.
  • Second Symbol: This is set to SPY by default, representing the spot price of the S&P 500 index. Like the first symbol, users can substitute SPY with any other asset or index of their choice.
  • Length of Calculation Period: Users can define the lookback period for the correlation calculation. By default, it's set to 10 periods (e.g., days for a daily chart).
  • Upper & Lower Bounds of Normal Zone: These parameters define the range of correlation values that are considered "normal" or expected. By default, this is set between -0.60 and -1.00.


  • Correlation Line: The main line plot shows the correlation coefficient between the two input symbols. When this line is within the "normal zone", it indicates that the spot price and volatility are inversely correlated. If it's outside this zone, the correlation is considered "abnormal".
  • Green Color: Indicates a period when the spot price and VIX are behaving as traditionally expected (i.e., one rises while the other falls).
  • Red Color: Denotes a period when the spot price and VIX are both moving in the same direction, which is an abnormal condition.
  • Shaded Area (Normal Zone): The area between the user-defined upper and lower bounds is shaded in green, highlighting the range of "normal" correlation values.


Monitor the color and position of the correlation line relative to the shaded area:
  • If the line is green and within the shaded area, the market dynamics are as traditionally expected.
  • If the line is red or outside the shaded area, users should exercise caution as this indicates a divergence from typical behavior, which can precede significant market moves or heightened uncertainty.


本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。