1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-11 06:46:56 +08:00

fix account bug & update indicator_analysis & fix some comments

This commit is contained in:
bxdd
2021-06-22 02:42:09 +08:00
parent 9e45528165
commit 4ac6e6e246
9 changed files with 524 additions and 302 deletions

View File

@@ -116,9 +116,9 @@ def backtest(start_time, end_time, strategy, executor, benchmark="SH000300", acc
trade_strategy, trade_executor = get_strategy_executor(
start_time, end_time, strategy, executor, benchmark, account, exchange_kwargs
)
report_dict = backtest_loop(start_time, end_time, trade_strategy, trade_executor)
report_dict, indicator_dict = backtest_loop(start_time, end_time, trade_strategy, trade_executor)
return report_dict
return report_dict, indicator_dict
def collect_data(start_time, end_time, strategy, executor, benchmark="SH000300", account=1e9, exchange_kwargs={}):
@@ -126,6 +126,4 @@ def collect_data(start_time, end_time, strategy, executor, benchmark="SH000300",
trade_strategy, trade_executor = get_strategy_executor(
start_time, end_time, strategy, executor, benchmark, account, exchange_kwargs
)
report_dict = yield from collect_data_loop(start_time, end_time, trade_strategy, trade_executor)
return report_dict
yield from collect_data_loop(start_time, end_time, trade_strategy, trade_executor)