mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-10 08:02:22 +08:00
MAINT: In _create_generator only overwrite perf_tracker when it's None.
This commit is contained in:
@@ -330,8 +330,11 @@ class TradingAlgorithm(object):
|
||||
processed by the zipline, and False for those that should be
|
||||
skipped.
|
||||
"""
|
||||
# Instantiate perf_tracker
|
||||
self.perf_tracker = PerformanceTracker(sim_params)
|
||||
if self.perf_tracker is None:
|
||||
# HACK: When running with the `run` method, we set perf_tracker to
|
||||
# None so that it will be overwritten here.
|
||||
self.perf_tracker = PerformanceTracker(sim_params)
|
||||
|
||||
self.portfolio_needs_update = True
|
||||
|
||||
self.data_gen = self._create_data_generator(source_filter, sim_params)
|
||||
|
||||
Reference in New Issue
Block a user