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

update port_ana_record

This commit is contained in:
bxdd
2021-04-29 02:28:22 +08:00
parent 86a6f565e8
commit 49cdaf8f5d
3 changed files with 34 additions and 24 deletions

View File

@@ -214,6 +214,7 @@ class Account:
# finish today's updation
# reset the daily variables
self.rtn = 0
self.ct = 0
self.to = 0

View File

@@ -9,7 +9,7 @@ from .account import Account
def backtest(start_time, end_time, trade_strategy, trade_env, benchmark, account):
trade_account = Account(init_cash=account)
trade_account = Account(init_cash=account, benchmark=benchmark, start_time=start_time, end_time=end_time)
trade_env.reset(start_time=start_time, end_time=end_time, trade_account=trade_account)
trade_strategy.reset(start_time=start_time, end_time=end_time)