1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-16 17:12:20 +08:00

make the integration simpler

This commit is contained in:
Young
2020-09-25 04:39:59 +00:00
parent 9556d1ce38
commit 900e284696
4 changed files with 27 additions and 19 deletions

View File

@@ -133,7 +133,10 @@ class Estimator(object):
TimeInspector.set_time_mark()
# 1. Get pred and prediction score of model(s).
pred = self.trainer.get_test_score()
performance = self.trainer.get_test_performance()
try:
performance = self.trainer.get_test_performance()
except NotImplementedError:
performance = None
# 2. Normal Backtest.
report_normal, positions_normal = self._normal_backtest(pred)
# 3. Long-Short Backtest.