docstr: Run the ( generate_trade_decision -> execute_order_list -> update_account) process everyday
      from start date to end date.
  
  Parameters
  ----------
  id : str
      user id, need to be unique
  config : str
      The file path (yaml) of user config
  exchange_config: str
      The file path (yaml) of exchange config
  start : str "YYYY-MM-DD"
      The start date to run the online simulate
  end : str "YYYY-MM-DD"
      The end date to run the online simulate
  path : str
      Path to save user account.
  bench : str
      The benchmark that our result compared with.
      'SH000905' for csi500, 'SH000300' for csi300
docstr_tok: ["Run","the","(","generate_trade_decision","-",">","execute_order_list","-",">","update_account",")","process","everyday","from","start","date","to","end","date",".","Parameters","--","--","--","--","--","id",":","str","user","id",",","need","to","be","unique","config",":","str","The","file","path","(","yaml",")","of","user","config","exchange_config",":","str","The","file","path","(","yaml",")","of","exchange","config","start",":","str","``","YYYY-MM-DD","''","The","start","date","to","run","the","online","simulate","end",":","str","``","YYYY-MM-DD","''","The","end","date","to","run","the","online","simulate","path",":","str","Path","to","save","user","account",".","bench",":","str","The","benchmark","that","our","result","compared","with",".","'SH000905","'","for","csi500",",","'SH000300","'","for","csi300"]
code: def simulate(
      self,
      id,
      config,
      exchange_config,
      start,
      end,
      path,
      bench="SH000905",
  ):
      """Run the ( generate_trade_decision -> execute_order_list -> update_account) process everyday
          from start date to end date.
  
      Parameters
      ----------
      id : str
          user id, need to be unique
      config : str
          The file path (yaml) of user config
      exchange_config: str
          The file path (yaml) of exchange config
      start : str "YYYY-MM-DD"
          The start date to run the online simulate
      end : str "YYYY-MM-DD"
          The end date to run the online simulate
      path : str
          Path to save user account.
      bench : str
          The benchmark that our result compared with.
          'SH000905' for csi500, 'SH000300' for csi300
      """
      # Clear the current user if exists, then add a new user.
      create_user_folder(path)
      um = self.init(self.client, path, None)[0]
      start_date, end_date = pd.Timestamp(start), pd.Timestamp(end)
      try:
          um.remove_user(user_id=id)
      except BaseException:
          pass
      um.add_user(
          user_id=id,
          config_file=config,
          add_date=pd.Timestamp(start_date),
      )
  
      # Do the online simulate
      um.load_users()
      user = um.users[id]
      dates, trade_exchange = prepare(um, end_date, id, exchange_config)
      executor = SimulatorExecutor(trade_exchange=trade_exchange)
      for pred_date, trade_date in zip(dates[:-2], dates[1:-1]):
          user_path = pathlib.Path(path) / id
  
          # 1. load and save score_series
          input_data = user.model.get_data_with_date(pred_date)
          score_series = user.model.predict(input_data)
          save_score_series(
              score_series, (pathlib.Path(path) / id), trade_date
          )
  
          # 2. update strategy (and model)
          user.strategy.update(score_series, pred_date, trade_date)
  
          # 3. generate and save order list
          order_list = user.strategy.generate_trade_decision(
              score_series=score_series,
              current=user.account.current_position,
              trade_exchange=trade_exchange,
              trade_date=trade_date,
          )
          save_order_list(
              order_list=order_list,
              user_path=user_path,
              trade_date=trade_date,
          )
  
          # 4. auto execute order list
          order_list = load_order_list(
              user_path=user_path, trade_date=trade_date
          )
          trade_info = executor.execute(
              trade_account=user.account,
              order_list=order_list,
              trade_date=trade_date,
          )
          executor.save_executed_file_from_trade_info(
              trade_info=trade_info,
              user_path=user_path,
              trade_date=trade_date,
          )
          # 5. update account state
          trade_info = executor.load_trade_info_from_executed_file(
              user_path=user_path, trade_date=trade_date
          )
          update_account(
              user.account, trade_info, trade_exchange, trade_date
          )
      portfolio_metrics = (
          user.account.portfolio_metrics.generate_portfolio_metrics_dataframe()
      )
      self.logger.info(portfolio_metrics)
      um.save_user_data(id)
      self.show(id, path, bench)
  
imports: import fire
  import pandas
  import pathlib
  import qlib
  import logging
  from ...data import D
  from ...log import get_module_logger
  from ...utils import get_pre_trading_date, is_tradable_date
  from ..evaluate import risk_analysis
  from ..backtest.backtest import update_account
  from .manager import UserManager
  from .utils import prepare
  from .utils import create_user_folder
  from .executor import load_order_list, save_order_list
  from .executor import SimulatorExecutor
  from .executor import save_score_series, load_score_series
label_desc: Use image node_id 8 for calling the Operator obj's underlying member method code with example usage: obj.simulate(id, config, exchange_config, start, end, path, bench) without return types