mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-28 12:51:29 +08:00
MAINT: In _create_generator only overwrite perf_tracker when it's None.
This commit is contained in:
1 parent
94b53bdcb7
commit
97e4e5e94d
1 file changed
+5
-2
@@ -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