mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-07 17:47:24 +08:00
MAINT: Revert slice into returns containers instead of using .valid()
Backing out slice vs. valid(), because of an incompatiblity with starting a minutely emitted session mid-day, since the midday start date is not yet wired through SimulationParameters.
This commit is contained in:
@@ -615,10 +615,10 @@ class RiskMetricsIterative(RiskMetricsBase):
|
||||
|
||||
def update(self, dt, algorithm_returns, benchmark_returns):
|
||||
self.algorithm_returns_cont[dt] = algorithm_returns
|
||||
self.algorithm_returns = self.algorithm_returns_cont[:dt]
|
||||
self.algorithm_returns = self.algorithm_returns_cont.valid()
|
||||
|
||||
self.benchmark_returns_cont[dt] = benchmark_returns
|
||||
self.benchmark_returns = self.benchmark_returns_cont[:dt]
|
||||
self.benchmark_returns = self.benchmark_returns_cont.valid()
|
||||
|
||||
self.num_trading_days = len(self.algorithm_returns)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user