mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-01 06:14:29 +08:00
MAINT: Removes unused frame_count member from algorithm class.
frame_count is only over incremented, but never read or otherwise used.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user