def __init__(self, deepOptionChain: DeepOptionChain, volatilityBack=260):
        self.optionChain = deepOptionChain.getOptionChain()
        self.deepChain = deepOptionChain.getDeepOptionChain()
        self.chainWeights = ChainWeights(self.optionChain)

        if deepOptionChain.computeIV:
            self.smile = self.deepChain.smile
        else:
            self.smile = None

        ticker = self.optionChain.getTicker()
        self.history = ticker.getHistory(
            end=self.optionChain.getChainDate()).tail(volatilityBack)
    def __init__(self, deepOptionChain: DeepOptionChain, weights):
        """
        weightsMode:
        * EW -> equally weighted (default);
        * ATM
        * OI -> open interest;
        """
        self.deepOptionChain = deepOptionChain
        self.deepChain = deepOptionChain.getDeepOptionChain()
        self.optionChain = deepOptionChain.getOptionChain()
        self.data = self.deepChain

        self.avaiableIV = deepOptionChain.computeIV
        self.weights = weights