mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-14 11:15:09 +08:00
DEV Add preemptive check that benchmark return exists.
This commit is contained in:
@@ -312,6 +312,11 @@ class PerformanceTracker(object):
|
||||
else:
|
||||
midnight = event.dt
|
||||
|
||||
if midnight not in self.all_benchmark_returns.index:
|
||||
raise AssertionError(("Date %s not allocated in "
|
||||
"all_benchmark_returns. Calendar "
|
||||
"seems to mismatch with benchmark."
|
||||
% midnight))
|
||||
self.all_benchmark_returns[midnight] = event.returns
|
||||
|
||||
def check_upcoming_dividends(self, midnight_of_date_that_just_ended):
|
||||
|
||||
Reference in New Issue
Block a user