From 1909a0576fc2a96406cd9b17e1e82883390b985e Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Tue, 19 Mar 2013 20:36:53 -0400 Subject: [PATCH] MAINT: Removes unused frame_count member from algorithm class. frame_count is only over incremented, but never read or otherwise used. --- zipline/algorithm.py | 1 - zipline/test_algorithms.py | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 96a54865..ac2dd8e7 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -83,7 +83,6 @@ class TradingAlgorithm(object): How much capital to start with. """ self.order = None - self.frame_count = 0 self._portfolio = None self.datetime = None diff --git a/zipline/test_algorithms.py b/zipline/test_algorithms.py index 0d2a158b..c8a6134a 100644 --- a/zipline/test_algorithms.py +++ b/zipline/test_algorithms.py @@ -1,5 +1,5 @@ # -# Copyright 2012 Quantopian, Inc. +# Copyright 2013 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -97,7 +97,6 @@ class TestAlgorithm(TradingAlgorithm): self.sid_filter = [self.sid] def handle_data(self, data): - self.frame_count += 1 #place an order for 100 shares of sid if self.incr < self.count: self.order(self.sid, self.amount) @@ -117,7 +116,6 @@ class HeavyBuyAlgorithm(TradingAlgorithm): self.incr = 0 def handle_data(self, data): - self.frame_count += 1 #place an order for 100 shares of sid self.order(self.sid, self.amount) self.incr += 1