diff --git a/zipline/optimize/algorithms.py b/zipline/optimize/algorithms.py index d0c84b60..8c2e065d 100644 --- a/zipline/optimize/algorithms.py +++ b/zipline/optimize/algorithms.py @@ -32,7 +32,7 @@ class BuySellAlgorithm(): def set_portfolio(self, portfolio): self.portfolio = portfolio - def handle_data(self, frame): + def handle_frame(self, frame): order_size = self.buy_or_sell * (self.amount - (self.offset**2)) self.order(self.sid, order_size) diff --git a/zipline/sources.py b/zipline/sources.py index 513f0b6a..4c63978a 100644 --- a/zipline/sources.py +++ b/zipline/sources.py @@ -98,6 +98,14 @@ class SpecificEquityTrades(TradeDataSource): def get_type(self): zp.COMPONENT_TYPE.SOURCE + @property + def get_id(self): + """ + The descriptive name of the component. + """ + # Prevents the bug that Thomas ran into + return "Unique ID" + def do_work(self): if(len(self.event_list) == 0):