mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-07 13:00:58 +08:00
fix CI
This commit is contained in:
@@ -118,7 +118,8 @@ class BaseExecutor:
|
||||
def get_report(self):
|
||||
raise NotImplementedError("get_report is not implemented!")
|
||||
|
||||
def get_all_executor(self):
|
||||
def get_all_executors(self):
|
||||
"""Return all executors"""
|
||||
return [self]
|
||||
|
||||
|
||||
@@ -247,8 +248,9 @@ class NestedExecutor(BaseExecutor):
|
||||
sub_env_report_dict.update({f"{_count}{_freq}": (_report, _positions)})
|
||||
return sub_env_report_dict
|
||||
|
||||
def get_all_executor(self):
|
||||
return [self, *self.inner_executor.get_all_executor()]
|
||||
def get_all_executors(self):
|
||||
"""Return all executors, including self and inner_executor.get_all_executors()"""
|
||||
return [self, *self.inner_executor.get_all_executors()]
|
||||
|
||||
|
||||
class SimulatorExecutor(BaseExecutor):
|
||||
|
||||
@@ -12,6 +12,7 @@ from pandas.core.frame import DataFrame
|
||||
|
||||
from ..utils.resam import parse_freq, resam_ts_data
|
||||
from ..data import D
|
||||
from ..tests.config import CSI300_BENCH
|
||||
|
||||
|
||||
class Report:
|
||||
@@ -67,7 +68,7 @@ class Report:
|
||||
self.bench = self._cal_benchmark(self.benchmark_config, self.freq)
|
||||
|
||||
def _cal_benchmark(self, benchmark_config, freq):
|
||||
benchmark = benchmark_config.get("benchmark", "SH000300")
|
||||
benchmark = benchmark_config.get("benchmark", CSI300_BENCH)
|
||||
if isinstance(benchmark, pd.Series):
|
||||
return benchmark
|
||||
else:
|
||||
|
||||
@@ -29,7 +29,7 @@ def risk_analysis(r, N: int = None, freq: str = "day"):
|
||||
r : pandas.Series
|
||||
daily return series.
|
||||
N: int
|
||||
scaler for annualizing information_ratio (day: 250, week: 50, month: 12), at least one of `N` and `freq` should exist
|
||||
scaler for annualizing information_ratio (day: 252, week: 50, month: 12), at least one of `N` and `freq` should exist
|
||||
freq: str
|
||||
analysis frequency used for calculating the scaler, at least one of `N` and `freq` should exist
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user