mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-13 17:42:42 +08:00
DEV: Adjust performance calculations for capital changes
Refactor PerformancePeriod so that it creates a sub-period every time a capital change happens within the period
This commit is contained in:
@@ -383,6 +383,9 @@ class TradingAlgorithm(object):
|
||||
|
||||
self.benchmark_sid = kwargs.pop('benchmark_sid', None)
|
||||
|
||||
# A dictionary of capital change values keyed by timestamp
|
||||
self.capital_changes = kwargs.pop('capital_changes', {})
|
||||
|
||||
def init_engine(self, get_loader):
|
||||
"""
|
||||
Construct and store a PipelineEngine from loader.
|
||||
|
||||
Reference in New Issue
Block a user