code: def __init__(self, feed):
      super(BuyOnGap, self).__init__()
  
      stdDevPeriod = 90
      smaPeriod = 20
      self.__returns = {}
      self.__stdDev = {}
      self.__ma = {}
      for instrument in feed.getRegisteredInstruments():
          priceDS = feed[instrument].getAdjCloseDataSeries()
          # Returns over the adjusted close values.
          self.__returns[instrument] = roc.RateOfChange(priceDS, 1)
          # StdDev over those returns.
          self.__stdDev[instrument] = stats.StdDev(
              self.__returns[instrument], stdDevPeriod
          )
          # MA over the adjusted close values.
          self.__ma[instrument] = ma.SMA(priceDS, smaPeriod)
  
file_path: pyalgotrade/samples/eventstudy.py
imports: from __future__ import print_function
  from pyalgotrade import eventprofiler
  from pyalgotrade.technical import stats
  from pyalgotrade.technical import roc
  from pyalgotrade.technical import ma
  from pyalgotrade.tools import quandl
label_desc: Use image node_id 1 to create a new BuyOnGap object from inherited base classes: eventprofiler with example: obj = BuyOnGap(feed)