def setUp(self): self.events = queue.Queue() self.status = dict() self.portfolio = PortfolioLocal(self.status) self.execution = SimulatedExecutionHandler(self.status) self.manager = Manager(self.status, self.events, self.execution, self.portfolio, None) self.event_src = DukascopyCSVPriceHandler("EUR_USD", self.events)
# strategy = SMABOL(status) # strategy = SMARSIOLS(status) # strategy = WMA(status) # strategy = SMAOLS(status) # strategy = SMA(status) # strategy = RSI(status) # strategy = SMARSI(status) # strategy = Granville(status) # strategy = Momentum(status) # strategy = BolingerBand(status) manager = Manager(status, events, execution, portfolio, strategy, timeseries) print("=== Backtesting Start =================================== ") # event_src = MetatraderCSVPriceHandler("EUR_USD", events) event_src = DukascopyCSVPriceHandler("EUR_USD", events, # "data/EURUSD_Ticks_24.07.2015-3H.csv") "data/EURUSD_Ticks_28.07.2015-3H-2.csv") # "data/EURUSD_Ticks_29.07.2015-4H.csv") event_src.stream_to_queue() simulating(events, manager) print("=== End .... v(^_^)v =================================== ") show_result() plot_data()