mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-28 12:51:29 +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:
1 parent
ad06acd49d
commit
c0acbe2bc1
1 file changed
+2
-2
@@ -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