class_docstr: OnlineManager can manage online models with `Online Strategy <#Online Strategy>`_.
  It also provides a history recording of which models are online at what time.
docstr: Starting from the current time, this method will simulate every routine in OnlineManager until the end time.
  
  Considering the parallel training, the models and signals can be prepared after all routine simulating.
  
  The delay training way can be ``DelayTrainer`` and the delay preparing signals way can be ``delay_prepare``.
  
  Args:
      end_time: the time the simulation will end
      frequency: the calendar frequency
      task_kwargs (dict): the params for `prepare_tasks`
      model_kwargs (dict): the params for `prepare_online_models`
      signal_kwargs (dict): the params for `prepare_signals`
  
  Returns:
      Union[pd.Series, pd.DataFrame]: pd.Series for only one signals every datetime.
      pd.DataFrame for multiple signals, for example, buy and sell operations use different trading signals.
docstr_tok: ["Starting","from","the","current","time",",","this","method","will","simulate","every","routine","in","OnlineManager","until","the","end","time",".","Considering","the","parallel","training",",","the","models","and","signals","can","be","prepared","after","all","routine","simulating",".","The","delay","training","way","can","be","``","DelayTrainer","``","and","the","delay","preparing","signals","way","can","be","``","delay_prepare","``",".","Args",":","end_time",":","the","time","the","simulation","will","end","frequency",":","the","calendar","frequency","task_kwargs","(","dict",")",":","the","params","for","`","prepare_tasks","`","model_kwargs","(","dict",")",":","the","params","for","`","prepare_online_models","`","signal_kwargs","(","dict",")",":","the","params","for","`","prepare_signals","`","Returns",":","Union","[","pd.Series",",","pd.DataFrame","]",":","pd.Series","for","only","one","signals","every","datetime",".","pd.DataFrame","for","multiple","signals",",","for","example",",","buy","and","sell","operations","use","different","trading","signals","."]
code: def simulate(
      self,
      end_time=None,
      frequency="day",
      task_kwargs={},
      model_kwargs={},
      signal_kwargs={},
  ) -> Union[pd.Series, pd.DataFrame]:
      """
      Starting from the current time, this method will simulate every routine in OnlineManager until the end time.
  
      Considering the parallel training, the models and signals can be prepared after all routine simulating.
  
      The delay training way can be ``DelayTrainer`` and the delay preparing signals way can be ``delay_prepare``.
  
      Args:
          end_time: the time the simulation will end
          frequency: the calendar frequency
          task_kwargs (dict): the params for `prepare_tasks`
          model_kwargs (dict): the params for `prepare_online_models`
          signal_kwargs (dict): the params for `prepare_signals`
  
      Returns:
          Union[pd.Series, pd.DataFrame]: pd.Series for only one signals every datetime.
          pd.DataFrame for multiple signals, for example, buy and sell operations use different trading signals.
      """
      self.status = self.STATUS_SIMULATING
      cal = D.calendar(
          start_time=self.cur_time, end_time=end_time, freq=frequency
      )
      self.first_train()
  
      simulate_level = self.SIM_LOG_LEVEL
      set_global_logger_level(simulate_level)
      logging.addLevelName(simulate_level, self.SIM_LOG_NAME)
  
      for cur_time in cal:
          self.logger.log(
              level=simulate_level,
              msg=f"Simulating at {str(cur_time)}......",
          )
          self.routine(
              cur_time,
              task_kwargs=task_kwargs,
              model_kwargs=model_kwargs,
              signal_kwargs=signal_kwargs,
          )
      # delay prepare the models and signals
      if self._postpone_action():
          self.delay_prepare(
              model_kwargs=model_kwargs, signal_kwargs=signal_kwargs
          )
  
      # FIXME: get logging level firstly and restore it here
      set_global_logger_level(logging.DEBUG)
      self.logger.info(f"Finished preparing signals")
      self.status = self.STATUS_ONLINE
      return self.get_signals()
  
imports: import logging
  from typing import Callable, List, Union
  import pandas
  from qlib import get_module_logger
  from qlib.data.data import D
  from qlib.log import set_global_logger_level
  from qlib.model.ens.ensemble import AverageEnsemble
  from qlib.model.trainer import Trainer, TrainerR
  from qlib.utils.serial import Serializable
  from qlib.workflow.online.strategy import OnlineStrategy
  from qlib.workflow.task.collect import MergeCollector
label_desc: Use image node_id 9 for calling the OnlineManager obj's underlying member method code with example usage: obj.simulate(end_time, frequency, task_kwargs, model_kwargs, signal_kwargs) and returns: self