def main(plot): instruments = ["AA", "AES", "AIG"] feed = yahoofinance.build_feed(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)
def main(plot): instruments = ["AA", "AES", "AIG"] feed = googlefinance.build_feed(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)
def main(plot): instruments = ["MSFT", "AA"] feed = yahoofinance.build_feed(instruments, 2008, 2014, "data") 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)
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)
def main(plot): symbols = ["IBM", "AES", "AIG"] priceCurrency = "USD" feed = quandl.build_feed("WIKI", symbols, priceCurrency, 2008, 2009, ".") instruments = ["%s/%s" % (symbol, priceCurrency) for symbol in symbols] predicate = BuyOnGap(feed, instruments) eventProfiler = eventprofiler.Profiler(predicate, 5, 5) eventProfiler.run(feed, True) results = eventProfiler.getResults() print("%d events found" % (results.getEventCount())) if plot: eventprofiler.plot(results)
def main(plot): instrument = "n225" # Load the bar feed from the CSV file feed = yahoofeed.Feed() feed.addBarsFromCSV(instrument, r".\Data\n225.csv") 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)