mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-06 05:14:38 +08:00
MAINT: Use property for tradesimulation perf_key.
This commit is contained in:
@@ -54,9 +54,6 @@ class AlgorithmSimulator(object):
|
||||
second=0,
|
||||
microsecond=0)
|
||||
|
||||
self.perf_key = self.EMISSION_TO_PERF_KEY_MAP[
|
||||
self.algo.perf_tracker.emission_rate]
|
||||
|
||||
# ==============
|
||||
# Snapshot Setup
|
||||
# ==============
|
||||
@@ -82,6 +79,11 @@ class AlgorithmSimulator(object):
|
||||
record.extra['algo_dt'] = self.snapshot_dt
|
||||
self.processor = Processor(inject_algo_dt)
|
||||
|
||||
@property
|
||||
def perf_key(self):
|
||||
return self.EMISSION_TO_PERF_KEY_MAP[
|
||||
self.algo.perf_tracker.emission_rate]
|
||||
|
||||
def transform(self, stream_in):
|
||||
"""
|
||||
Main generator work loop.
|
||||
|
||||
Reference in New Issue
Block a user