MAINT: Use a for loop for main algorithm run loop instead of list

So that stepping through a debugger is a little easier, with
respect to having easy access to the algorithm object, and seeing
which step in `self.gen` the interpreter is currently at.
This commit is contained in:
Eddie Hebert
2013-05-06 17:35:44 -04:00
parent aa54d0ae0e
commit 91e5abbc44
+3 -1
View File
@@ -298,7 +298,9 @@ class TradingAlgorithm(object):
# loop through simulated_trading, each iteration returns a
# perf dictionary
perfs = list(self.gen)
perfs = []
for perf in self.gen:
perfs.append(perf)
# convert perf dict to pandas dataframe
daily_stats = self._create_daily_stats(perfs)