I am wondering whether CBOE VIX data is avaialble for backtesting. 

I have been trying to get VIX data using the following code and getting this error. Any quick help is highly appreciated. 

Runtime Error: 'RangeBoundIronCondorStrategy' object has no attribute 'vix'
  at VolatilityChecks
    if self.vix in slice:
       ^^^^^^^^
 in main.py: line 634

My code workflow: 

from AlgorithmImports import *
from QuantConnect.DataSource import *

class ICStrategy(QCAlgorithm):
def Initialize(self):

        # Strategy Initialization
        self.SetStartDate(2023, 1, 1) 

        self.SetEndDate(2023, 9, 30)               

        self.SetCash(100000)                       

 

        equity = self.AddEquity("SPY", Resolution.Daily)

        self.symbol = equity.Symbol             

        self.option = self.AddOption("SPY", Resolution.Daily)

       self.option.SetDataNormalizationMode(DataNormalizationMode.Raw)

 

        # loading VIX data

        self.cboeVix = self.add_data(CBOE, "VIX", Resolution.DAILY).symbol

 

     def OnData(self, slice):

         # get vix data

         if slice.contains_key(self.cboeVix):

            self.vix = slice[self.cboeVix]

         else:

            self.Debug(F"slice does not have VIX data")

            return

 

     def vix_check(self):

       if self.vix in slice: 

               vix_value = slice[self.vix].Close