MAINT: Changes name of grouping of by dt in generator chain.

Changes name to `grouped_by_dt` instead of `grouped_by_date` to
clarify that the grouping is by dt, which can be by minute, instead
of grouping by calendar date.
This commit is contained in:
Eddie Hebert
2013-03-20 12:12:33 -04:00
parent 95a9b7b3c2
commit 3707c7b225
+2 -2
View File
@@ -131,13 +131,13 @@ class TradingAlgorithm(object):
self.with_alias_dt = alias_dt(self.with_tnfms)
# Group together events with the same dt field. This depends on the
# events already being sorted.
self.grouped_by_date = groupby(self.with_alias_dt, attrgetter('dt'))
self.grouped_by_dt = groupby(self.with_alias_dt, attrgetter('dt'))
self.trading_client = tsc(self, sim_params)
transact_method = transact_partial(self.slippage, self.commission)
self.set_transact(transact_method)
return self.trading_client.simulate(self.grouped_by_date)
return self.trading_client.simulate(self.grouped_by_dt)
def get_generator(self):
"""