From 3e978d0ebb42aabc5649f775cab572d1941c55c8 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Mon, 28 Jul 2014 22:19:18 -0400 Subject: [PATCH] MAINT: Remove unused methods from `TradingAlgorithm`. Removes unused method `raw_positions` and `raw_orders` from `TradingAlgorithm`. These methods existed to help support features in the Quantopian codebase, which no longer use the existing interface. --- zipline/algorithm.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 835152c3..c10daba3 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -819,27 +819,6 @@ class TradingAlgorithm(object): self.blotter.cancel(order_id) - def raw_positions(self): - """ - Returns the current portfolio for the algorithm. - - N.B. this is not done as a property, so that the function can be - passed and called from within a source. - """ - # Return the 'internal' positions object, as in the one that is - # not passed to the algo, and thus should not have tainted keys. - return self.perf_tracker.cumulative_performance.positions - - def raw_orders(self): - """ - Returns the current open orders from the blotter. - - N.B. this is not a property, so that the function can be passed - and called back from within a source. - """ - - return self.blotter.open_orders - @api_method def add_history(self, bar_count, frequency, field, ffill=True):