mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-22 12:40:30 +08:00
MAINT: flake8
This commit is contained in:
@@ -232,7 +232,7 @@ class RiskMetricsCumulative(object):
|
||||
if len(self.algorithm_returns) == 1:
|
||||
self.algorithm_returns = pd.Series(
|
||||
{'null return': 0.0}).append(
|
||||
self.algorithm_returns)
|
||||
self.algorithm_returns)
|
||||
|
||||
self.mean_returns = pd.rolling_mean(self.algorithm_returns,
|
||||
window=len(self.algorithm_returns),
|
||||
@@ -254,7 +254,7 @@ class RiskMetricsCumulative(object):
|
||||
if len(self.benchmark_returns) == 1:
|
||||
self.benchmark_returns = pd.Series(
|
||||
{'null return': 0.0}).append(
|
||||
self.benchmark_returns)
|
||||
self.benchmark_returns)
|
||||
|
||||
self.mean_benchmark_returns = pd.rolling_mean(
|
||||
self.benchmark_returns,
|
||||
|
||||
@@ -80,13 +80,12 @@ def create_test_zipline(**config):
|
||||
if trade_source:
|
||||
test_algo.set_sources([trade_source])
|
||||
|
||||
|
||||
#-------------------
|
||||
# Benchmark source
|
||||
#-------------------
|
||||
|
||||
test_algo.benchmark_return_source = config.get('benchmark_source', None)
|
||||
|
||||
|
||||
#-------------------
|
||||
# Transforms
|
||||
#-------------------
|
||||
|
||||
Reference in New Issue
Block a user