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:
Andrew Liang
2016-05-11 11:28:07 -04:00
parent 1630dc65d6
commit 40f42b43f5
6 changed files with 818 additions and 34 deletions
+3
View File
@@ -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.