code: def main(plot):
      instruments = ["IBM", "AES", "AIG"]
      feed = quandl.build_feed("WIKI", instruments, 2008, 2009, ".")
  
      predicate = BuyOnGap(feed)
      eventProfiler = eventprofiler.Profiler(predicate, 5, 5)
      eventProfiler.run(feed, True)
  
      results = eventProfiler.getResults()
      print("%d events found" % (results.getEventCount()))
      if plot:
          eventprofiler.plot(results)
  
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 for calling a global function with example usage: main(plot) without return types