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:
@@ -214,6 +214,7 @@ class Account:
|
||||
|
||||
# finish today's updation
|
||||
# reset the daily variables
|
||||
self.rtn = 0
|
||||
self.ct = 0
|
||||
self.to = 0
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user