title: TypeError: 'NoneType' object is not subscriptable using pandas_ta and yfinance
body: <p>I am trying to calculate the macd of a stock using the panada_ta library.</p>
  <p>The function I created to do so (will post below) works perfectly fine when I run it on it's own, but I am trying to call it within a calc_technicals() functions that calls several methods to conduct technical analysis on stocks, but it says my df is of type NoneType</p>
  <pre><code>def calc_macd(self, stock: Stock):
      macd = ta.macd(stock._df[&quot;Close&quot;])
      stock._macd = macd[&quot;MACD_12_26_9&quot;].tail()[-1]
      stock._macd_slow = macd[&quot;MACDs_12_26_9&quot;].tail()[-1]
  
  def calc_technicals(self):
      for stock in self._watchlist:
          self.calc_macd(stock)
          self.calc_rsi(stock)
          self.calc_vwap(stock)
          self.calc_ema(stock)
  </code></pre>
  <p>This is the error I get when I call the calc_technicals() method</p>
  <p><a href="https://i.stack.imgur.com/AXgyk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AXgyk.png" alt="enter image description here" /></a></p>