class_docstr: This class is responsible for scanning over historical data and analyzing returns before
  and after the events.
  
  :param predicate: A :class:`Predicate` subclass responsible for identifying events.
  :type predicate: :class:`Predicate`.
  :param lookBack: The number of bars before the event to analyze. Must be > 0.
  :type lookBack: int.
  :param lookForward: The number of bars after the event to analyze. Must be > 0.
  :type lookForward: int.
docstr: Runs the analysis using the bars supplied by the feed.
  
  :param barFeed: The bar feed to use to run the analysis.
  :type barFeed: :class:`pyalgotrade.barfeed.BarFeed`.
  :param useAdjustedCloseForReturns: True if adjusted close values should be used to calculate returns.
  :type useAdjustedCloseForReturns: boolean.
docstr_tok: ["Runs","the","analysis","using","the","bars","supplied","by","the","feed",".",":","param","barFeed",":","The","bar","feed","to","use","to","run","the","analysis",".",":","type","barFeed",":",":","class",":","`","pyalgotrade.barfeed.BarFeed","`",".",":","param","useAdjustedCloseForReturns",":","True","if","adjusted","close","values","should","be","used","to","calculate","returns",".",":","type","useAdjustedCloseForReturns",":","boolean","."]
code: def run(self, feed, useAdjustedCloseForReturns=True):
      """Runs the analysis using the bars supplied by the feed.
  
      :param barFeed: The bar feed to use to run the analysis.
      :type barFeed: :class:`pyalgotrade.barfeed.BarFeed`.
      :param useAdjustedCloseForReturns: True if adjusted close values should be used to calculate returns.
      :type useAdjustedCloseForReturns: boolean.
      """
  
      if useAdjustedCloseForReturns:
          assert (
              feed.barsHaveAdjClose()
          ), "Feed doesn't have adjusted close values"
  
      try:
          self.__feed = feed
          self.__rets = {}
          self.__futureRets = {}
          for instrument in feed.getRegisteredInstruments():
              self.__events.setdefault(instrument, [])
              self.__futureRets[instrument] = []
              if useAdjustedCloseForReturns:
                  ds = feed[instrument].getAdjCloseDataSeries()
              else:
                  ds = feed[instrument].getCloseDataSeries()
              self.__rets[instrument] = roc.RateOfChange(ds, 1)
  
          feed.getNewValuesEvent().subscribe(self.__onBars)
          disp = dispatcher.Dispatcher()
          disp.addSubject(feed)
          disp.run()
      finally:
          feed.getNewValuesEvent().unsubscribe(self.__onBars)
  
imports: import numpy
  import matplotlib.pyplot
  from six.moves import xrange
  from pyalgotrade.technical import roc
  from pyalgotrade import dispatcher
label_desc: Use image node_id 6 for calling the Profiler obj's underlying member method code with example usage: obj.run(feed, useAdjustedCloseForReturns) without return types