class_docstr: Results from the profiler.
code: def __init__(self, eventsDict, lookBack, lookForward):
      assert lookBack > 0
      assert lookForward > 0
      self.__lookBack = lookBack
      self.__lookForward = lookForward
      self.__values = [[] for i in xrange(lookBack + lookForward + 1)]
      self.__eventCount = 0
  
      # Process events.
      for instrument, events in eventsDict.items():
          for event in events:
              # Skip events which are on the boundary or for some reason are not complete.
              if event.isComplete():
                  self.__eventCount += 1
                  # Compute cumulative returns: (1 + R1)*(1 + R2)*...*(1 + Rn)
                  values = np.cumprod(event.getValues() + 1)
                  # Normalize everything to the time of the event
                  values = values / values[event.getLookBack()]
                  for t in range(
                      event.getLookBack() * -1,
                      event.getLookForward() + 1,
                  ):
                      self.setValue(t, values[t + event.getLookBack()])
  
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 1 to create a new Results object from inherited base classes: object with example: obj = Results(eventsDict, lookBack, lookForward)